Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- Registry
- Optimization enabled
- true
- Compiler version
- v0.8.17+commit.8df45f5f
- Optimization runs
- 999999
- Verified at
- 2023-04-12T21:04:44.141095Z
Constructor Arguments
0000000000000000000000002c1b868d6596a18e32e61b901e4060c872647b6c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Arg [0] (address) : 0x2c1b868d6596a18e32e61b901e4060c872647b6c
Arg [1] (uint256) : 0
Arg [2] (uint256) : 0
contracts/Registry.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; /** * @title AirSwap: Server URL Registry * @notice https://www.airswap.io/ */ contract Registry { using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; using EnumerableSet for EnumerableSet.Bytes32Set; IERC20 public immutable stakingToken; uint256 public immutable obligationCost; uint256 public immutable tokenCost; mapping(address => EnumerableSet.AddressSet) internal tokensByStaker; mapping(address => EnumerableSet.Bytes32Set) internal protocolsByStaker; mapping(address => EnumerableSet.AddressSet) internal stakersByToken; mapping(bytes4 => EnumerableSet.AddressSet) internal stakersByProtocol; mapping(address => string) public stakerServerURLs; event InitialStake(address indexed account); event FullUnstake(address indexed account); event AddTokens(address indexed account, address[] tokens); event RemoveTokens(address indexed account, address[] tokens); event AddProtocols(address indexed account, bytes4[] protocols); event RemoveProtocols(address indexed account, bytes4[] protocols); event SetServerURL(address indexed account, string url); error NoProtocolsToAdd(); error NoProtocolsToRemove(); error ProtocolDoesNotExist(bytes4); error ProtocolExists(bytes4); error NoTokensToAdd(); error NoTokensToRemove(); error TokenDoesNotExist(address); error TokenExists(address); /** * @notice Constructor * @param _stakingToken address of token used for staking * @param _obligationCost base amount required to stake * @param _tokenCost amount required to stake per protocol */ constructor( IERC20 _stakingToken, uint256 _obligationCost, uint256 _tokenCost ) { stakingToken = _stakingToken; obligationCost = _obligationCost; tokenCost = _tokenCost; } /** * @notice Set the server URL for a staker * @param _url string value of the ServerURL */ function setServerURL(string calldata _url) external { stakerServerURLs[msg.sender] = _url; emit SetServerURL(msg.sender, _url); } /** * @notice Add tokens supported by the caller * @param tokens array of token addresses */ function addTokens(address[] calldata tokens) external { uint256 length = tokens.length; if (length <= 0) revert NoTokensToAdd(); EnumerableSet.AddressSet storage tokenList = tokensByStaker[msg.sender]; uint256 transferAmount = 0; if (tokenList.length() == 0) { transferAmount = obligationCost; emit InitialStake(msg.sender); } for (uint256 i = 0; i < length; i++) { address token = tokens[i]; if (!tokenList.add(token)) revert TokenExists(token); stakersByToken[token].add(msg.sender); } transferAmount += tokenCost * length; emit AddTokens(msg.sender, tokens); if (transferAmount > 0) { stakingToken.safeTransferFrom(msg.sender, address(this), transferAmount); } } /** * @notice Remove tokens supported by the caller * @param tokens array of token addresses */ function removeTokens(address[] calldata tokens) external { uint256 length = tokens.length; if (length <= 0) revert NoTokensToRemove(); EnumerableSet.AddressSet storage tokenList = tokensByStaker[msg.sender]; for (uint256 i = 0; i < length; i++) { address token = tokens[i]; if (!tokenList.remove(token)) revert TokenDoesNotExist(token); stakersByToken[token].remove(msg.sender); } uint256 transferAmount = tokenCost * length; if (tokenList.length() == 0) { transferAmount += obligationCost; emit FullUnstake(msg.sender); } emit RemoveTokens(msg.sender, tokens); if (transferAmount > 0) { stakingToken.safeTransfer(msg.sender, transferAmount); } } /** * @notice Remove all tokens supported by the caller */ function removeAllTokens() external { EnumerableSet.AddressSet storage supportedTokenList = tokensByStaker[ msg.sender ]; uint256 length = supportedTokenList.length(); if (length <= 0) revert NoTokensToRemove(); address[] memory tokenList = new address[](length); for (uint256 i = length; i > 0; ) { i--; address token = supportedTokenList.at(i); tokenList[i] = token; supportedTokenList.remove(token); stakersByToken[token].remove(msg.sender); } uint256 transferAmount = obligationCost + tokenCost * length; emit FullUnstake(msg.sender); emit RemoveTokens(msg.sender, tokenList); if (transferAmount > 0) { stakingToken.safeTransfer(msg.sender, transferAmount); } } /** * @notice Return a list of all server URLs supporting a given token * @param token address of the token * @return urls array of staker server URLs supporting the token */ function getServerURLsForToken( address token ) external view returns (string[] memory urls) { EnumerableSet.AddressSet storage stakers = stakersByToken[token]; uint256 length = stakers.length(); urls = new string[](length); for (uint256 i = 0; i < length; i++) { urls[i] = stakerServerURLs[address(stakers.at(i))]; } } /** * @notice Return whether a staker supports a given token * @param staker account address used to stake * @param token address of the token * @return true if the staker supports the token */ function supportsToken( address staker, address token ) external view returns (bool) { return tokensByStaker[staker].contains(token); } /** * @notice Return a list of all supported tokens for a given staker * @param staker account address of the staker * @return tokenList array of all the supported tokens */ function getTokensForStaker( address staker ) external view returns (address[] memory tokenList) { EnumerableSet.AddressSet storage tokens = tokensByStaker[staker]; uint256 length = tokens.length(); tokenList = new address[](length); for (uint256 i = 0; i < length; i++) { tokenList[i] = tokens.at(i); } } /** * @notice Return a list of all stakers supporting a given token * @param token address of the token * @return stakers array of all stakers that support a given token */ function getStakersForToken( address token ) external view returns (address[] memory stakers) { EnumerableSet.AddressSet storage stakerList = stakersByToken[token]; uint256 length = stakerList.length(); stakers = new address[](length); for (uint256 i = 0; i < length; i++) { stakers[i] = stakerList.at(i); } } /** * @notice Add protocols supported by the caller * @param protocols array of protocol addresses */ function addProtocols(bytes4[] calldata protocols) external { uint256 length = protocols.length; if (length <= 0) revert NoProtocolsToAdd(); EnumerableSet.Bytes32Set storage protocolList = protocolsByStaker[ msg.sender ]; for (uint256 i = 0; i < length; i++) { bytes4 protocol = protocols[i]; if (!protocolList.add(protocol)) revert ProtocolExists(protocol); stakersByProtocol[protocol].add(msg.sender); } emit AddProtocols(msg.sender, protocols); } /** * @notice Remove protocols supported by the caller * @param protocols array of protocol addresses */ function removeProtocols(bytes4[] calldata protocols) external { uint256 length = protocols.length; if (length <= 0) revert NoProtocolsToRemove(); EnumerableSet.Bytes32Set storage protocolList = protocolsByStaker[ msg.sender ]; for (uint256 i = 0; i < length; i++) { bytes4 protocol = protocols[i]; if (!protocolList.remove(protocol)) revert ProtocolDoesNotExist(protocol); stakersByProtocol[protocol].remove(msg.sender); } emit RemoveProtocols(msg.sender, protocols); } /** * @notice Remove all protocols supported by the caller */ function removeAllProtocols() external { EnumerableSet.Bytes32Set storage supportedProtocolList = protocolsByStaker[ msg.sender ]; uint256 length = supportedProtocolList.length(); if (length <= 0) revert NoProtocolsToRemove(); bytes4[] memory protocolList = new bytes4[](length); for (uint256 i = length; i > 0; ) { i--; bytes4 protocol = bytes4(supportedProtocolList.at(i)); protocolList[i] = protocol; supportedProtocolList.remove(protocol); stakersByProtocol[protocol].remove(msg.sender); } emit RemoveProtocols(msg.sender, protocolList); } /** * @notice Return a list of all server URLs supporting a given protocol * @param protocol address of the protocol * @return urls array of staker server URLs supporting the protocol */ function getServerURLsForProtocol( bytes4 protocol ) external view returns (string[] memory urls) { EnumerableSet.AddressSet storage stakers = stakersByProtocol[protocol]; uint256 length = stakers.length(); urls = new string[](length); for (uint256 i = 0; i < length; i++) { urls[i] = stakerServerURLs[address(stakers.at(i))]; } } /** * @notice Get the ServerURLs for an array of stakers * @param stakers array of staker addresses * @return urls array of staker ServerURLs in the same order */ function getServerURLsForStakers( address[] calldata stakers ) external view returns (string[] memory urls) { uint256 stakersLength = stakers.length; urls = new string[](stakersLength); for (uint256 i = 0; i < stakersLength; i++) { urls[i] = stakerServerURLs[stakers[i]]; } } /** * @notice Return whether a staker supports a given protocol * @param staker account address used to stake * @param protocol address of the protocol * @return true if the staker supports the protocol */ function supportsProtocol( address staker, bytes4 protocol ) external view returns (bool) { return protocolsByStaker[staker].contains(protocol); } /** * @notice Return a list of all supported protocols for a given staker * @param staker account address of the staker * @return protocolList array of all the supported protocols */ function getProtocolsForStaker( address staker ) external view returns (bytes4[] memory protocolList) { EnumerableSet.Bytes32Set storage protocols = protocolsByStaker[staker]; uint256 length = protocols.length(); protocolList = new bytes4[](length); for (uint256 i = 0; i < length; i++) { protocolList[i] = bytes4(protocols.at(i)); } } /** * @notice Return a list of all stakers supporting a given protocol * @param protocol address of the protocol * @return stakers array of all stakers that support a given protocol */ function getStakersForProtocol( bytes4 protocol ) external view returns (address[] memory stakers) { EnumerableSet.AddressSet storage stakerList = stakersByProtocol[protocol]; uint256 length = stakerList.length(); stakers = new address[](length); for (uint256 i = 0; i < length; i++) { stakers[i] = stakerList.at(i); } } /** * @notice Return the staking balance of a given staker * @param staker address of the account used to stake * @return balance of the staker account */ function balanceOf(address staker) external view returns (uint256) { uint256 tokenCount = tokensByStaker[staker].length(); if (tokenCount == 0) { return 0; } return obligationCost + tokenCost * tokenCount; } }
@openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
@openzeppelin/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
@openzeppelin/contracts/utils/structs/EnumerableSet.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
Compiler Settings
{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"],"":["ast"]}},"optimizer":{"runs":999999,"enabled":true},"libraries":{}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_stakingToken","internalType":"contract IERC20"},{"type":"uint256","name":"_obligationCost","internalType":"uint256"},{"type":"uint256","name":"_tokenCost","internalType":"uint256"}]},{"type":"error","name":"NoProtocolsToAdd","inputs":[]},{"type":"error","name":"NoProtocolsToRemove","inputs":[]},{"type":"error","name":"NoTokensToAdd","inputs":[]},{"type":"error","name":"NoTokensToRemove","inputs":[]},{"type":"error","name":"ProtocolDoesNotExist","inputs":[{"type":"bytes4","name":"","internalType":"bytes4"}]},{"type":"error","name":"ProtocolExists","inputs":[{"type":"bytes4","name":"","internalType":"bytes4"}]},{"type":"error","name":"TokenDoesNotExist","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"error","name":"TokenExists","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"event","name":"AddProtocols","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"bytes4[]","name":"protocols","internalType":"bytes4[]","indexed":false}],"anonymous":false},{"type":"event","name":"AddTokens","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address[]","name":"tokens","internalType":"address[]","indexed":false}],"anonymous":false},{"type":"event","name":"FullUnstake","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"InitialStake","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RemoveProtocols","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"bytes4[]","name":"protocols","internalType":"bytes4[]","indexed":false}],"anonymous":false},{"type":"event","name":"RemoveTokens","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address[]","name":"tokens","internalType":"address[]","indexed":false}],"anonymous":false},{"type":"event","name":"SetServerURL","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"string","name":"url","internalType":"string","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addProtocols","inputs":[{"type":"bytes4[]","name":"protocols","internalType":"bytes4[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addTokens","inputs":[{"type":"address[]","name":"tokens","internalType":"address[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"staker","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes4[]","name":"protocolList","internalType":"bytes4[]"}],"name":"getProtocolsForStaker","inputs":[{"type":"address","name":"staker","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string[]","name":"urls","internalType":"string[]"}],"name":"getServerURLsForProtocol","inputs":[{"type":"bytes4","name":"protocol","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string[]","name":"urls","internalType":"string[]"}],"name":"getServerURLsForStakers","inputs":[{"type":"address[]","name":"stakers","internalType":"address[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string[]","name":"urls","internalType":"string[]"}],"name":"getServerURLsForToken","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"stakers","internalType":"address[]"}],"name":"getStakersForProtocol","inputs":[{"type":"bytes4","name":"protocol","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"stakers","internalType":"address[]"}],"name":"getStakersForToken","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"tokenList","internalType":"address[]"}],"name":"getTokensForStaker","inputs":[{"type":"address","name":"staker","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"obligationCost","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeAllProtocols","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeAllTokens","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeProtocols","inputs":[{"type":"bytes4[]","name":"protocols","internalType":"bytes4[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeTokens","inputs":[{"type":"address[]","name":"tokens","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setServerURL","inputs":[{"type":"string","name":"_url","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"stakerServerURLs","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"stakingToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsProtocol","inputs":[{"type":"address","name":"staker","internalType":"address"},{"type":"bytes4","name":"protocol","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsToken","inputs":[{"type":"address","name":"staker","internalType":"address"},{"type":"address","name":"token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenCost","inputs":[]}]
Contract Creation Code
0x60e06040523480156200001157600080fd5b506040516200299f3803806200299f83398101604081905262000034916200004e565b6001600160a01b0390921660805260a05260c05262000093565b6000806000606084860312156200006457600080fd5b83516001600160a01b03811681146200007c57600080fd5b602085015160409095015190969495509392505050565b60805160a05160c05161288f62000110600039600081816102df015281816106bb015281816109cc01528181610c110152610da70152600081816101aa0152818161059401528181610a0701528181610c3b0152610dd10152600081816102700152818161075b01528181610acb0152610e91015261288f6000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806388eac39b116100d8578063b61343421161008c578063e41e9bb211610066578063e41e9bb21461036d578063e694f11d14610380578063efff1a14146103a057600080fd5b8063b613434214610327578063bdfe729d14610347578063d75d1ba61461035a57600080fd5b8063912221d5116100bd578063912221d5146102da5780639fe1ff5d14610301578063a6dfcd491461031457600080fd5b806388eac39b146102bf5780638c5ad1b5146102c757600080fd5b80636c3824ef1161012f57806370a082311161011457806370a082311461025857806372f702f31461026b578063793cc5a1146102b757600080fd5b80636c3824ef146102325780636e8658a71461024557600080fd5b80634ae05c7d116101605780634ae05c7d146101da57806353731c69146101ef57806359b2145a1461021257600080fd5b80631593c6c11461017c5780632b24ef55146101a5575b600080fd5b61018f61018a3660046120a5565b6103b3565b60405161019c9190612155565b60405180910390f35b6101cc7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161019c565b6101ed6101e83660046120a5565b610536565b005b6102026101fd3660046121fe565b61078a565b604051901515815260200161019c565b610225610220366004612261565b6107c2565b60405161019c919061227c565b6101ed6102403660046120a5565b6108ac565b6102256102533660046122d6565b610af2565b6101cc6102663660046122d6565b610bc8565b6102927f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161019c565b6101ed610c66565b6101ed610ebe565b6101ed6102d53660046120a5565b611064565b6101cc7f000000000000000000000000000000000000000000000000000000000000000081565b61018f61030f366004612261565b61120d565b6102256103223660046122d6565b6113a7565b61033a6103353660046122d6565b61147d565b60405161019c91906122f1565b6101ed6103553660046120a5565b611517565b6101ed610368366004612304565b6116b2565b61020261037b366004612376565b611721565b61039361038e3660046122d6565b611772565b60405161019c91906123a0565b61018f6103ae3660046122d6565b611854565b6060818067ffffffffffffffff8111156103cf576103cf6123fa565b60405190808252806020026020018201604052801561040257816020015b60608152602001906001900390816103ed5790505b50915060005b8181101561052e576004600086868481811061042657610426612429565b905060200201602081019061043b91906122d6565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805461048090612458565b80601f01602080910402602001604051908101604052809291908181526020018280546104ac90612458565b80156104f95780601f106104ce576101008083540402835291602001916104f9565b820191906000526020600020905b8154815290600101906020018083116104dc57829003601f168201915b505050505083828151811061051057610510612429565b60200260200101819052508080610526906124da565b915050610408565b505092915050565b808061056e576040517fbd38c5d200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260208190526040812090610587826119e2565b6000036105dd57506040517f00000000000000000000000000000000000000000000000000000000000000009033907fb084bc494a89304dcf54b309b9692bdafd4b67539fd9dc15219bd6b82ecc61a390600090a25b60005b838110156106b45760008686838181106105fc576105fc612429565b905060200201602081019061061191906122d6565b905061061d84826119ec565b610670576040517ff49f099900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040902061069f90336119ec565b505080806106ac906124da565b9150506105e0565b506106df837f0000000000000000000000000000000000000000000000000000000000000000612512565b6106e99082612529565b90503373ffffffffffffffffffffffffffffffffffffffff167f8a4417f85fc0d82e2365afb5e344e2d731a29ce2b5a000da7857409c49d28cc2868660405161073392919061253c565b60405180910390a280156107835761078373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084611a0e565b5050505050565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081206107b99083611aea565b90505b92915050565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526003602052604081206060916107ff826119e2565b90508067ffffffffffffffff81111561081a5761081a6123fa565b604051908082528060200260200182016040528015610843578160200160208202803683370190505b50925060005b818110156108a45761085b8382611b19565b84828151811061086d5761086d612429565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101528061089c816124da565b915050610849565b505050919050565b80806108e3576040517e6571be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152602081905260408120905b828110156109c357600085858381811061091057610910612429565b905060200201602081019061092591906122d6565b90506109318382611b25565b61097f576040517ffb524a4400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610667565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604090206109ae9033611b25565b505080806109bb906124da565b9150506108f4565b5060006109f0837f0000000000000000000000000000000000000000000000000000000000000000612512565b90506109fb826119e2565b600003610a5b57610a2c7f000000000000000000000000000000000000000000000000000000000000000082612529565b60405190915033907f5145121d6af63d58cca25c9f269c9ba617dded29d84ffd18499436c7c21b3f2890600090a25b3373ffffffffffffffffffffffffffffffffffffffff167f4efa1188fb6a3db44946ac387489b6f4e29207ef0d603be528f37471525880458686604051610aa392919061253c565b60405180910390a280156107835761078373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163383611b47565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600260205260408120606091610b23826119e2565b90508067ffffffffffffffff811115610b3e57610b3e6123fa565b604051908082528060200260200182016040528015610b67578160200160208202803683370190505b50925060005b818110156108a457610b7f8382611b19565b848281518110610b9157610b91612429565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015280610bc0816124da565b915050610b6d565b73ffffffffffffffffffffffffffffffffffffffff811660009081526020819052604081208190610bf8906119e2565b905080600003610c0b5750600092915050565b610c35817f0000000000000000000000000000000000000000000000000000000000000000612512565b610c5f907f0000000000000000000000000000000000000000000000000000000000000000612529565b9392505050565b33600090815260208190526040812090610c7f826119e2565b905060008111610cba576040517e6571be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008167ffffffffffffffff811115610cd557610cd56123fa565b604051908082528060200260200182016040528015610cfe578160200160208202803683370190505b509050815b8015610d9e5780610d1381612595565b915060009050610d238583611b19565b905080838381518110610d3857610d38612429565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152610d678582611b25565b5073ffffffffffffffffffffffffffffffffffffffff81166000908152600260205260409020610d979033611b25565b5050610d03565b506000610dcb837f0000000000000000000000000000000000000000000000000000000000000000612512565b610df5907f0000000000000000000000000000000000000000000000000000000000000000612529565b60405190915033907f5145121d6af63d58cca25c9f269c9ba617dded29d84ffd18499436c7c21b3f2890600090a23373ffffffffffffffffffffffffffffffffffffffff167f4efa1188fb6a3db44946ac387489b6f4e29207ef0d603be528f374715258804583604051610e69919061227c565b60405180910390a28015610eb857610eb873ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163383611b47565b50505050565b33600090815260016020526040812090610ed7826119e2565b905060008111610f13576040517f9e912c6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008167ffffffffffffffff811115610f2e57610f2e6123fa565b604051908082528060200260200182016040528015610f57578160200160208202803683370190505b509050815b80156110105780610f6c81612595565b915060009050610f7c8583611b19565b905080838381518110610f9157610f91612429565b7fffffffff000000000000000000000000000000000000000000000000000000009283166020918202929092010152610fcd9086908316611ba2565b507fffffffff00000000000000000000000000000000000000000000000000000000811660009081526003602052604090206110099033611b25565b5050610f5c565b503373ffffffffffffffffffffffffffffffffffffffff167ff36b92d55b27d65a6f27246c581be9c79300657ff3febf83f6c5c863d063d5348260405161105791906123a0565b60405180910390a2505050565b808061109c576040517f9e912c6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600160205260408120905b828110156111b65760008585838181106110c9576110c9612429565b90506020020160208101906110de9190612261565b905061110c837fffffffff000000000000000000000000000000000000000000000000000000008316611ba2565b611166576040517f897cda2b0000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000082166004820152602401610667565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526003602052604090206111a19033611b25565b505080806111ae906124da565b9150506110ad565b503373ffffffffffffffffffffffffffffffffffffffff167ff36b92d55b27d65a6f27246c581be9c79300657ff3febf83f6c5c863d063d53485856040516111ff9291906125ca565b60405180910390a250505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116600090815260036020526040812060609161124a826119e2565b90508067ffffffffffffffff811115611265576112656123fa565b60405190808252806020026020018201604052801561129857816020015b60608152602001906001900390816112835790505b50925060005b818110156108a457600460006112b48584611b19565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080546112f990612458565b80601f016020809104026020016040519081016040528092919081815260200182805461132590612458565b80156113725780601f1061134757610100808354040283529160200191611372565b820191906000526020600020905b81548152906001019060200180831161135557829003601f168201915b505050505084828151811061138957611389612429565b6020026020010181905250808061139f906124da565b91505061129e565b73ffffffffffffffffffffffffffffffffffffffff811660009081526020819052604081206060916113d8826119e2565b90508067ffffffffffffffff8111156113f3576113f36123fa565b60405190808252806020026020018201604052801561141c578160200160208202803683370190505b50925060005b818110156108a4576114348382611b19565b84828151811061144657611446612429565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015280611475816124da565b915050611422565b6004602052600090815260409020805461149690612458565b80601f01602080910402602001604051908101604052809291908181526020018280546114c290612458565b801561150f5780601f106114e45761010080835404028352916020019161150f565b820191906000526020600020905b8154815290600101906020018083116114f257829003601f168201915b505050505081565b808061154f576040517ff73c058100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600160205260408120905b8281101561166957600085858381811061157c5761157c612429565b90506020020160208101906115919190612261565b90506115bf837fffffffff000000000000000000000000000000000000000000000000000000008316611bae565b611619576040517f801d93560000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000082166004820152602401610667565b7fffffffff000000000000000000000000000000000000000000000000000000008116600090815260036020526040902061165490336119ec565b50508080611661906124da565b915050611560565b503373ffffffffffffffffffffffffffffffffffffffff167f0a8647b9f1e07faa36b08c5b2b15ff352519f166b83880b785f6070e6797c4ee85856040516111ff9291906125ca565b3360009081526004602052604090206116cc828483612672565b503373ffffffffffffffffffffffffffffffffffffffff167f12db7eab2ab679aff1f14e6651ae7204d79798cdaaf2bd6322a14178fb9617fa838360405161171592919061278c565b60405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604081206107b9907fffffffff000000000000000000000000000000000000000000000000000000008416611bba565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604081206060916117a3826119e2565b90508067ffffffffffffffff8111156117be576117be6123fa565b6040519080825280602002602001820160405280156117e7578160200160208202803683370190505b50925060005b818110156108a4576117ff8382611b19565b84828151811061181157611811612429565b7fffffffff00000000000000000000000000000000000000000000000000000000909216602092830291909101909101528061184c816124da565b9150506117ed565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600260205260408120606091611885826119e2565b90508067ffffffffffffffff8111156118a0576118a06123fa565b6040519080825280602002602001820160405280156118d357816020015b60608152602001906001900390816118be5790505b50925060005b818110156108a457600460006118ef8584611b19565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805461193490612458565b80601f016020809104026020016040519081016040528092919081815260200182805461196090612458565b80156119ad5780601f10611982576101008083540402835291602001916119ad565b820191906000526020600020905b81548152906001019060200180831161199057829003601f168201915b50505050508482815181106119c4576119c4612429565b602002602001018190525080806119da906124da565b9150506118d9565b60006107bc825490565b60006107b98373ffffffffffffffffffffffffffffffffffffffff8416611bd2565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610eb89085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611c21565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260018301602052604081205415156107b9565b60006107b98383611d2d565b60006107b98373ffffffffffffffffffffffffffffffffffffffff8416611d57565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611b9d9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611a68565b505050565b60006107b98383611d57565b60006107b98383611bd2565b600081815260018301602052604081205415156107b9565b6000818152600183016020526040812054611c19575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107bc565b5060006107bc565b6000611c83826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611e4a9092919063ffffffff16565b805190915015611b9d5780806020019051810190611ca191906127d9565b611b9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610667565b6000826000018281548110611d4457611d44612429565b9060005260206000200154905092915050565b60008181526001830160205260408120548015611e40576000611d7b6001836127fb565b8554909150600090611d8f906001906127fb565b9050818114611df4576000866000018281548110611daf57611daf612429565b9060005260206000200154905080876000018481548110611dd257611dd2612429565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611e0557611e0561280e565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107bc565b60009150506107bc565b6060611e598484600085611e61565b949350505050565b606082471015611ef3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610667565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611f1c919061283d565b60006040518083038185875af1925050503d8060008114611f59576040519150601f19603f3d011682016040523d82523d6000602084013e611f5e565b606091505b5091509150611f6f87838387611f7a565b979650505050505050565b606083156120105782516000036120095773ffffffffffffffffffffffffffffffffffffffff85163b612009576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610667565b5081611e59565b611e5983838151156120255781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066791906122f1565b60008083601f84011261206b57600080fd5b50813567ffffffffffffffff81111561208357600080fd5b6020830191508360208260051b850101111561209e57600080fd5b9250929050565b600080602083850312156120b857600080fd5b823567ffffffffffffffff8111156120cf57600080fd5b6120db85828601612059565b90969095509350505050565b60005b838110156121025781810151838201526020016120ea565b50506000910152565b600081518084526121238160208601602086016120e7565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156121c8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526121b685835161210b565b9450928501929085019060010161217c565b5092979650505050505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146121f957600080fd5b919050565b6000806040838503121561221157600080fd5b61221a836121d5565b9150612228602084016121d5565b90509250929050565b80357fffffffff00000000000000000000000000000000000000000000000000000000811681146121f957600080fd5b60006020828403121561227357600080fd5b6107b982612231565b6020808252825182820181905260009190848201906040850190845b818110156122ca57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101612298565b50909695505050505050565b6000602082840312156122e857600080fd5b6107b9826121d5565b6020815260006107b9602083018461210b565b6000806020838503121561231757600080fd5b823567ffffffffffffffff8082111561232f57600080fd5b818501915085601f83011261234357600080fd5b81358181111561235257600080fd5b86602082850101111561236457600080fd5b60209290920196919550909350505050565b6000806040838503121561238957600080fd5b612392836121d5565b915061222860208401612231565b6020808252825182820181905260009190848201906040850190845b818110156122ca5783517fffffffff0000000000000000000000000000000000000000000000000000000016835292840192918401916001016123bc565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c9082168061246c57607f821691505b6020821081036124a5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361250b5761250b6124ab565b5060010190565b80820281158282048414176107bc576107bc6124ab565b808201808211156107bc576107bc6124ab565b60208082528181018390526000908460408401835b8681101561258a5773ffffffffffffffffffffffffffffffffffffffff612577846121d5565b1682529183019190830190600101612551565b509695505050505050565b6000816125a4576125a46124ab565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60208082528181018390526000908460408401835b8681101561258a577fffffffff0000000000000000000000000000000000000000000000000000000061261184612231565b16825291830191908301906001016125df565b601f821115611b9d57600081815260208120601f850160051c8101602086101561264b5750805b601f850160051c820191505b8181101561266a57828155600101612657565b505050505050565b67ffffffffffffffff83111561268a5761268a6123fa565b61269e836126988354612458565b83612624565b6000601f8411600181146126f057600085156126ba5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610783565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b8281101561273f578685013582556020948501946001909201910161271f565b508682101561277a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b6000602082840312156127eb57600080fd5b81518015158114610c5f57600080fd5b818103818111156107bc576107bc6124ab565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000825161284f8184602087016120e7565b919091019291505056fea2646970667358221220eec50a0f66c8dce2aafd035949d713730e9a8a485a3521b3a068e78ae03c9bbc64736f6c634300081100330000000000000000000000002c1b868d6596a18e32e61b901e4060c872647b6c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101775760003560e01c806388eac39b116100d8578063b61343421161008c578063e41e9bb211610066578063e41e9bb21461036d578063e694f11d14610380578063efff1a14146103a057600080fd5b8063b613434214610327578063bdfe729d14610347578063d75d1ba61461035a57600080fd5b8063912221d5116100bd578063912221d5146102da5780639fe1ff5d14610301578063a6dfcd491461031457600080fd5b806388eac39b146102bf5780638c5ad1b5146102c757600080fd5b80636c3824ef1161012f57806370a082311161011457806370a082311461025857806372f702f31461026b578063793cc5a1146102b757600080fd5b80636c3824ef146102325780636e8658a71461024557600080fd5b80634ae05c7d116101605780634ae05c7d146101da57806353731c69146101ef57806359b2145a1461021257600080fd5b80631593c6c11461017c5780632b24ef55146101a5575b600080fd5b61018f61018a3660046120a5565b6103b3565b60405161019c9190612155565b60405180910390f35b6101cc7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161019c565b6101ed6101e83660046120a5565b610536565b005b6102026101fd3660046121fe565b61078a565b604051901515815260200161019c565b610225610220366004612261565b6107c2565b60405161019c919061227c565b6101ed6102403660046120a5565b6108ac565b6102256102533660046122d6565b610af2565b6101cc6102663660046122d6565b610bc8565b6102927f0000000000000000000000002c1b868d6596a18e32e61b901e4060c872647b6c81565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161019c565b6101ed610c66565b6101ed610ebe565b6101ed6102d53660046120a5565b611064565b6101cc7f000000000000000000000000000000000000000000000000000000000000000081565b61018f61030f366004612261565b61120d565b6102256103223660046122d6565b6113a7565b61033a6103353660046122d6565b61147d565b60405161019c91906122f1565b6101ed6103553660046120a5565b611517565b6101ed610368366004612304565b6116b2565b61020261037b366004612376565b611721565b61039361038e3660046122d6565b611772565b60405161019c91906123a0565b61018f6103ae3660046122d6565b611854565b6060818067ffffffffffffffff8111156103cf576103cf6123fa565b60405190808252806020026020018201604052801561040257816020015b60608152602001906001900390816103ed5790505b50915060005b8181101561052e576004600086868481811061042657610426612429565b905060200201602081019061043b91906122d6565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805461048090612458565b80601f01602080910402602001604051908101604052809291908181526020018280546104ac90612458565b80156104f95780601f106104ce576101008083540402835291602001916104f9565b820191906000526020600020905b8154815290600101906020018083116104dc57829003601f168201915b505050505083828151811061051057610510612429565b60200260200101819052508080610526906124da565b915050610408565b505092915050565b808061056e576040517fbd38c5d200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260208190526040812090610587826119e2565b6000036105dd57506040517f00000000000000000000000000000000000000000000000000000000000000009033907fb084bc494a89304dcf54b309b9692bdafd4b67539fd9dc15219bd6b82ecc61a390600090a25b60005b838110156106b45760008686838181106105fc576105fc612429565b905060200201602081019061061191906122d6565b905061061d84826119ec565b610670576040517ff49f099900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040902061069f90336119ec565b505080806106ac906124da565b9150506105e0565b506106df837f0000000000000000000000000000000000000000000000000000000000000000612512565b6106e99082612529565b90503373ffffffffffffffffffffffffffffffffffffffff167f8a4417f85fc0d82e2365afb5e344e2d731a29ce2b5a000da7857409c49d28cc2868660405161073392919061253c565b60405180910390a280156107835761078373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002c1b868d6596a18e32e61b901e4060c872647b6c16333084611a0e565b5050505050565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081206107b99083611aea565b90505b92915050565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526003602052604081206060916107ff826119e2565b90508067ffffffffffffffff81111561081a5761081a6123fa565b604051908082528060200260200182016040528015610843578160200160208202803683370190505b50925060005b818110156108a45761085b8382611b19565b84828151811061086d5761086d612429565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101528061089c816124da565b915050610849565b505050919050565b80806108e3576040517e6571be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152602081905260408120905b828110156109c357600085858381811061091057610910612429565b905060200201602081019061092591906122d6565b90506109318382611b25565b61097f576040517ffb524a4400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610667565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604090206109ae9033611b25565b505080806109bb906124da565b9150506108f4565b5060006109f0837f0000000000000000000000000000000000000000000000000000000000000000612512565b90506109fb826119e2565b600003610a5b57610a2c7f000000000000000000000000000000000000000000000000000000000000000082612529565b60405190915033907f5145121d6af63d58cca25c9f269c9ba617dded29d84ffd18499436c7c21b3f2890600090a25b3373ffffffffffffffffffffffffffffffffffffffff167f4efa1188fb6a3db44946ac387489b6f4e29207ef0d603be528f37471525880458686604051610aa392919061253c565b60405180910390a280156107835761078373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002c1b868d6596a18e32e61b901e4060c872647b6c163383611b47565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600260205260408120606091610b23826119e2565b90508067ffffffffffffffff811115610b3e57610b3e6123fa565b604051908082528060200260200182016040528015610b67578160200160208202803683370190505b50925060005b818110156108a457610b7f8382611b19565b848281518110610b9157610b91612429565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015280610bc0816124da565b915050610b6d565b73ffffffffffffffffffffffffffffffffffffffff811660009081526020819052604081208190610bf8906119e2565b905080600003610c0b5750600092915050565b610c35817f0000000000000000000000000000000000000000000000000000000000000000612512565b610c5f907f0000000000000000000000000000000000000000000000000000000000000000612529565b9392505050565b33600090815260208190526040812090610c7f826119e2565b905060008111610cba576040517e6571be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008167ffffffffffffffff811115610cd557610cd56123fa565b604051908082528060200260200182016040528015610cfe578160200160208202803683370190505b509050815b8015610d9e5780610d1381612595565b915060009050610d238583611b19565b905080838381518110610d3857610d38612429565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152610d678582611b25565b5073ffffffffffffffffffffffffffffffffffffffff81166000908152600260205260409020610d979033611b25565b5050610d03565b506000610dcb837f0000000000000000000000000000000000000000000000000000000000000000612512565b610df5907f0000000000000000000000000000000000000000000000000000000000000000612529565b60405190915033907f5145121d6af63d58cca25c9f269c9ba617dded29d84ffd18499436c7c21b3f2890600090a23373ffffffffffffffffffffffffffffffffffffffff167f4efa1188fb6a3db44946ac387489b6f4e29207ef0d603be528f374715258804583604051610e69919061227c565b60405180910390a28015610eb857610eb873ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002c1b868d6596a18e32e61b901e4060c872647b6c163383611b47565b50505050565b33600090815260016020526040812090610ed7826119e2565b905060008111610f13576040517f9e912c6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008167ffffffffffffffff811115610f2e57610f2e6123fa565b604051908082528060200260200182016040528015610f57578160200160208202803683370190505b509050815b80156110105780610f6c81612595565b915060009050610f7c8583611b19565b905080838381518110610f9157610f91612429565b7fffffffff000000000000000000000000000000000000000000000000000000009283166020918202929092010152610fcd9086908316611ba2565b507fffffffff00000000000000000000000000000000000000000000000000000000811660009081526003602052604090206110099033611b25565b5050610f5c565b503373ffffffffffffffffffffffffffffffffffffffff167ff36b92d55b27d65a6f27246c581be9c79300657ff3febf83f6c5c863d063d5348260405161105791906123a0565b60405180910390a2505050565b808061109c576040517f9e912c6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600160205260408120905b828110156111b65760008585838181106110c9576110c9612429565b90506020020160208101906110de9190612261565b905061110c837fffffffff000000000000000000000000000000000000000000000000000000008316611ba2565b611166576040517f897cda2b0000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000082166004820152602401610667565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526003602052604090206111a19033611b25565b505080806111ae906124da565b9150506110ad565b503373ffffffffffffffffffffffffffffffffffffffff167ff36b92d55b27d65a6f27246c581be9c79300657ff3febf83f6c5c863d063d53485856040516111ff9291906125ca565b60405180910390a250505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116600090815260036020526040812060609161124a826119e2565b90508067ffffffffffffffff811115611265576112656123fa565b60405190808252806020026020018201604052801561129857816020015b60608152602001906001900390816112835790505b50925060005b818110156108a457600460006112b48584611b19565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080546112f990612458565b80601f016020809104026020016040519081016040528092919081815260200182805461132590612458565b80156113725780601f1061134757610100808354040283529160200191611372565b820191906000526020600020905b81548152906001019060200180831161135557829003601f168201915b505050505084828151811061138957611389612429565b6020026020010181905250808061139f906124da565b91505061129e565b73ffffffffffffffffffffffffffffffffffffffff811660009081526020819052604081206060916113d8826119e2565b90508067ffffffffffffffff8111156113f3576113f36123fa565b60405190808252806020026020018201604052801561141c578160200160208202803683370190505b50925060005b818110156108a4576114348382611b19565b84828151811061144657611446612429565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015280611475816124da565b915050611422565b6004602052600090815260409020805461149690612458565b80601f01602080910402602001604051908101604052809291908181526020018280546114c290612458565b801561150f5780601f106114e45761010080835404028352916020019161150f565b820191906000526020600020905b8154815290600101906020018083116114f257829003601f168201915b505050505081565b808061154f576040517ff73c058100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600160205260408120905b8281101561166957600085858381811061157c5761157c612429565b90506020020160208101906115919190612261565b90506115bf837fffffffff000000000000000000000000000000000000000000000000000000008316611bae565b611619576040517f801d93560000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000082166004820152602401610667565b7fffffffff000000000000000000000000000000000000000000000000000000008116600090815260036020526040902061165490336119ec565b50508080611661906124da565b915050611560565b503373ffffffffffffffffffffffffffffffffffffffff167f0a8647b9f1e07faa36b08c5b2b15ff352519f166b83880b785f6070e6797c4ee85856040516111ff9291906125ca565b3360009081526004602052604090206116cc828483612672565b503373ffffffffffffffffffffffffffffffffffffffff167f12db7eab2ab679aff1f14e6651ae7204d79798cdaaf2bd6322a14178fb9617fa838360405161171592919061278c565b60405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604081206107b9907fffffffff000000000000000000000000000000000000000000000000000000008416611bba565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604081206060916117a3826119e2565b90508067ffffffffffffffff8111156117be576117be6123fa565b6040519080825280602002602001820160405280156117e7578160200160208202803683370190505b50925060005b818110156108a4576117ff8382611b19565b84828151811061181157611811612429565b7fffffffff00000000000000000000000000000000000000000000000000000000909216602092830291909101909101528061184c816124da565b9150506117ed565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600260205260408120606091611885826119e2565b90508067ffffffffffffffff8111156118a0576118a06123fa565b6040519080825280602002602001820160405280156118d357816020015b60608152602001906001900390816118be5790505b50925060005b818110156108a457600460006118ef8584611b19565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805461193490612458565b80601f016020809104026020016040519081016040528092919081815260200182805461196090612458565b80156119ad5780601f10611982576101008083540402835291602001916119ad565b820191906000526020600020905b81548152906001019060200180831161199057829003601f168201915b50505050508482815181106119c4576119c4612429565b602002602001018190525080806119da906124da565b9150506118d9565b60006107bc825490565b60006107b98373ffffffffffffffffffffffffffffffffffffffff8416611bd2565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610eb89085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611c21565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260018301602052604081205415156107b9565b60006107b98383611d2d565b60006107b98373ffffffffffffffffffffffffffffffffffffffff8416611d57565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611b9d9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611a68565b505050565b60006107b98383611d57565b60006107b98383611bd2565b600081815260018301602052604081205415156107b9565b6000818152600183016020526040812054611c19575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107bc565b5060006107bc565b6000611c83826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611e4a9092919063ffffffff16565b805190915015611b9d5780806020019051810190611ca191906127d9565b611b9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610667565b6000826000018281548110611d4457611d44612429565b9060005260206000200154905092915050565b60008181526001830160205260408120548015611e40576000611d7b6001836127fb565b8554909150600090611d8f906001906127fb565b9050818114611df4576000866000018281548110611daf57611daf612429565b9060005260206000200154905080876000018481548110611dd257611dd2612429565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611e0557611e0561280e565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107bc565b60009150506107bc565b6060611e598484600085611e61565b949350505050565b606082471015611ef3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610667565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611f1c919061283d565b60006040518083038185875af1925050503d8060008114611f59576040519150601f19603f3d011682016040523d82523d6000602084013e611f5e565b606091505b5091509150611f6f87838387611f7a565b979650505050505050565b606083156120105782516000036120095773ffffffffffffffffffffffffffffffffffffffff85163b612009576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610667565b5081611e59565b611e5983838151156120255781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066791906122f1565b60008083601f84011261206b57600080fd5b50813567ffffffffffffffff81111561208357600080fd5b6020830191508360208260051b850101111561209e57600080fd5b9250929050565b600080602083850312156120b857600080fd5b823567ffffffffffffffff8111156120cf57600080fd5b6120db85828601612059565b90969095509350505050565b60005b838110156121025781810151838201526020016120ea565b50506000910152565b600081518084526121238160208601602086016120e7565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156121c8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526121b685835161210b565b9450928501929085019060010161217c565b5092979650505050505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146121f957600080fd5b919050565b6000806040838503121561221157600080fd5b61221a836121d5565b9150612228602084016121d5565b90509250929050565b80357fffffffff00000000000000000000000000000000000000000000000000000000811681146121f957600080fd5b60006020828403121561227357600080fd5b6107b982612231565b6020808252825182820181905260009190848201906040850190845b818110156122ca57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101612298565b50909695505050505050565b6000602082840312156122e857600080fd5b6107b9826121d5565b6020815260006107b9602083018461210b565b6000806020838503121561231757600080fd5b823567ffffffffffffffff8082111561232f57600080fd5b818501915085601f83011261234357600080fd5b81358181111561235257600080fd5b86602082850101111561236457600080fd5b60209290920196919550909350505050565b6000806040838503121561238957600080fd5b612392836121d5565b915061222860208401612231565b6020808252825182820181905260009190848201906040850190845b818110156122ca5783517fffffffff0000000000000000000000000000000000000000000000000000000016835292840192918401916001016123bc565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c9082168061246c57607f821691505b6020821081036124a5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361250b5761250b6124ab565b5060010190565b80820281158282048414176107bc576107bc6124ab565b808201808211156107bc576107bc6124ab565b60208082528181018390526000908460408401835b8681101561258a5773ffffffffffffffffffffffffffffffffffffffff612577846121d5565b1682529183019190830190600101612551565b509695505050505050565b6000816125a4576125a46124ab565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60208082528181018390526000908460408401835b8681101561258a577fffffffff0000000000000000000000000000000000000000000000000000000061261184612231565b16825291830191908301906001016125df565b601f821115611b9d57600081815260208120601f850160051c8101602086101561264b5750805b601f850160051c820191505b8181101561266a57828155600101612657565b505050505050565b67ffffffffffffffff83111561268a5761268a6123fa565b61269e836126988354612458565b83612624565b6000601f8411600181146126f057600085156126ba5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610783565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b8281101561273f578685013582556020948501946001909201910161271f565b508682101561277a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b6000602082840312156127eb57600080fd5b81518015158114610c5f57600080fd5b818103818111156107bc576107bc6124ab565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000825161284f8184602087016120e7565b919091019291505056fea2646970667358221220eec50a0f66c8dce2aafd035949d713730e9a8a485a3521b3a068e78ae03c9bbc64736f6c63430008110033