Contract Overview
Balance:
0 BTT
My Name Tag:
Not Available
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0xe0cb0c05bdf19ebea61cc64974c2310e151a2fa4f8be83ba7ebf8d112e09da13 | Set Manager | 21929824 | 27 days 22 hrs ago | 0x997ebeee6e89de030880cad6d604465549277cc9 | IN | 0x426cd528badfcd75c496b4260f784ce0fda28b2a | 0 BTT | 424.539 | |
0x76f499fa88264382131b1163d76b9e6ee4885b6c7579828647169cac04669f97 | 0x60806040 | 21929750 | 27 days 22 hrs ago | 0x997ebeee6e89de030880cad6d604465549277cc9 | IN | Create: ElkSingleStakeFactory | 0 BTT | 39,189.195 |
[ Download CSV Export ]
Contract Source Code Verified (Exact Match)
Contract Name:
ElkSingleStakeFactory
Compiler Version
v0.8.19+commit.7dd6d404
Contract Source Code (Solidity)
/** *Submitted for verification at testnet.bttcscan.com on 2023-05-11 */ // SPDX-License-Identifier: BUSL-1.1 // // Copyright (c) 2023 ElkLabs // License terms: https://github.com/elkfinance/faas/blob/main/LICENSE // // Authors: // - Seth <[email protected]> // - Baal <[email protected]> // - Elijah <[email protected]> // - Snake <[email protected]> // File: contracts/interfaces/ISingleStakeFactory.sol // // Copyright (c) 2023 ElkLabs // License terms: https://github.com/elkfinance/faas/blob/main/LICENSE // // Authors: // - Seth <[email protected]> // - Baal <[email protected]> pragma solidity >=0.8.0; interface ISingleStakeFactory { event ContractCreated(address _newContract); event ManagerSet(address _farmManager); event FeeSet(uint256 _newFee); event FeesRecovered(uint256 _balanceRecovered); function getSingleStake( address _creator, address _stakingToken ) external view returns (address); function allFarms(uint _index) external view returns (address); function farmManager() external view returns (address); function getCreator(address _farmAddress) external view returns (address); function fee() external view returns (uint256); function maxFee() external view returns (uint256); function createNewSingleStake( address _stakingTokenAddress, address[] memory _rewardTokenAddresses, uint256 _rewardsDuration, uint16 _depositFeeBps, uint16[] memory _withdrawalFeesBps, uint32[] memory _withdrawalFeeSchedule ) external; function allFarmsLength() external view returns (uint); function setManager(address _managerAddress) external; function setFee(uint256 _newFee) external; function withdrawFees() external; function overrideOwnership(address _farmAddress) external; } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.8.0/contracts/security/ReentrancyGuard.sol // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.8.0/contracts/utils/Address.sol // 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); } } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.8.0/contracts/token/ERC20/extensions/draft-IERC20Permit.sol // 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); } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.8.0/contracts/token/ERC20/IERC20.sol // 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); } // File: contracts/interfaces/IStaking.sol // // Copyright (c) 2023 ElkLabs // License terms: https://github.com/elkfinance/faas/blob/main/LICENSE // // Authors: // - Seth <[email protected]> // - Baal <[email protected]> pragma solidity >=0.8.0; interface IStaking { /* ========== STATE VARIABLES ========== */ function stakingToken() external returns (IERC20); function totalSupply() external returns (uint256); function balances(address _account) external returns (uint256); /* ========== MUTATIVE FUNCTIONS ========== */ function stake(uint256 _amount) external; function withdraw(uint256 _amount) external; function exit() external; function recoverERC20( address _tokenAddress, address _recipient, uint256 _amount ) external; /* ========== EVENTS ========== */ // Emitted on staking event Staked(address indexed account, uint256 amount); // Emitted on withdrawal (including exit) event Withdrawn(address indexed account, uint256 amount); // Emitted on token recovery event Recovered( address indexed token, address indexed recipient, uint256 amount ); } // File: contracts/interfaces/IStakingFee.sol // // Copyright (c) 2023 ElkLabs // License terms: https://github.com/elkfinance/faas/blob/main/LICENSE // // Authors: // - Seth <[email protected]> // - Baal <[email protected]> pragma solidity >=0.8.0; interface IStakingFee is IStaking { /* ========== STATE VARIABLES ========== */ function feesUnit() external returns (uint256); function maxFee() external returns (uint256); function withdrawalFeeSchedule(uint256) external returns (uint256); function withdrawalFeesBps(uint256) external returns (uint256); function depositFeeBps() external returns (uint256); function collectedFees() external returns (uint256); function userLastStakedTime(address _user) external view returns (uint32); /* ========== VIEWS ========== */ function depositFee(uint256 _depositAmount) external view returns (uint256); function withdrawalFee( address _account, uint256 _withdrawalAmount ) external view returns (uint256); /* ========== MUTATIVE FUNCTIONS ========== */ function recoverFees(address _recipient) external; function setFees( uint16 _depositFeeBps, uint16[] memory _withdrawalFeesBps, uint32[] memory _withdrawalFeeSchedule ) external; /* ========== EVENTS ========== */ // Emitted when fees are (re)configured event FeesSet( uint16 _depositFeeBps, uint16[] _withdrawalFeesBps, uint32[] _feeSchedule ); // Emitted when a deposit fee is collected event DepositFeesCollected(address indexed _user, uint256 _amount); // Emitted when a withdrawal fee is collected event WithdrawalFeesCollected(address indexed _user, uint256 _amount); // Emitted when fees are recovered by governance event FeesRecovered(uint256 _amount); } // File: contracts/interfaces/IStakingRewards.sol // // Copyright (c) 2023 ElkLabs // License terms: https://github.com/elkfinance/faas/blob/main/LICENSE // // Authors: // - Seth <[email protected]> // - Baal <[email protected]> pragma solidity >=0.8.0; interface IStakingRewards is IStakingFee { /* ========== STATE VARIABLES ========== */ function rewardTokens(uint256) external view returns (IERC20); function rewardTokenAddresses( address _rewardAddress ) external view returns (bool); function periodFinish() external view returns (uint256); function rewardsDuration() external view returns (uint256); function lastUpdateTime() external view returns (uint256); function rewardRates( address _rewardAddress ) external view returns (uint256); function rewardPerTokenStored( address _rewardAddress ) external view returns (uint256); // wallet address => token address => amount function userRewardPerTokenPaid( address _walletAddress, address _tokenAddress ) external view returns (uint256); function rewards( address _walletAddress, address _tokenAddress ) external view returns (uint256); /* ========== VIEWS ========== */ function lastTimeRewardApplicable() external view returns (uint256); function rewardPerToken( address _tokenAddress ) external view returns (uint256); function earned( address _tokenAddress, address _account ) external view returns (uint256); /* ========== MUTATIVE FUNCTIONS ========== */ function getReward(address _tokenAddress, address _recipient) external; function getRewards(address _recipient) external; // Must send reward before calling this! function startEmission( uint256[] memory _rewards, uint256 _duration ) external; function stopEmission(address _refundAddress) external; function recoverLeftoverReward( address _tokenAddress, address _recipient ) external; function addRewardToken(address _tokenAddress) external; function rewardTokenIndex( address _tokenAddress ) external view returns (int8); /* ========== EVENTS ========== */ // Emitted when a reward is paid to an account event RewardPaid( address indexed _token, address indexed _account, uint256 _reward ); // Emitted when a leftover reward is recovered event LeftoverRewardRecovered(address indexed _recipient, uint256 _amount); // Emitted when rewards emission is started event RewardsEmissionStarted(uint256[] _rewards, uint256 _duration); // Emitted when rewards emission ends event RewardsEmissionEnded(); } // File: contracts/interfaces/ISingleStakingRewards.sol // // Copyright (c) 2023 ElkLabs // License terms: https://github.com/elkfinance/faas/blob/main/LICENSE // // Authors: // - Seth <[email protected]> // - Baal <[email protected]> pragma solidity >=0.8.0; interface ISingleStakingRewards is IStakingRewards { event CompoundedReward(uint256 oldBalance, uint256 newBalance); function compoundSingleStakingRewards() external; } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.8.0/contracts/token/ERC20/utils/SafeERC20.sol // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; /** * @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"); } } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.8.0/contracts/utils/Context.sol // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.8.0/contracts/access/Ownable.sol // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File: contracts/Staking.sol // // Copyright (c) 2023 ElkLabs // License terms: https://github.com/elkfinance/faas/blob/main/LICENSE // // Authors: // - Seth <[email protected]> // - Baal <[email protected]> // - Elijah <[email protected]> // - Snake <[email protected]> pragma solidity >=0.8.0; /** * Base contract implementing simple ERC20 token staking functionality (no staking rewards). */ contract Staking is ReentrancyGuard, Ownable, IStaking { using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ /// @notice Staking token interface IERC20 public immutable stakingToken; /// @notice Total supply of the staking token uint256 public totalSupply; /// @notice Account balances mapping(address => uint256) public balances; /* ========== CONSTRUCTOR ========== */ /// @param _stakingTokenAddress address of the token used for staking (must be ERC20) constructor(address _stakingTokenAddress) { require(_stakingTokenAddress != address(0), "E1"); stakingToken = IERC20(_stakingTokenAddress); } /** * @dev Stake tokens. * Note: the contract must have sufficient allowance for the staking token. * @param _amount amount to stake */ function stake(uint256 _amount) public nonReentrant { uint256 originalAmount = _amount; _amount = _beforeStake(msg.sender, _amount); require(_amount > 0 && originalAmount > 0, "E2"); // Check after the hook totalSupply += _amount; balances[msg.sender] += _amount; stakingToken.safeTransferFrom(msg.sender, address(this), originalAmount); emit Staked(msg.sender, _amount); } /** * @dev Withdraw previously staked tokens. * @param _amount amount to withdraw */ function withdraw(uint256 _amount) public nonReentrant { uint256 originalAmount = _amount; _amount = _beforeWithdraw(msg.sender, _amount); require( _amount > 0 && _amount <= balances[msg.sender] && originalAmount <= balances[msg.sender], "E3" ); // Check after the hook totalSupply -= originalAmount; balances[msg.sender] -= originalAmount; stakingToken.safeTransfer(msg.sender, _amount); emit Withdrawn(msg.sender, _amount); } /** * @dev Exit the farm, i.e., withdraw the entire token balance of the calling account */ function exit() external { _beforeExit(msg.sender); withdraw(balances[msg.sender]); } /* ========== RESTRICTED FUNCTIONS ========== */ /** * @dev Recover ERC20 tokens held in the contract. * Note: privileged governance function to recover tokens mistakenly sent to this contract address. * This function cannot be used to withdraw staking tokens. * @param _tokenAddress address of the token to recover * @param _recipient recovery address * @param _amount amount to withdraw * @ return withdrawn amount (may differ from input amount due to e.g., fees) */ function recoverERC20( address _tokenAddress, address _recipient, uint256 _amount ) external nonReentrant onlyOwner { require( _tokenAddress != address(stakingToken), "E4" ); _beforeRecoverERC20(_tokenAddress, _recipient, _amount); IERC20 token = IERC20(_tokenAddress); token.safeTransfer(_recipient, _amount); emit Recovered(_tokenAddress, _recipient, _amount); } /* ========== HOOKS ========== */ /** * @dev Internal hook called before staking (in the stake() function). * @ param _account staker address * @param _amount amount being staken * @return amount to stake (may be changed by the hook) */ function _beforeStake( address /*_account*/, uint256 _amount ) internal virtual returns (uint256) { return _amount; } /** * @dev Internal hook called before withdrawing (in the withdraw() function). * @ param _account withdrawer address * @param _amount amount being withdrawn * @return amount to withdraw (may be changed by the hook) */ function _beforeWithdraw( address /*_account*/, uint256 _amount ) internal virtual returns (uint256) { return _amount; } /** * @dev Internal hook called before exiting (in the exit() function). * Note: since exit() calls withdraw() internally, the _beforeWithdraw() hook fill fire too. * @param _account address exiting */ function _beforeExit(address _account) internal virtual {} /** * @dev Internal hook called before recovering tokens (in the recoverERC20() function). * @param _tokenAddress address of the token being recovered * @param _recipient recovery address * @param _amount amount being withdrawn */ function _beforeRecoverERC20( address _tokenAddress, address _recipient, uint256 _amount ) internal virtual {} } // File: contracts/StakingFee.sol // // Copyright (c) 2023 ElkLabs // License terms: https://github.com/elkfinance/faas/blob/main/LICENSE // // Authors: // - Seth <[email protected]> // - Baal <[email protected]> // - Elijah <[email protected]> // - Snake <[email protected]> pragma solidity >=0.8.0; /** * Contract implementing simple ERC20 token staking functionality and supporting deposit/withdrawal fees (no staking rewards). */ contract StakingFee is Staking, IStakingFee { using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ /// @notice Constant Fee Unit (1e4) uint256 public constant feesUnit = 10000; /// @notice Maximum fee (20%) uint256 public constant maxFee = 2000; /// @notice Schedule of withdrawal fees represented as a sorted array of durations /// @dev example: 10% after 1 hour, 1% after a day, 0% after a week => [3600, 86400] uint256[] public withdrawalFeeSchedule; /// @notice Withdrawal fees described in basis points (fee unit) represented as an array of the same length as withdrawalFeeSchedule /// @dev example: 10% after 1 hour, 1% after a day, 0% after a week => [1000, 100] uint256[] public withdrawalFeesBps; /// @notice Deposit (staking) fee in basis points (fee unit) uint256 public depositFeeBps; /// @notice Counter of collected fees uint256 public collectedFees; /// @notice Last staking time for each user mapping(address => uint32) public userLastStakedTime; /* ========== CONSTRUCTOR ========== */ /** * @param _stakingTokenAddress address of the token used for staking (must be ERC20) * @param _depositFeeBps deposit fee in basis points * @param _withdrawalFeesBps aligned to fee schedule * @param _withdrawalFeeSchedule assumes a sorted array */ constructor( address _stakingTokenAddress, uint16 _depositFeeBps, uint16[] memory _withdrawalFeesBps, uint32[] memory _withdrawalFeeSchedule ) Staking(_stakingTokenAddress) { setFees(_depositFeeBps, _withdrawalFeesBps, _withdrawalFeeSchedule); } /* ========== VIEWS ========== */ /** * @dev Calculate the deposit fee for a given amount. * @param _depositAmount amount to stake * @return fee paid upon deposit */ function depositFee(uint256 _depositAmount) public view returns (uint256) { return depositFeeBps > 0 ? (_depositAmount * depositFeeBps) / feesUnit : 0; } /** * @dev Calculate the withdrawal fee for a given amount. * @param _account user wallet address * @param _withdrawalAmount amount to withdraw * @return fee paid upon withdrawal */ function withdrawalFee( address _account, uint256 _withdrawalAmount ) public view returns (uint256) { uint256 userLastStakedTimestampDiff = block.timestamp - userLastStakedTime[_account]; uint256 withdrawalFeeAmount; for (uint i = 0; i < withdrawalFeeSchedule.length; ++i) { if (userLastStakedTimestampDiff < withdrawalFeeSchedule[i]) { withdrawalFeeAmount = (_withdrawalAmount * withdrawalFeesBps[i]) / feesUnit; break; } } return withdrawalFeeAmount; } /* ========== RESTRICTED FUNCTIONS ========== */ /** * @dev Recover collected fees held in the contract. * Note: privileged function for governance * @param _recipient fee recovery address */ function recoverFees(address _recipient) external onlyOwner nonReentrant { _beforeRecoverFees(_recipient); uint256 previousFees = collectedFees; collectedFees = 0; emit FeesRecovered(previousFees); stakingToken.safeTransfer(_recipient, previousFees); } /** * @dev Configure the fees for this contract. * @param _depositFeeBps deposit fee in basis points * @param _withdrawalFeesBps withdrawal fees in basis points * @param _withdrawalFeeSchedule withdrawal fees schedule */ function setFees( uint16 _depositFeeBps, uint16[] memory _withdrawalFeesBps, uint32[] memory _withdrawalFeeSchedule ) public onlyOwner { _beforeSetFees(); require(_withdrawalFeeSchedule.length == _withdrawalFeesBps.length && _withdrawalFeeSchedule.length <= 10 && _depositFeeBps <= maxFee, "E5"); uint32 lastFeeSchedule = 0; uint256 lastWithdrawalFee = maxFee + 1; for (uint i = 0; i < _withdrawalFeeSchedule.length; ++i) { require(_withdrawalFeeSchedule[i] > lastFeeSchedule, "E7"); require(_withdrawalFeesBps[i] < lastWithdrawalFee, "E8"); lastFeeSchedule = _withdrawalFeeSchedule[i]; lastWithdrawalFee = _withdrawalFeesBps[i]; } withdrawalFeeSchedule = _withdrawalFeeSchedule; withdrawalFeesBps = _withdrawalFeesBps; depositFeeBps = _depositFeeBps; emit FeesSet( _depositFeeBps, _withdrawalFeesBps, _withdrawalFeeSchedule ); } /* ========== HOOKS ========== */ /** * @dev Override _beforeStake() hook to collect the deposit fee and update associated state */ function _beforeStake( address _account, uint256 _amount ) internal virtual override returns (uint256) { uint256 fee = depositFee(_amount); userLastStakedTime[_account] = uint32(block.timestamp); if (fee > 0) { collectedFees += fee; emit DepositFeesCollected(_account, fee); } return super._beforeStake(_account, _amount - fee); } /** * @dev Override _beforeWithdrawl() hook to collect the withdrawal fee and update associated state */ function _beforeWithdraw( address _account, uint256 _amount ) internal virtual override returns (uint256) { uint256 fee = withdrawalFee(_account, _amount); if (fee > 0) { collectedFees += fee; emit WithdrawalFeesCollected(_account, fee); } return super._beforeWithdraw(_account, _amount - fee); } /** * @dev Internal hook called before recovering fees (in the recoverFees() function). * @param _recipient recovery address */ function _beforeRecoverFees(address _recipient) internal virtual {} /** * @dev Internal hook called before setting fees (in the setFees() function). */ function _beforeSetFees() internal virtual {} } // File: contracts/StakingRewards.sol // // Copyright (c) 2023 ElkLabs // License terms: https://github.com/elkfinance/faas/blob/main/LICENSE // // Authors: // - Seth <[email protected]> // - Baal <[email protected]> // - Elijah <[email protected]> // - Snake <[email protected]> pragma solidity >=0.8.0; /** * Contract implementing simple ERC20 token staking functionality with staking rewards and deposit/withdrawal fees. */ contract StakingRewards is StakingFee, IStakingRewards { using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ /// @notice List of reward token interfaces IERC20[] public rewardTokens; /// @notice Reward token addresses (maps every reward token address to true, others to false) mapping(address => bool) public rewardTokenAddresses; /// @notice Timestamp when rewards stop emitting uint256 public periodFinish; /// @notice Duration for reward emission uint256 public rewardsDuration; /// @notice Last time the rewards were updated uint256 public lastUpdateTime; /// @notice Reward token rates (maps every reward token to an emission rate, i.e., how many tokens emitted per second) mapping(address => uint256) public rewardRates; /// @notice How many tokens are emitted per staked token mapping(address => uint256) public rewardPerTokenStored; /// @notice How many reward tokens were paid per user (token address => wallet address => amount) mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid; /// @notice Accumulator of reward tokens per user (token address => wallet address => amount) mapping(address => mapping(address => uint256)) public rewards; /* ========== CONSTRUCTOR ========== */ /** * @param _stakingTokenAddress address of the token used for staking (must be ERC20) * @param _rewardTokenAddresses addresses the reward tokens (must be ERC20) * @param _rewardsDuration reward emission duration * @param _depositFeeBps deposit fee in basis points * @param _withdrawalFeesBps aligned to fee schedule * @param _withdrawalFeeSchedule assumes a sorted array */ constructor( address _stakingTokenAddress, address[] memory _rewardTokenAddresses, uint256 _rewardsDuration, uint16 _depositFeeBps, uint16[] memory _withdrawalFeesBps, uint32[] memory _withdrawalFeeSchedule ) StakingFee( _stakingTokenAddress, _depositFeeBps, _withdrawalFeesBps, _withdrawalFeeSchedule ) { require(_rewardTokenAddresses.length > 0, "E9"); // update reward data structures for (uint i = 0; i < _rewardTokenAddresses.length; ++i) { address tokenAddress = _rewardTokenAddresses[i]; _addRewardToken(tokenAddress); } rewardsDuration = _rewardsDuration; } /* ========== VIEWS ========== */ /** * @notice Return the last time rewards are applicable (the lowest of the current timestamp and the rewards expiry timestamp). * @return timestamp */ function lastTimeRewardApplicable() public view returns (uint256) { return block.timestamp < periodFinish ? block.timestamp : periodFinish; } /** * @notice Return the reward per staked token for a given reward token address. * @param _tokenAddress reward token address * @return amount of reward per staked token */ function rewardPerToken( address _tokenAddress ) public view returns (uint256) { if (totalSupply == 0) { return rewardPerTokenStored[_tokenAddress]; } return rewardPerTokenStored[_tokenAddress] + ((lastTimeRewardApplicable() - lastUpdateTime) * rewardRates[_tokenAddress] * 1e18) / totalSupply; } /** * @notice Return the total reward earned by a user for a given reward token address. * @param _tokenAddress reward token address * @param _account user wallet address * @return amount earned */ function earned( address _tokenAddress, address _account ) public view returns (uint256) { return (balances[_account] * (rewardPerToken(_tokenAddress) - userRewardPerTokenPaid[_tokenAddress][_account])) / 1e18 + rewards[_tokenAddress][_account]; } /* ========== MUTATIVE FUNCTIONS ========== */ /** * @dev claim the specified token reward for a staker * @param _tokenAddress the address of the reward token * @param _recipient the address of the staker that should receive the reward * @ return amount of reward received */ function getReward( address _tokenAddress, address _recipient ) public nonReentrant updateRewards(_recipient) { return _getReward(_tokenAddress, _recipient); } /** * @dev claim rewards for all the reward tokens for the staker * @param _recipient address of the recipient to receive the rewards */ function getRewards( address _recipient ) public nonReentrant updateRewards(_recipient) { for (uint i = 0; i < rewardTokens.length; ++i) { _getReward(address(rewardTokens[i]), _recipient); } } /** * @dev Start the emission of rewards to stakers. The owner must send reward tokens to the contract before calling this function. * Note: Can only be called by owner when the contract is not emitting rewards. * @param _rewards array of rewards amounts for each reward token * @param _duration duration in seconds for which rewards will be emitted */ function startEmission( uint256[] memory _rewards, uint256 _duration ) public virtual nonReentrant onlyOwner whenNotEmitting updateRewards(address(0)) { require(_duration > 0, "E10"); require(_rewards.length == rewardTokens.length, "E11"); _beforeStartEmission(_rewards, _duration); rewardsDuration = _duration; for (uint i = 0; i < rewardTokens.length; ++i) { IERC20 token = rewardTokens[i]; address tokenAddress = address(token); rewardRates[tokenAddress] = _rewards[i] / rewardsDuration; // Ensure the provided reward amount is not more than the balance in the contract. // This keeps the reward rate in the right range, preventing overflows due to // very high values of rewardRate in the earned and rewardsPerToken functions; // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow. uint256 balance = rewardTokens[i].balanceOf(address(this)); if (tokenAddress != address(stakingToken)) { require( rewardRates[tokenAddress] <= balance / rewardsDuration, "E3" ); } else { // Handle carefully where rewardsToken is the same as stakingToken (need to subtract total supply) require( rewardRates[tokenAddress] <= (balance - totalSupply) / rewardsDuration, "E3" ); } } lastUpdateTime = block.timestamp; periodFinish = block.timestamp + rewardsDuration; emit RewardsEmissionStarted(_rewards, _duration); } /** * @dev stop the reward emission process and transfer the remaining reward tokens to a specified address * Note: can only be called by owner when the contract is currently emitting rewards * @param _refundAddress the address to receive the remaining reward tokens */ function stopEmission( address _refundAddress ) external nonReentrant onlyOwner whenEmitting { _beforeStopEmission(_refundAddress); uint256 remaining = 0; if (periodFinish > block.timestamp) { remaining = periodFinish - block.timestamp; } periodFinish = block.timestamp; for (uint i = 0; i < rewardTokens.length; ++i) { IERC20 token = rewardTokens[i]; address tokenAddress = address(token); uint256 refund = rewardRates[tokenAddress] * remaining; if (refund > 0) { token.safeTransfer(_refundAddress, refund); } } emit RewardsEmissionEnded(); } /** * @dev recover leftover reward tokens and transfer them to a specified recipient * Note: can only be called by owner when the contract is not emitting rewards * @param _tokenAddress address of the reward token to be recovered * @param _recipient address to receive the recovered reward tokens */ function recoverLeftoverReward( address _tokenAddress, address _recipient ) external onlyOwner whenNotEmitting { require(totalSupply == 0, "E12"); if (rewardTokenAddresses[_tokenAddress]) { _beforeRecoverLeftoverReward(_tokenAddress, _recipient); IERC20 token = IERC20(_tokenAddress); uint256 amount = token.balanceOf(address(this)); if (amount > 0) { token.safeTransfer(_recipient, amount); } emit LeftoverRewardRecovered(_recipient, amount); } } /** * @dev add a reward token to the contract * Note: can only be called by owner when the contract is not emitting rewards * @param _tokenAddress address of the new reward token */ function addRewardToken( address _tokenAddress ) external onlyOwner whenNotEmitting { _addRewardToken(_tokenAddress); } /** * @dev Return the array index of the provided token address (if applicable) * @param _tokenAddress address of the LP token * @return the array index for _tokenAddress or -1 if it is not a reward token */ function rewardTokenIndex( address _tokenAddress ) public view returns (int8) { if (rewardTokenAddresses[_tokenAddress]) { for (uint i = 0; i < rewardTokens.length; ++i) { if (address(rewardTokens[i]) == _tokenAddress) { return int8(int256(i)); } } } return -1; } /* ========== PRIVATE FUNCTIONS ========== */ /** * @dev Get the reward amount of a token for a specific recipient * @param _tokenAddress address of the token * @param _recipient address of the recipient */ function _getReward(address _tokenAddress, address _recipient) private { require(msg.sender == owner() || msg.sender == _recipient, "E14"); require(rewardTokenAddresses[_tokenAddress], "E13"); uint256 reward = rewards[_tokenAddress][_recipient]; if (reward > 0) { rewards[_tokenAddress][_recipient] = 0; IERC20(_tokenAddress).safeTransfer(_recipient, reward); emit RewardPaid(_tokenAddress, _recipient, reward); } } /** * @dev Add a token as a reward token * @param _tokenAddress address of the token to be added as a reward token */ function _addRewardToken(address _tokenAddress) private { require(rewardTokens.length <= 15, "E15"); require(_tokenAddress != address(0), "E1"); if (!rewardTokenAddresses[_tokenAddress]) { rewardTokens.push(IERC20(_tokenAddress)); rewardTokenAddresses[_tokenAddress] = true; } } /* ========== HOOKS ========== */ /** * @dev Override _beforeStake() hook to ensure staking is only possible when rewards are emitting and update the rewards */ function _beforeStake( address _account, uint256 _amount ) internal virtual override whenEmitting updateRewards(_account) returns (uint256) { return super._beforeStake(_account, _amount); } /** * @dev Override _beforeExit() hook to claim all rewards for the account exiting */ function _beforeExit(address _account) internal virtual override { getRewards(_account); // getRewards calls updateRewards so we don't need to call it explicitly again here super._beforeExit(_account); } /** * @dev Override _beforeRecoverERC20() hook to prevent recovery of a reward token */ function _beforeRecoverERC20( address _tokenAddress, address _recipient, uint256 _amount ) internal virtual override { require(!rewardTokenAddresses[_tokenAddress], "E16"); super._beforeRecoverERC20(_tokenAddress, _recipient, _amount); } /** * @dev Override _beforeSetFees() hook to prevent settings fees when rewards are emitting */ function _beforeSetFees() internal virtual override whenNotEmitting { super._beforeSetFees(); } /** * @dev Internal hook called before starting the emission process (in the startEmission() function). * @param _rewards array of rewards per token. * @param _duration emission duration. */ function _beforeStartEmission( uint256[] memory _rewards, uint256 _duration ) internal virtual {} /** * @dev Internal hook called before stopping the emission process (in the stopEmission() function). * @param _refundAddress address to refund the remaining reward to */ function _beforeStopEmission(address _refundAddress) internal virtual {} /** * @dev Internal hook called before recovering leftover rewards (in the recoverLeftoverRewards() function). * @param _tokenAddress address of the token to recover * @param _recipient address to recover the leftover rewards to */ function _beforeRecoverLeftoverReward( address _tokenAddress, address _recipient ) internal virtual {} /* ========== MODIFIERS ========== */ /** * @dev Modifier to update rewards of a given account. * @param _account account to update rewards for */ modifier updateRewards(address _account) { for (uint i = 0; i < rewardTokens.length; ++i) { address tokenAddress = address(rewardTokens[i]); rewardPerTokenStored[tokenAddress] = rewardPerToken(tokenAddress); if (_account != address(0)) { rewards[tokenAddress][_account] = earned(tokenAddress, _account); userRewardPerTokenPaid[tokenAddress][_account] = rewardPerTokenStored[tokenAddress]; } } lastUpdateTime = lastTimeRewardApplicable(); _; } /** * @dev Modifier to check if rewards are emitting. */ modifier whenEmitting() { require(block.timestamp <= periodFinish, "E18"); _; } /** * @dev Modifier to check if rewards are not emitting. */ modifier whenNotEmitting() { require(block.timestamp > periodFinish, "E17"); _; } } // File: contracts/SingleStakingRewards.sol // // Copyright (c) 2023 ElkLabs // License terms: https://github.com/elkfinance/faas/blob/main/LICENSE // // Authors: // - Seth <[email protected]> // - Baal <[email protected]> // - Elijah <[email protected]> // - Snake <[email protected]> pragma solidity >=0.8.0; /** * Adds support for multiple booster tokens */ contract SingleStakingRewards is StakingRewards, ISingleStakingRewards { using SafeERC20 for IERC20; /* ========== CONSTRUCTOR ========== */ /** * @param _stakingTokenAddress address of the token used for staking (must be ERC20) * @param _rewardTokenAddresses array of addresses of the tokens used for rewards (must be ERC20) * @param _rewardsDuration duration of the rewards period * @param _depositFeeBps deposit fee in basis points * @param _withdrawalFeesBps array of withdrawal fees in basis points * @param _withdrawalFeeSchedule array of timestamps for the fee schedule */ constructor( address _stakingTokenAddress, address[] memory _rewardTokenAddresses, uint256 _rewardsDuration, uint16 _depositFeeBps, uint16[] memory _withdrawalFeesBps, uint32[] memory _withdrawalFeeSchedule ) StakingRewards( _stakingTokenAddress, _rewardTokenAddresses, _rewardsDuration, _depositFeeBps, _withdrawalFeesBps, _withdrawalFeeSchedule ) { require( _stakingTokenAddress != address(0), "Staking token must be an ElkDex LP token" ); } /** * @notice Compounds the rewards for the caller */ function compoundSingleStakingRewards() external updateRewards(msg.sender) { address stakingTokenAddress = address(stakingToken); require( rewardTokenAddresses[stakingTokenAddress], "Cannot compound: Staking token is not one of the rewards tokens." ); uint256 reward = rewards[stakingTokenAddress][msg.sender]; if (reward > 0) { uint256 oldBalance = balances[msg.sender]; rewards[stakingTokenAddress][msg.sender] = 0; balances[msg.sender] += reward; totalSupply += reward; emit CompoundedReward(oldBalance, balances[msg.sender]); } } } // File: contracts/SingleStakeFactory.sol // // Copyright (c) 2023 ElkLabs // License terms: https://github.com/elkfinance/faas/blob/main/LICENSE // // Authors: // - Seth <[email protected]> // - Baal <[email protected]> // - Elijah <[email protected]> // - Snake <[email protected]> pragma solidity >=0.8.0; /** * Contract that is used by users to create SingleStakingRewards contracts. * It stores each farm as it's created, as well as the current owner of each farm. * It also contains various uitlity functions for use by Elk. */ contract ElkSingleStakeFactory is ISingleStakeFactory, Ownable { using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ /// @notice The address of the SingleStakingRewards contract for each farm. mapping(address => mapping(address => address)) public override getSingleStake; /// @notice The address of each farm for each creator. address[] public override allFarms; /// @notice The address of the farm manager. address public override farmManager; /// @notice The address of the creator of a given farm. mapping(address => address) public override getCreator; /// @notice The address of the ElkToken contract. IERC20 feeToken = IERC20(0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE); /// @notice fee amount for creating a farm; uint256 public fee = 1000 * 10 ** 18; /// @notice max allowed fee in ElkToken uint256 public maxFee = 1000000 * 10 ** 18; /* ========== CONSTRUCTOR ========== */ constructor() {} /** * @notice Creates a new SingleStakingRewards contract, stores the farm address by creator and the given LP token. * @notice stores the creator of the contract by the new farm address. This is where the fee is taken from the user. * @param _stakingTokenAddress The address of the LP token to be staked. * @param _rewardTokenAddresses The addresses of the reward tokens to be distributed. * @param _rewardsDuration The duration of the rewards period. * @param _depositFeeBps The deposit fee in basis points. * @param _withdrawalFeesBps The withdrawal fee in basis points. * @param _withdrawalFeeSchedule The schedule for the withdrawal fee. */ function createNewSingleStake( address _stakingTokenAddress, address[] memory _rewardTokenAddresses, uint256 _rewardsDuration, uint16 _depositFeeBps, uint16[] memory _withdrawalFeesBps, uint32[] memory _withdrawalFeeSchedule ) public override { require( getSingleStake[msg.sender][_stakingTokenAddress] == address(0), "Elk: FARM_EXISTS" ); // single check is sufficient bytes memory creationCode = type(SingleStakingRewards).creationCode; bytes memory bytecode = abi.encodePacked( creationCode, abi.encode( _stakingTokenAddress, _rewardTokenAddresses, _rewardsDuration, _depositFeeBps, _withdrawalFeesBps, _withdrawalFeeSchedule ) ); address addr; bytes32 salt = keccak256( abi.encodePacked(_stakingTokenAddress, msg.sender) ); assembly { addr := create2(0, add(bytecode, 0x20), mload(bytecode), salt) if iszero(extcodesize(addr)) { revert(0, 0) } } getSingleStake[msg.sender][_stakingTokenAddress] = addr; getCreator[addr] = msg.sender; allFarms.push(addr); SingleStakingRewards(addr).transferOwnership(farmManager); _takeFee(); emit ContractCreated(addr); } /** * @return the number of singe staking contracts created */ function allFarmsLength() external view override returns (uint) { return allFarms.length; } /** * @notice Utility function to be used by Elk. Changes which manager contract will be assigned ownership of each farm on creation. * @notice This is available in case any updates are made to the SingleStakeManager contract. * @dev Ownership is not changed retroactively, so any created farms will always have the same manager contract. * @param _managerAddress The address of the new manager contract. */ function setManager(address _managerAddress) external override onlyOwner { require( _managerAddress != address(0), "managerAddress is the zero address" ); farmManager = _managerAddress; emit ManagerSet(_managerAddress); } /** * @notice Takes fee for contract creation. * @dev SingleStakeFactory must be approved to spend the feeToken before creating a new farm. */ function _takeFee() private { require( feeToken.balanceOf(msg.sender) >= fee, "Creator cannot pay fee" ); feeToken.safeTransferFrom(msg.sender, address(this), fee); } /** * @notice Utility function used by Elk to change the fee amount charged on contract creation. * @dev Can never be more than the maxFee set stored in the contract. * @param _newFee The new fee amount. */ function setFee(uint256 _newFee) external onlyOwner { require(_newFee < maxFee, "Fee cannot be greater than max allowed"); fee = _newFee; emit FeeSet(_newFee); } /** * @notice Utility function used by Elk to recover the fees gathered by the factory. */ function withdrawFees() external onlyOwner { _withdrawFees(); } /** * @notice Change ownership of a farm * @param _farmAddress The address of the farm to be transferred. */ function overrideOwnership(address _farmAddress) external onlyOwner { _overrideOwnership(_farmAddress); } function _withdrawFees() private { uint256 balance = feeToken.balanceOf(address(this)); feeToken.safeTransfer(msg.sender, balance); emit FeesRecovered(balance); } /** * @notice This function is available to FaaS governance in case any "Scam" or nefarious farms are created using the contract. Governance will be able to stop the offending farm and allow users to recover funds. * @param _farmAddress The address of the farm to be stopped. */ function _overrideOwnership(address _farmAddress) private { address creatorAddress = getCreator[_farmAddress]; require(creatorAddress != msg.sender, "Contract is already overriden"); require(creatorAddress != address(0), "Address is not a known farm"); SingleStakingRewards rewardsContract = SingleStakingRewards( _farmAddress ); address stakingToken = address(rewardsContract.stakingToken()); getSingleStake[creatorAddress][stakingToken] = address(0); getSingleStake[msg.sender][stakingToken] = _farmAddress; getCreator[_farmAddress] = msg.sender; } }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newContract","type":"address"}],"name":"ContractCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_newFee","type":"uint256"}],"name":"FeeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balanceRecovered","type":"uint256"}],"name":"FeesRecovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_farmManager","type":"address"}],"name":"ManagerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allFarms","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allFarmsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingTokenAddress","type":"address"},{"internalType":"address[]","name":"_rewardTokenAddresses","type":"address[]"},{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"},{"internalType":"uint16","name":"_depositFeeBps","type":"uint16"},{"internalType":"uint16[]","name":"_withdrawalFeesBps","type":"uint16[]"},{"internalType":"uint32[]","name":"_withdrawalFeeSchedule","type":"uint32[]"}],"name":"createNewSingleStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"farmManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getCreator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"getSingleStake","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_farmAddress","type":"address"}],"name":"overrideOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newFee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_managerAddress","type":"address"}],"name":"setManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600580546001600160a01b03191673eeeeeb57642040be42185f49c52f7e9b38f8eeee179055683635c9adc5dea0000060065569d3c21bcecceda100000060075534801561005157600080fd5b5061005b33610060565b6100b0565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b614c6a806100bf6000396000f3fe60806040523480156200001157600080fd5b5060043610620001095760003560e01c8063715018a611620000a3578063d0ebdbe7116200006e578063d0ebdbe71462000211578063ddca3f431462000228578063eead715e1462000232578063f2fde38b146200026957600080fd5b8063715018a614620001c05780637bc6d44314620001ca5780638da5cb5b14620001d3578063a021030914620001e557600080fd5b806343acb9a911620000e457806343acb9a9146200015b578063476343ee146200018b5780634b2d07cf146200019557806369fe0e2d14620001a957600080fd5b806301f59d16146200010e5780633ae21bb1146200012b5780633be607431462000144575b600080fd5b6200011860075481565b6040519081526020015b60405180910390f35b620001426200013c3660046200102b565b62000280565b005b6200014262000155366004620011e6565b62000298565b620001726200016c3660046200130f565b620005c0565b6040516001600160a01b03909116815260200162000122565b62000142620005eb565b60035462000172906001600160a01b031681565b62000142620001ba3660046200130f565b62000601565b62000142620006c0565b60025462000118565b6000546001600160a01b031662000172565b62000172620001f63660046200102b565b6004602052600090815260409020546001600160a01b031681565b62000142620002223660046200102b565b620006d6565b6200011860065481565b620001726200024336600462001329565b60016020908152600092835260408084209091529082529020546001600160a01b031681565b620001426200027a3660046200102b565b620007ba565b6200028a6200084d565b6200029581620008a9565b50565b3360009081526001602090815260408083206001600160a01b038a811685529252909120541615620003115760405162461bcd60e51b815260206004820152601060248201527f456c6b3a204641524d5f4558495354530000000000000000000000000000000060448201526064015b60405180910390fd5b600060405180602001620003259062001007565b6020820181038252601f19601f8201166040525090506000818888888888886040516020016200035b96959493929190620013e0565b60408051601f19818403018152908290526200037b9291602001620014a8565b60408051601f19818403018152908290526bffffffffffffffffffffffff1960608b811b8216602085015233901b16603483015291506000908190604801604051602081830303815290604052805190602001209050808351602085016000f59150813b620003e957600080fd5b8160016000336001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055503360046000846001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055506002829080600181540180825580915050600190039060005260206000200160009091909190916101000a8154816001600160a01b0302191690836001600160a01b03160217905550816001600160a01b031663f2fde38b600360009054906101000a90046001600160a01b03166040518263ffffffff1660e01b81526004016200053a91906001600160a01b0391909116815260200190565b600060405180830381600087803b1580156200055557600080fd5b505af11580156200056a573d6000803e3d6000fd5b505050506200057862000a5b565b6040516001600160a01b03831681527fcf78cf0d6f3d8371e1075c69c492ab4ec5d8cf23a1a239b6a51a1d00be7ca3129060200160405180910390a150505050505050505050565b60028181548110620005d157600080fd5b6000918252602090912001546001600160a01b0316905081565b620005f56200084d565b620005ff62000b3e565b565b6200060b6200084d565b6007548110620006845760405162461bcd60e51b815260206004820152602660248201527f4665652063616e6e6f742062652067726561746572207468616e206d6178206160448201527f6c6c6f7765640000000000000000000000000000000000000000000000000000606482015260840162000308565b60068190556040518181527f20461e09b8e557b77e107939f9ce6544698123aad0fc964ac5cc59b7df2e608f906020015b60405180910390a150565b620006ca6200084d565b620005ff600062000bfb565b620006e06200084d565b6001600160a01b0381166200075e5760405162461bcd60e51b815260206004820152602260248201527f6d616e616765724164647265737320697320746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840162000308565b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f60a0f5b9f9e81e98216071b85826681c796256fe3d1354ecb675580fba64fa6990602001620006b5565b620007c46200084d565b6001600160a01b038116620008425760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840162000308565b620002958162000bfb565b6000546001600160a01b03163314620005ff5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000308565b6001600160a01b0380821660009081526004602052604090205416338103620009155760405162461bcd60e51b815260206004820152601d60248201527f436f6e747261637420697320616c7265616479206f766572726964656e000000604482015260640162000308565b6001600160a01b0381166200096d5760405162461bcd60e51b815260206004820152601b60248201527f41646472657373206973206e6f742061206b6e6f776e206661726d0000000000604482015260640162000308565b60008290506000816001600160a01b03166372f702f36040518163ffffffff1660e01b8152600401602060405180830381865afa158015620009b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620009d99190620014db565b6001600160a01b039384166000908152600160208181526040808420948816808552948252808420805473ffffffffffffffffffffffffffffffffffffffff1990811690915533808652938352818520958552948252808420805499909816988516891790975596825260049096529390932080549093169093179091555050565b6006546005546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa15801562000aa7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000acd9190620014fb565b101562000b1d5760405162461bcd60e51b815260206004820152601660248201527f43726561746f722063616e6e6f74207061792066656500000000000000000000604482015260640162000308565b600654600554620005ff916001600160a01b03909116903390309062000c58565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801562000b88573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bae9190620014fb565b60055490915062000bca906001600160a01b0316338362000d11565b6040518181527f6857c770f3cb43e9c19050a37dd914ec876241c1f4b487d26a1d4f5d3054f49b90602001620006b5565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b038085166024830152831660448201526064810182905262000d0b9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915262000d61565b50505050565b6040516001600160a01b03831660248201526044810182905262000d5c9084907fa9059cbb000000000000000000000000000000000000000000000000000000009060640162000ca6565b505050565b600062000db8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031662000e4d9092919063ffffffff16565b80519091501562000d5c578080602001905181019062000dd9919062001515565b62000d5c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840162000308565b606062000e5e848460008562000e66565b949350505050565b60608247101562000ee05760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840162000308565b600080866001600160a01b0316858760405162000efe919062001539565b60006040518083038185875af1925050503d806000811462000f3d576040519150601f19603f3d011682016040523d82523d6000602084013e62000f42565b606091505b509150915062000f558783838762000f60565b979650505050505050565b6060831562000fd457825160000362000fcc576001600160a01b0385163b62000fcc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000308565b508162000e5e565b62000e5e838381511562000feb5781518083602001fd5b8060405162461bcd60e51b815260040162000308919062001557565b6136a8806200158d83390190565b6001600160a01b03811681146200029557600080fd5b6000602082840312156200103e57600080fd5b81356200104b8162001015565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715620010ad57620010ad62001052565b604052919050565b600067ffffffffffffffff821115620010d257620010d262001052565b5060051b60200190565b803561ffff81168114620010ef57600080fd5b919050565b600082601f8301126200110657600080fd5b813560206200111f6200111983620010b5565b62001081565b82815260059290921b840181019181810190868411156200113f57600080fd5b8286015b8481101562001165576200115781620010dc565b835291830191830162001143565b509695505050505050565b600082601f8301126200118257600080fd5b81356020620011956200111983620010b5565b82815260059290921b84018101918181019086841115620011b557600080fd5b8286015b848110156200116557803563ffffffff81168114620011d85760008081fd5b8352918301918301620011b9565b60008060008060008060c087890312156200120057600080fd5b86356200120d8162001015565b955060208781013567ffffffffffffffff808211156200122c57600080fd5b818a0191508a601f8301126200124157600080fd5b8135620012526200111982620010b5565b81815260059190911b8301840190848101908d8311156200127257600080fd5b938501935b828510156200129d5784356200128d8162001015565b8252938501939085019062001277565b9950505060408a01359650620012b660608b01620010dc565b955060808a0135925080831115620012cd57600080fd5b620012db8b848c01620010f4565b945060a08a0135925080831115620012f257600080fd5b50506200130289828a0162001170565b9150509295509295509295565b6000602082840312156200132257600080fd5b5035919050565b600080604083850312156200133d57600080fd5b82356200134a8162001015565b915060208301356200135c8162001015565b809150509250929050565b600081518084526020808501945080840160005b838110156200139d57815161ffff16875295820195908201906001016200137b565b509495945050505050565b600081518084526020808501945080840160005b838110156200139d57815163ffffffff1687529582019590820190600101620013bc565b600060c082016001600160a01b03808a168452602060c081860152828a5180855260e087019150828c01945060005b818110156200142f5785518516835294830194918301916001016200140f565b505089604087015262001448606087018a61ffff169052565b85810360808701526200145c818962001367565b935050505082810360a0840152620014758185620013a8565b9998505050505050505050565b60005b838110156200149f57818101518382015260200162001485565b50506000910152565b60008351620014bc81846020880162001482565b835190830190620014d281836020880162001482565b01949350505050565b600060208284031215620014ee57600080fd5b81516200104b8162001015565b6000602082840312156200150e57600080fd5b5051919050565b6000602082840312156200152857600080fd5b815180151581146200104b57600080fd5b600082516200154d81846020870162001482565b9190910192915050565b60208152600082518060208401526200157881604085016020870162001482565b601f01601f1916919091016040019291505056fe60a06040523480156200001157600080fd5b50604051620036a8380380620036a8833981016040819052620000349162000809565b600160005585858585858585838383836200004f33620001b9565b6001600160a01b038116620000905760405162461bcd60e51b8152602060048201526002602482015261453160f01b60448201526064015b60405180910390fd5b6001600160a01b0316608052620000a98383836200020b565b505050506000855111620000e55760405162461bcd60e51b8152602060048201526002602482015261453960f01b604482015260640162000087565b60005b85518110156200013857600086828151811062000109576200010962000931565b6020026020010151905062000124816200041e60201b60201c565b5062000130816200095d565b9050620000e8565b505050600c919091555050506001600160a01b038616620001ad5760405162461bcd60e51b815260206004820152602860248201527f5374616b696e6720746f6b656e206d75737420626520616e20456c6b446578206044820152672628103a37b5b2b760c11b606482015260840162000087565b50505050505062000a2d565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620002156200051e565b6200021f6200057c565b81518151148015620002335750600a815111155b80156200024657506107d08361ffff1611155b620002795760405162461bcd60e51b8152602060048201526002602482015261453560f01b604482015260640162000087565b6000806200028b6107d0600162000979565b905060005b8351811015620003a4578263ffffffff16848281518110620002b657620002b662000931565b602002602001015163ffffffff1611620002f85760405162461bcd60e51b8152602060048201526002602482015261453760f01b604482015260640162000087565b818582815181106200030e576200030e62000931565b602002602001015161ffff16106200034e5760405162461bcd60e51b815260206004820152600260248201526108a760f31b604482015260640162000087565b83818151811062000363576200036362000931565b6020026020010151925084818151811062000382576200038262000931565b602002602001015161ffff169150806200039c906200095d565b905062000290565b508251620003ba906004906020860190620005c5565b508351620003d09060059060208701906200061d565b5061ffff85166006556040517fab4c36b25b04e6f8ac9915203aba1048c17841782324a583e98128b8c1c964f3906200040f9087908790879062000995565b60405180910390a15050505050565b600954600f1015620004595760405162461bcd60e51b815260206004820152600360248201526245313560e81b604482015260640162000087565b6001600160a01b038116620004965760405162461bcd60e51b8152602060048201526002602482015261453160f01b604482015260640162000087565b6001600160a01b0381166000908152600a602052604090205460ff166200051b576009805460018082019092557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180546001600160a01b0319166001600160a01b0384169081179091556000908152600a60205260409020805460ff191690911790555b50565b6001546001600160a01b031633146200057a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000087565b565b600b544211620005b55760405162461bcd60e51b815260206004820152600360248201526245313760e81b604482015260640162000087565b6200057a6001600160e01b038116565b8280548282559060005260206000209081019282156200060b579160200282015b828111156200060b578251829063ffffffff16905591602001919060010190620005e6565b506200061992915062000661565b5090565b8280548282559060005260206000209081019282156200060b579160200282015b828111156200060b578251829061ffff169055916020019190600101906200063e565b5b8082111562000619576000815560010162000662565b80516001600160a01b03811681146200069057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620006d657620006d662000695565b604052919050565b60006001600160401b03821115620006fa57620006fa62000695565b5060051b60200190565b805161ffff811681146200069057600080fd5b600082601f8301126200072957600080fd5b81516020620007426200073c83620006de565b620006ab565b82815260059290921b840181019181810190868411156200076257600080fd5b8286015b8481101562000788576200077a8162000704565b835291830191830162000766565b509695505050505050565b600082601f830112620007a557600080fd5b81516020620007b86200073c83620006de565b82815260059290921b84018101918181019086841115620007d857600080fd5b8286015b848110156200078857805163ffffffff81168114620007fb5760008081fd5b8352918301918301620007dc565b60008060008060008060c087890312156200082357600080fd5b6200082e8762000678565b602088810151919750906001600160401b03808211156200084e57600080fd5b818a0191508a601f8301126200086357600080fd5b8151620008746200073c82620006de565b81815260059190911b8301840190848101908d8311156200089457600080fd5b938501935b82851015620008bd57620008ad8562000678565b8252938501939085019062000899565b809a5050505060408a01519650620008d860608b0162000704565b955060808a0151925080831115620008ef57600080fd5b620008fd8b848c0162000717565b945060a08a01519250808311156200091457600080fd5b50506200092489828a0162000793565b9150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162000972576200097262000947565b5060010190565b808201808211156200098f576200098f62000947565b92915050565b60006060820161ffff80871684526020606081860152828751808552608087019150828901945060005b81811015620009df578551851683529483019491830191600101620009bf565b5050858103604087015286518082529082019350915080860160005b8381101562000a1f57815163ffffffff1685529382019390820190600101620009fb565b509298975050505050505050565b608051612c3562000a736000396000818161049f01528181610733015281816108d601528181610b7b01528181610eb6015281816117f201526118ee0152612c356000f3fe608060405234801561001057600080fd5b50600436106102d35760003560e01c806372f702f3116101865780639e3582c8116100e3578063e70b9e2711610097578063f122977711610071578063f12297771461061f578063f2d1763914610632578063f2fde38b1461064557600080fd5b8063e70b9e27146105e3578063e9fad8ee1461060e578063ebe2b12b1461061657600080fd5b8063a7309d7d116100c8578063a7309d7d14610596578063ab879827146105d1578063c8f33c91146105da57600080fd5b80639e3582c814610570578063a694fc3a1461058357600080fd5b806380faa57d1161013a5780638da5cb5b1161011f5780638da5cb5b146105365780639003adfe146105475780639ce43f901461055057600080fd5b806380faa57d1461051b57806387e7ed3a1461052357600080fd5b80637aaeaf7f1161016b5780637aaeaf7f146104ec5780637bb7bed1146104ff5780637beb3d9f1461051257600080fd5b806372f702f31461049a57806379ee54f7146104d957600080fd5b8063386a95251161023457806369d1bdea116101e85780636da9c58e116101cd5780636da9c58e146104545780637035ab9814610467578063715018a61461049257600080fd5b806369d1bdea1461042e5780636b0916951461044157600080fd5b8063415be3b511610219578063415be3b5146103e2578063423c485a1461040857806354feec3e1461041b57600080fd5b8063386a9525146103b95780633d3b2603146103c257600080fd5b80631db7efd81161028b57806327e235e31161027057806327e235e3146103735780632e1a7d4d146103935780632e9f0602146103a657600080fd5b80631db7efd81461032d578063211dc32d1461036057600080fd5b80631171bda9116102bc5780631171bda9146102fe57806318160ddd146103115780631c03e6cc1461031a57600080fd5b806301f59d16146102d857806302329e17146102f4575b600080fd5b6102e16107d081565b6040519081526020015b60405180910390f35b6102fc610658565b005b6102fc61030c366004612699565b6108c4565b6102e160025481565b6102fc6103283660046126d5565b6109cd565b61035061033b3660046126d5565b600a6020526000908152604090205460ff1681565b60405190151581526020016102eb565b6102e161036e3660046126f0565b610a18565b6102e16103813660046126d5565b60036020526000908152604090205481565b6102fc6103a1366004612723565b610ab2565b6102fc6103b43660046127a7565b610be3565b6102e1600c5481565b6102e16103d03660046126d5565b600e6020526000908152604090205481565b6103f56103f03660046126d5565b611024565b60405160009190910b81526020016102eb565b6102e1610416366004612723565b6110aa565b6102e1610429366004612723565b6110d7565b6102fc61043c3660046128ce565b6110f8565b6102fc61044f3660046126f0565b611338565b6102fc6104623660046126d5565b61142e565b6102e16104753660046126f0565b601060209081526000928352604080842090915290825290205481565b6102fc611553565b6104c17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102eb565b6102fc6104e73660046126d5565b611567565b6102e16104fa3660046129a0565b6116a2565b6104c161050d366004612723565b611758565b6102e161271081565b6102e1611782565b6102fc6105313660046126d5565b611799565b6001546001600160a01b03166104c1565b6102e160075481565b6102e161055e3660046126d5565b600f6020526000908152604090205481565b6102e161057e366004612723565b611824565b6102fc610591366004612723565b611834565b6105bc6105a43660046126d5565b60086020526000908152604090205463ffffffff1681565b60405163ffffffff90911681526020016102eb565b6102e160065481565b6102e1600d5481565b6102e16105f13660046126f0565b601160209081526000928352604080842090915290825290205481565b6102fc611948565b6102e1600b5481565b6102e161062d3660046126d5565b61196a565b6102fc6106403660046126f0565b611a0c565b6102fc6106533660046126d5565b611b8e565b3360005b6009548110156107255760006009828154811061067b5761067b6129ca565b6000918252602090912001546001600160a01b0316905061069b8161196a565b6001600160a01b038083166000908152600f6020526040902091909155831615610714576106c98184610a18565b6001600160a01b03808316600081815260116020908152604080832094891680845294825280832095909555918152600f825283812054601083528482209382529290915291909120555b5061071e816129f6565b905061065c565b5061072e611782565b600d557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0381166000908152600a602052604090205460ff166107e7576040805162461bcd60e51b81526020600482015260248101919091527f43616e6e6f7420636f6d706f756e643a205374616b696e6720746f6b656e206960448201527f73206e6f74206f6e65206f6620746865207265776172647320746f6b656e732e60648201526084015b60405180910390fd5b6001600160a01b038116600090815260116020908152604080832033845290915290205480156108bf5733600081815260036020818152604080842080546001600160a01b0389168652601184528286209686529583529084208490559190528054849290610857908490612a0f565b9250508190555081600260008282546108709190612a0f565b909155505033600090815260036020908152604091829020548251848152918201527fc0dbba536f9e895f506b05695b6beb91b0c1a820932d2d7ecf4a941dbdd1fb55910160405180910390a1505b505050565b6108cc611c1b565b6108d4611c74565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316036109555760405162461bcd60e51b815260206004820152600260248201527f453400000000000000000000000000000000000000000000000000000000000060448201526064016107de565b610960838383611cce565b826109756001600160a01b0382168484611d37565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516109ba91815260200190565b60405180910390a3506108bf6001600055565b6109d5611c74565b600b544211610a0c5760405162461bcd60e51b815260206004820152600360248201526245313760e81b60448201526064016107de565b610a1581611de0565b50565b6001600160a01b038083166000818152601160209081526040808320948616808452948252808320549383526010825280832094835293905291822054670de0b6b3a764000090610a688661196a565b610a729190612a22565b6001600160a01b038516600090815260036020526040902054610a959190612a35565b610a9f9190612a4c565b610aa99190612a0f565b90505b92915050565b610aba611c1b565b80610ac53382611f1d565b9150600082118015610ae65750336000908152600360205260409020548211155b8015610b015750336000908152600360205260409020548111155b610b325760405162461bcd60e51b8152602060048201526002602482015261453360f01b60448201526064016107de565b8060026000828254610b449190612a22565b90915550503360009081526003602052604081208054839290610b68908490612a22565b90915550610ba290506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163384611d37565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a250610a156001600055565b610beb611c1b565b610bf3611c74565b600b544211610c2a5760405162461bcd60e51b815260206004820152600360248201526245313760e81b60448201526064016107de565b6000805b600954811015610cf757600060098281548110610c4d57610c4d6129ca565b6000918252602090912001546001600160a01b03169050610c6d8161196a565b6001600160a01b038083166000908152600f6020526040902091909155831615610ce657610c9b8184610a18565b6001600160a01b03808316600081815260116020908152604080832094891680845294825280832095909555918152600f825283812054601083528482209382529290915291909120555b50610cf0816129f6565b9050610c2e565b50610d00611782565b600d5581610d505760405162461bcd60e51b815260206004820152600360248201527f453130000000000000000000000000000000000000000000000000000000000060448201526064016107de565b600954835114610da25760405162461bcd60e51b815260206004820152600360248201527f453131000000000000000000000000000000000000000000000000000000000060448201526064016107de565b600c82905560005b600954811015610fc557600060098281548110610dc957610dc96129ca565b600091825260209091200154600c5486516001600160a01b0390921692508291879085908110610dfb57610dfb6129ca565b6020026020010151610e0d9190612a4c565b6001600160a01b0382166000908152600e60205260408120919091556009805485908110610e3d57610e3d6129ca565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610e8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb29190612a6e565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610f4b57600c54610efa9082612a4c565b6001600160a01b0383166000908152600e60205260409020541115610f465760405162461bcd60e51b8152602060048201526002602482015261453360f01b60448201526064016107de565b610fb1565b600c54600254610f5b9083612a22565b610f659190612a4c565b6001600160a01b0383166000908152600e60205260409020541115610fb15760405162461bcd60e51b8152602060048201526002602482015261453360f01b60448201526064016107de565b50505080610fbe906129f6565b9050610daa565b5042600d819055600c54610fd891612a0f565b600b556040517faab1f55dce0d0e628e283ce1061d0afccffcf61f9c14391c899b5952492ce8219061100d9085908590612a87565b60405180910390a1506110206001600055565b5050565b6001600160a01b0381166000908152600a602052604081205460ff16156110a15760005b60095481101561109f57826001600160a01b03166009828154811061106f5761106f6129ca565b6000918252602090912001546001600160a01b03160361108f5792915050565b611098816129f6565b9050611048565b505b50600019919050565b600080600654116110bc576000610aac565b612710600654836110cd9190612a35565b610aac9190612a4c565b600481815481106110e757600080fd5b600091825260209091200154905081565b611100611c74565b611108611fa4565b8151815114801561111b5750600a815111155b801561112d57506107d08361ffff1611155b6111795760405162461bcd60e51b815260206004820152600260248201527f453500000000000000000000000000000000000000000000000000000000000060448201526064016107de565b6000806111896107d06001612a0f565b905060005b83518110156112c4578263ffffffff168482815181106111b0576111b06129ca565b602002602001015163ffffffff161161120b5760405162461bcd60e51b815260206004820152600260248201527f453700000000000000000000000000000000000000000000000000000000000060448201526064016107de565b8185828151811061121e5761121e6129ca565b602002602001015161ffff16106112775760405162461bcd60e51b815260206004820152600260248201527f453800000000000000000000000000000000000000000000000000000000000060448201526064016107de565b838181518110611289576112896129ca565b602002602001015192508481815181106112a5576112a56129ca565b602002602001015161ffff169150806112bd906129f6565b905061118e565b5082516112d89060049060208601906125d9565b5083516112ec90600590602087019061262c565b5061ffff85166006556040517fab4c36b25b04e6f8ac9915203aba1048c17841782324a583e98128b8c1c964f39061132990879087908790612acf565b60405180910390a15050505050565b611340611c1b565b8060005b60095481101561140d57600060098281548110611363576113636129ca565b6000918252602090912001546001600160a01b031690506113838161196a565b6001600160a01b038083166000908152600f60205260409020919091558316156113fc576113b18184610a18565b6001600160a01b03808316600081815260116020908152604080832094891680845294825280832095909555918152600f825283812054601083528482209382529290915291909120555b50611406816129f6565b9050611344565b50611416611782565b600d556114238383611fdb565b506110206001600055565b611436611c1b565b61143e611c74565b600b544211156114765760405162461bcd60e51b815260206004820152600360248201526208a62760eb1b60448201526064016107de565b600042600b5411156114935742600b546114909190612a22565b90505b42600b5560005b60095481101561151e576000600982815481106114b9576114b96129ca565b60009182526020808320909101546001600160a01b0316808352600e90915260408220549092508291906114ee908690612a35565b9050801561150a5761150a6001600160a01b0384168783611d37565b50505080611517906129f6565b905061149a565b506040517f9bad5e1e43bc35e89725967a54f4bc384078248a1ea5c315be3b260a68cbb17a90600090a150610a156001600055565b61155b611c74565b6115656000612164565b565b61156f611c1b565b8060005b60095481101561163c57600060098281548110611592576115926129ca565b6000918252602090912001546001600160a01b031690506115b28161196a565b6001600160a01b038083166000908152600f602052604090209190915583161561162b576115e08184610a18565b6001600160a01b03808316600081815260116020908152604080832094891680845294825280832095909555918152600f825283812054601083528482209382529290915291909120555b50611635816129f6565b9050611573565b50611645611782565b600d5560005b600954811015611696576116866009828154811061166b5761166b6129ca565b6000918252602090912001546001600160a01b031684611fdb565b61168f816129f6565b905061164b565b5050610a156001600055565b6001600160a01b03821660009081526008602052604081205481906116cd9063ffffffff1642612a22565b90506000805b60045481101561174f57600481815481106116f0576116f06129ca565b906000526020600020015483101561173f5761271060058281548110611718576117186129ca565b90600052602060002001548661172e9190612a35565b6117389190612a4c565b915061174f565b611748816129f6565b90506116d3565b50949350505050565b6009818154811061176857600080fd5b6000918252602090912001546001600160a01b0316905081565b6000600b5442106117945750600b5490565b504290565b6117a1611c74565b6117a9611c1b565b6007805460009091556040518181527f6857c770f3cb43e9c19050a37dd914ec876241c1f4b487d26a1d4f5d3054f49b9060200160405180910390a16118196001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168383611d37565b50610a156001600055565b600581815481106110e757600080fd5b61183c611c1b565b8061184733826121c3565b91506000821180156118595750600081115b6118a55760405162461bcd60e51b815260206004820152600260248201527f453200000000000000000000000000000000000000000000000000000000000060448201526064016107de565b81600260008282546118b79190612a0f565b909155505033600090815260036020526040812080548492906118db908490612a0f565b9091555061191690506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330846122e0565b60405182815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90602001610bd0565b61195133612337565b3360009081526003602052604090205461156590610ab2565b600060025460000361199257506001600160a01b03166000908152600f602052604090205490565b6002546001600160a01b0383166000908152600e6020526040902054600d546119b9611782565b6119c39190612a22565b6119cd9190612a35565b6119df90670de0b6b3a7640000612a35565b6119e99190612a4c565b6001600160a01b0383166000908152600f6020526040902054610aac9190612a0f565b611a14611c74565b600b544211611a4b5760405162461bcd60e51b815260206004820152600360248201526245313760e81b60448201526064016107de565b60025415611a9b5760405162461bcd60e51b815260206004820152600360248201527f453132000000000000000000000000000000000000000000000000000000000060448201526064016107de565b6001600160a01b0382166000908152600a602052604090205460ff1615611020576040516370a0823160e01b815230600482015282906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611b05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b299190612a6e565b90508015611b4557611b456001600160a01b0383168483611d37565b826001600160a01b03167fcaa95c7b01f93ffe197f5e7316a1a2f387c5bfff8cb445095f2110ff5c1b299582604051611b8091815260200190565b60405180910390a250505050565b611b96611c74565b6001600160a01b038116611c125760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107de565b610a1581612164565b600260005403611c6d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107de565b6002600055565b6001546001600160a01b031633146115655760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107de565b6001600160a01b0383166000908152600a602052604090205460ff16156108bf5760405162461bcd60e51b815260206004820152600360248201527f453136000000000000000000000000000000000000000000000000000000000060448201526064016107de565b6040516001600160a01b0383166024820152604481018290526108bf9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612340565b600954600f1015611e335760405162461bcd60e51b815260206004820152600360248201527f453135000000000000000000000000000000000000000000000000000000000060448201526064016107de565b6001600160a01b038116611e895760405162461bcd60e51b815260206004820152600260248201527f453100000000000000000000000000000000000000000000000000000000000060448201526064016107de565b6001600160a01b0381166000908152600a602052604090205460ff16610a15576009805460018181019092557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180546001600160a01b03841673ffffffffffffffffffffffffffffffffffffffff1990911681179091556000908152600a60205260409020805460ff1916909117905550565b600080611f2a84846116a2565b90508015611f89578060076000828254611f449190612a0f565b90915550506040518181526001600160a01b038516907fd0b34aaed5c558a8df736a5aaf9a49b539c4e86fb3ee5a1ac76e0bec23cbdd03906020015b60405180910390a25b611f9c84611f978386612a22565b919050565b949350505050565b600b5442116115655760405162461bcd60e51b815260206004820152600360248201526245313760e81b60448201526064016107de565b6001546001600160a01b0316331480611ffc5750336001600160a01b038216145b6120485760405162461bcd60e51b815260206004820152600360248201527f453134000000000000000000000000000000000000000000000000000000000060448201526064016107de565b6001600160a01b0382166000908152600a602052604090205460ff166120b05760405162461bcd60e51b815260206004820152600360248201527f453133000000000000000000000000000000000000000000000000000000000060448201526064016107de565b6001600160a01b0380831660009081526011602090815260408083209385168352929052205480156108bf576001600160a01b038084166000818152601160209081526040808320948716835293905291822091909155612112908383611d37565b816001600160a01b0316836001600160a01b03167f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e8360405161215791815260200190565b60405180910390a3505050565b600180546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000600b544211156121fd5760405162461bcd60e51b815260206004820152600360248201526208a62760eb1b60448201526064016107de565b8260005b6009548110156122ca57600060098281548110612220576122206129ca565b6000918252602090912001546001600160a01b031690506122408161196a565b6001600160a01b038083166000908152600f60205260409020919091558316156122b95761226e8184610a18565b6001600160a01b03808316600081815260116020908152604080832094891680845294825280832095909555918152600f825283812054601083528482209382529290915291909120555b506122c3816129f6565b9050612201565b506122d3611782565b600d55611f9c8484612425565b6040516001600160a01b03808516602483015283166044820152606481018290526123319085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611d7c565b50505050565b610a1581611567565b6000612395826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166124b69092919063ffffffff16565b8051909150156108bf57808060200190518101906123b39190612b63565b6108bf5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107de565b600080612431836110aa565b6001600160a01b0385166000908152600860205260409020805463ffffffff19164263ffffffff1617905590508015611f895780600760008282546124769190612a0f565b90915550506040518181526001600160a01b038516907f34f2a7363b1ef64b0b62a223c88cf3f54a68686acfcb9531d7deb46004f37c4690602001611f80565b6060611f9c848460008585600080866001600160a01b031685876040516124dd9190612bb0565b60006040518083038185875af1925050503d806000811461251a576040519150601f19603f3d011682016040523d82523d6000602084013e61251f565b606091505b50915091506125308783838761253b565b979650505050505050565b606083156125aa5782516000036125a3576001600160a01b0385163b6125a35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107de565b5081611f9c565b611f9c83838151156125bf5781518083602001fd5b8060405162461bcd60e51b81526004016107de9190612bcc565b82805482825590600052602060002090810192821561261c579160200282015b8281111561261c578251829063ffffffff169055916020019190600101906125f9565b5061262892915061266d565b5090565b82805482825590600052602060002090810192821561261c579160200282015b8281111561261c578251829061ffff1690559160200191906001019061264c565b5b80821115612628576000815560010161266e565b80356001600160a01b0381168114611f9757600080fd5b6000806000606084860312156126ae57600080fd5b6126b784612682565b92506126c560208501612682565b9150604084013590509250925092565b6000602082840312156126e757600080fd5b610aa982612682565b6000806040838503121561270357600080fd5b61270c83612682565b915061271a60208401612682565b90509250929050565b60006020828403121561273557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561277b5761277b61273c565b604052919050565b600067ffffffffffffffff82111561279d5761279d61273c565b5060051b60200190565b600080604083850312156127ba57600080fd5b823567ffffffffffffffff8111156127d157600080fd5b8301601f810185136127e257600080fd5b803560206127f76127f283612783565b612752565b82815260059290921b8301810191818101908884111561281657600080fd5b938201935b838510156128345784358252938201939082019061281b565b98969091013596505050505050565b803561ffff81168114611f9757600080fd5b600082601f83011261286657600080fd5b813560206128766127f283612783565b82815260059290921b8401810191818101908684111561289557600080fd5b8286015b848110156128c357803563ffffffff811681146128b65760008081fd5b8352918301918301612899565b509695505050505050565b6000806000606084860312156128e357600080fd5b6128ec84612843565b925060208085013567ffffffffffffffff8082111561290a57600080fd5b818701915087601f83011261291e57600080fd5b813561292c6127f282612783565b81815260059190911b8301840190848101908a83111561294b57600080fd5b938501935b828510156129705761296185612843565b82529385019390850190612950565b96505050604087013592508083111561298857600080fd5b505061299686828701612855565b9150509250925092565b600080604083850312156129b357600080fd5b6129bc83612682565b946020939093013593505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612a0857612a086129e0565b5060010190565b80820180821115610aac57610aac6129e0565b81810381811115610aac57610aac6129e0565b8082028115828204841417610aac57610aac6129e0565b600082612a6957634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215612a8057600080fd5b5051919050565b604080825283519082018190526000906020906060840190828701845b82811015612ac057815184529284019290840190600101612aa4565b50505092019290925292915050565b60006060820161ffff80871684526020606081860152828751808552608087019150828901945060005b81811015612b17578551851683529483019491830191600101612af9565b5050858103604087015286518082529082019350915080860160005b83811015612b5557815163ffffffff1685529382019390820190600101612b33565b509298975050505050505050565b600060208284031215612b7557600080fd5b81518015158114612b8557600080fd5b9392505050565b60005b83811015612ba7578181015183820152602001612b8f565b50506000910152565b60008251612bc2818460208701612b8c565b9190910192915050565b6020815260008251806020840152612beb816040850160208701612b8c565b601f01601f1916919091016040019291505056fea26469706673582212209dffcc21e893c71ef0b3854b53de02f9a549f8d86efae938d8d7266d52a43c1b64736f6c63430008130033a264697066735822122093e78a7f71b8587d699effe7a5b317b98b62fd7d0f38d5212a0c86010289388664736f6c63430008130033
Deployed ByteCode Sourcemap
64992:6648:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;65908:42;;;;;;;;;160:25:1;;;148:2;133:18;65908:42:0;;;;;;;;70351:119;;;;;;:::i;:::-;;:::i;:::-;;66736:1515;;;;;;:::i;:::-;;:::i;65376:34::-;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;5013:55:1;;;4995:74;;4983:2;4968:18;65376:34:0;4849:226:1;70134:77:0;;;:::i;65469:35::-;;;;;-1:-1:-1;;;;;65469:35:0;;;69825:193;;;;;;:::i;:::-;;:::i;33594:103::-;;;:::i;68339:105::-;68421:8;:15;68339:105;;32946:87;32992:7;33019:6;-1:-1:-1;;;;;33019:6:0;32946:87;;65574:54;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;65574:54:0;;;68895:288;;;;;;:::i;:::-;;:::i;65818:36::-;;;;;;65229:78;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;65229:78:0;;;33852:201;;;;;;:::i;:::-;;:::i;70351:119::-;32832:13;:11;:13::i;:::-;70430:32:::1;70449:12;70430:18;:32::i;:::-;70351:119:::0;:::o;66736:1515::-;67086:10;67131:1;67071:26;;;:14;:26;;;;;;;;-1:-1:-1;;;;;67071:48:0;;;;;;;;;;;;:62;67049:128;;;;-1:-1:-1;;;67049:128:0;;5675:2:1;67049:128:0;;;5657:21:1;5714:2;5694:18;;;5687:30;5753:18;5733;;;5726:46;5789:18;;67049:128:0;;;;;;;;;67220:25;67248:39;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;67220:67;;67298:21;67353:12;67409:20;67448:21;67488:16;67523:14;67556:18;67593:22;67380:250;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;67380:250:0;;;;;;;;;;67322:319;;;67380:250;67322:319;;:::i;:::-;;;;-1:-1:-1;;67322:319:0;;;;;;;;;;-1:-1:-1;;9113:2:1;9109:15;;;9105:24;;67322:319:0;67714:50;;9093:37:1;67753:10:0;9164:15:1;;9160:24;9146:12;;;9139:46;67322:319:0;-1:-1:-1;67652:12:0;;;;9201::1;;67714:50:0;;;;;;;;;;;;67690:85;;;;;;67675:100;;67869:4;67858:8;67852:15;67845:4;67835:8;67831:19;67828:1;67820:54;67812:62;;67910:4;67898:17;67888:75;;67946:1;67943;67936:12;67888:75;68037:4;67986:14;:26;68001:10;-1:-1:-1;;;;;67986:26:0;-1:-1:-1;;;;;67986:26:0;;;;;;;;;;;;:48;68013:20;-1:-1:-1;;;;;67986:48:0;-1:-1:-1;;;;;67986:48:0;;;;;;;;;;;;;:55;;;;;-1:-1:-1;;;;;67986:55:0;;;;;-1:-1:-1;;;;;67986:55:0;;;;;;68071:10;68052;:16;68063:4;-1:-1:-1;;;;;68052:16:0;-1:-1:-1;;;;;68052:16:0;;;;;;;;;;;;;:29;;;;;-1:-1:-1;;;;;68052:29:0;;;;;-1:-1:-1;;;;;68052:29:0;;;;;;68092:8;68106:4;68092:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;68092:19:0;;;;;-1:-1:-1;;;;;68092:19:0;;;;;;68145:4;-1:-1:-1;;;;;68124:44:0;;68169:11;;;;;;;;;-1:-1:-1;;;;;68169:11:0;68124:57;;;;;;;;;;;;;;-1:-1:-1;;;;;5013:55:1;;;;4995:74;;4983:2;4968:18;;4849:226;68124:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;68194:10;:8;:10::i;:::-;68222:21;;-1:-1:-1;;;;;5013:55:1;;4995:74;;68222:21:0;;4983:2:1;4968:18;68222:21:0;;;;;;;67038:1213;;;;66736:1515;;;;;;:::o;65376:34::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;65376:34:0;;-1:-1:-1;65376:34:0;:::o;70134:77::-;32832:13;:11;:13::i;:::-;70188:15:::1;:13;:15::i;:::-;70134:77::o:0;69825:193::-;32832:13;:11;:13::i;:::-;69906:6:::1;;69896:7;:16;69888:67;;;::::0;-1:-1:-1;;;69888:67:0;;9426:2:1;69888:67:0::1;::::0;::::1;9408:21:1::0;9465:2;9445:18;;;9438:30;9504:34;9484:18;;;9477:62;9575:8;9555:18;;;9548:36;9601:19;;69888:67:0::1;9224:402:1::0;69888:67:0::1;69966:3;:13:::0;;;69995:15:::1;::::0;160:25:1;;;69995:15:0::1;::::0;148:2:1;133:18;69995:15:0::1;;;;;;;;69825:193:::0;:::o;33594:103::-;32832:13;:11;:13::i;:::-;33659:30:::1;33686:1;33659:18;:30::i;68895:288::-:0;32832:13;:11;:13::i;:::-;-1:-1:-1;;;;;69001:29:0;::::1;68979:113;;;::::0;-1:-1:-1;;;68979:113:0;;9833:2:1;68979:113:0::1;::::0;::::1;9815:21:1::0;9872:2;9852:18;;;9845:30;9911:34;9891:18;;;9884:62;9982:4;9962:18;;;9955:32;10004:19;;68979:113:0::1;9631:398:1::0;68979:113:0::1;69103:11;:29:::0;;-1:-1:-1;;69103:29:0::1;-1:-1:-1::0;;;;;69103:29:0;::::1;::::0;;::::1;::::0;;;69148:27:::1;::::0;4995:74:1;;;69148:27:0::1;::::0;4983:2:1;4968:18;69148:27:0::1;4849:226:1::0;33852:201:0;32832:13;:11;:13::i;:::-;-1:-1:-1;;;;;33941:22:0;::::1;33933:73;;;::::0;-1:-1:-1;;;33933:73:0;;10236:2:1;33933:73:0::1;::::0;::::1;10218:21:1::0;10275:2;10255:18;;;10248:30;10314:34;10294:18;;;10287:62;10385:8;10365:18;;;10358:36;10411:19;;33933:73:0::1;10034:402:1::0;33933:73:0::1;34017:28;34036:8;34017:18;:28::i;33111:132::-:0;32992:7;33019:6;-1:-1:-1;;;;;33019:6:0;31524:10;33175:23;33167:68;;;;-1:-1:-1;;;33167:68:0;;10643:2:1;33167:68:0;;;10625:21:1;;;10662:18;;;10655:30;10721:34;10701:18;;;10694:62;10773:18;;33167:68:0;10441:356:1;70982:655:0;-1:-1:-1;;;;;71076:24:0;;;71051:22;71076:24;;;:10;:24;;;;;;;71139:10;71121:28;;71113:70;;;;-1:-1:-1;;;71113:70:0;;11004:2:1;71113:70:0;;;10986:21:1;11043:2;11023:18;;;11016:30;11082:31;11062:18;;;11055:59;11131:18;;71113:70:0;10802:353:1;71113:70:0;-1:-1:-1;;;;;71202:28:0;;71194:68;;;;-1:-1:-1;;;71194:68:0;;11362:2:1;71194:68:0;;;11344:21:1;11401:2;11381:18;;;11374:30;11440:29;11420:18;;;11413:57;11487:18;;71194:68:0;11160:351:1;71194:68:0;71275:36;71349:12;71275:97;;71383:20;71414:15;-1:-1:-1;;;;;71414:28:0;;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;71458:30:0;;;71513:1;71458:30;;;:14;:30;;;;;;;;:44;;;;;;;;;;;;:57;;-1:-1:-1;;71458:57:0;;;;;;71541:10;71526:26;;;;;;;;;:40;;;;;;;;;:55;;;;;;;;;;;;;;71592:24;;;:10;:24;;;;;;;:37;;;;;;;;;;;-1:-1:-1;;70982:655:0:o;69357:224::-;69452:3;;69418:8;;:30;;-1:-1:-1;;;69418:30:0;;69437:10;69418:30;;;4995:74:1;-1:-1:-1;;;;;69418:8:0;;;;:18;;4968::1;;69418:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:37;;69396:109;;;;-1:-1:-1;;;69396:109:0;;12177:2:1;69396:109:0;;;12159:21:1;12216:2;12196:18;;;12189:30;12255:24;12235:18;;;12228:52;12297:18;;69396:109:0;11975:346:1;69396:109:0;69569:3;;69516:8;;:57;;-1:-1:-1;;;;;69516:8:0;;;;69542:10;;69562:4;;69516:25;:57::i;70478:194::-;70540:8;;:33;;-1:-1:-1;;;70540:33:0;;70567:4;70540:33;;;4995:74:1;70522:15:0;;-1:-1:-1;;;;;70540:8:0;;:18;;4968::1;;70540:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;70584:8;;70522:51;;-1:-1:-1;70584:42:0;;-1:-1:-1;;;;;70584:8:0;70606:10;70522:51;70584:21;:42::i;:::-;70642:22;;160:25:1;;;70642:22:0;;148:2:1;133:18;70642:22:0;14:177:1;34213:191:0;34287:16;34306:6;;-1:-1:-1;;;;;34323:17:0;;;-1:-1:-1;;34323:17:0;;;;;;34356:40;;34306:6;;;;;;;34356:40;;34287:16;34356:40;34276:128;34213:191;:::o;27141:248::-;27312:68;;-1:-1:-1;;;;;12607:15:1;;;27312:68:0;;;12589:34:1;12659:15;;12639:18;;;12632:43;12691:18;;;12684:34;;;27285:96:0;;27305:5;;27335:27;;12501:18:1;;27312:68:0;;;;-1:-1:-1;;27312:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;27285:19;:96::i;:::-;27141:248;;;;:::o;26922:211::-;27066:58;;-1:-1:-1;;;;;12921:55:1;;27066:58:0;;;12903:74:1;12993:18;;;12986:34;;;27039:86:0;;27059:5;;27089:23;;12876:18:1;;27066:58:0;12729:297:1;27039:86:0;26922:211;;;:::o;29989:716::-;30413:23;30439:69;30467:4;30439:69;;;;;;;;;;;;;;;;;30447:5;-1:-1:-1;;;;;30439:27:0;;;:69;;;;;:::i;:::-;30523:17;;30413:95;;-1:-1:-1;30523:21:0;30519:179;;30620:10;30609:30;;;;;;;;;;;;:::i;:::-;30601:85;;;;-1:-1:-1;;;30601:85:0;;13515:2:1;30601:85:0;;;13497:21:1;13554:2;13534:18;;;13527:30;13593:34;13573:18;;;13566:62;13664:12;13644:18;;;13637:40;13694:19;;30601:85:0;13313:406:1;8871:229:0;9008:12;9040:52;9062:6;9070:4;9076:1;9079:12;9040:21;:52::i;:::-;9033:59;8871:229;-1:-1:-1;;;;8871:229:0:o;9991:455::-;10161:12;10219:5;10194:21;:30;;10186:81;;;;-1:-1:-1;;;10186:81:0;;13926:2:1;10186:81:0;;;13908:21:1;13965:2;13945:18;;;13938:30;14004:34;13984:18;;;13977:62;14075:8;14055:18;;;14048:36;14101:19;;10186:81:0;13724:402:1;10186:81:0;10279:12;10293:23;10320:6;-1:-1:-1;;;;;10320:11:0;10339:5;10346:4;10320:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10278:73;;;;10369:69;10396:6;10404:7;10413:10;10425:12;10369:26;:69::i;:::-;10362:76;9991:455;-1:-1:-1;;;;;;;9991:455:0:o;12564:644::-;12749:12;12778:7;12774:427;;;12806:10;:17;12827:1;12806:22;12802:290;;-1:-1:-1;;;;;6409:19:0;;;13016:60;;;;-1:-1:-1;;;13016:60:0;;14625:2:1;13016:60:0;;;14607:21:1;14664:2;14644:18;;;14637:30;14703:31;14683:18;;;14676:59;14752:18;;13016:60:0;14423:353:1;13016:60:0;-1:-1:-1;13113:10:0;13106:17;;12774:427;13156:33;13164:10;13176:12;13911:17;;:21;13907:388;;14143:10;14137:17;14200:15;14187:10;14183:2;14179:19;14172:44;13907:388;14270:12;14263:20;;-1:-1:-1;;;14263:20:0;;;;;;;;:::i;-1:-1:-1:-;;;;;;;;:::o;196:154:1:-;-1:-1:-1;;;;;275:5:1;271:54;264:5;261:65;251:93;;340:1;337;330:12;355:247;414:6;467:2;455:9;446:7;442:23;438:32;435:52;;;483:1;480;473:12;435:52;522:9;509:23;541:31;566:5;541:31;:::i;:::-;591:5;355:247;-1:-1:-1;;;355:247:1:o;607:184::-;659:77;656:1;649:88;756:4;753:1;746:15;780:4;777:1;770:15;796:275;867:2;861:9;932:2;913:13;;-1:-1:-1;;909:27:1;897:40;;967:18;952:34;;988:22;;;949:62;946:88;;;1014:18;;:::i;:::-;1050:2;1043:22;796:275;;-1:-1:-1;796:275:1:o;1076:183::-;1136:4;1169:18;1161:6;1158:30;1155:56;;;1191:18;;:::i;:::-;-1:-1:-1;1236:1:1;1232:14;1248:4;1228:25;;1076:183::o;1264:159::-;1331:20;;1391:6;1380:18;;1370:29;;1360:57;;1413:1;1410;1403:12;1360:57;1264:159;;;:::o;1428:666::-;1481:5;1534:3;1527:4;1519:6;1515:17;1511:27;1501:55;;1552:1;1549;1542:12;1501:55;1588:6;1575:20;1614:4;1638:60;1654:43;1694:2;1654:43;:::i;:::-;1638:60;:::i;:::-;1732:15;;;1818:1;1814:10;;;;1802:23;;1798:32;;;1763:12;;;;1842:15;;;1839:35;;;1870:1;1867;1860:12;1839:35;1906:2;1898:6;1894:15;1918:147;1934:6;1929:3;1926:15;1918:147;;;2000:22;2018:3;2000:22;:::i;:::-;1988:35;;2043:12;;;;1951;;1918:147;;;-1:-1:-1;2083:5:1;1428:666;-1:-1:-1;;;;;;1428:666:1:o;2099:836::-;2152:5;2205:3;2198:4;2190:6;2186:17;2182:27;2172:55;;2223:1;2220;2213:12;2172:55;2259:6;2246:20;2285:4;2309:60;2325:43;2365:2;2325:43;:::i;2309:60::-;2403:15;;;2489:1;2485:10;;;;2473:23;;2469:32;;;2434:12;;;;2513:15;;;2510:35;;;2541:1;2538;2531:12;2510:35;2577:2;2569:6;2565:15;2589:317;2605:6;2600:3;2597:15;2589:317;;;2685:3;2672:17;2733:10;2726:5;2722:22;2715:5;2712:33;2702:131;;2787:1;2816:2;2812;2805:14;2702:131;2846:18;;2884:12;;;;2622;;2589:317;;2940:1719;3116:6;3124;3132;3140;3148;3156;3209:3;3197:9;3188:7;3184:23;3180:33;3177:53;;;3226:1;3223;3216:12;3177:53;3265:9;3252:23;3284:31;3309:5;3284:31;:::i;:::-;3334:5;-1:-1:-1;3358:2:1;3396:18;;;3383:32;3434:18;3464:14;;;3461:34;;;3491:1;3488;3481:12;3461:34;3529:6;3518:9;3514:22;3504:32;;3574:7;3567:4;3563:2;3559:13;3555:27;3545:55;;3596:1;3593;3586:12;3545:55;3632:2;3619:16;3655:60;3671:43;3711:2;3671:43;:::i;3655:60::-;3749:15;;;3831:1;3827:10;;;;3819:19;;3815:28;;;3780:12;;;;3855:19;;;3852:39;;;3887:1;3884;3877:12;3852:39;3911:11;;;;3931:223;3947:6;3942:3;3939:15;3931:223;;;4029:3;4016:17;4046:33;4071:7;4046:33;:::i;:::-;4092:20;;3964:12;;;;4132;;;;3931:223;;;4173:5;-1:-1:-1;;;4225:2:1;4210:18;;4197:32;;-1:-1:-1;4248:37:1;4281:2;4266:18;;4248:37;:::i;:::-;4238:47;;4338:3;4327:9;4323:19;4310:33;4294:49;;4368:2;4358:8;4355:16;4352:36;;;4384:1;4381;4374:12;4352:36;4407:62;4461:7;4450:8;4439:9;4435:24;4407:62;:::i;:::-;4397:72;;4522:3;4511:9;4507:19;4494:33;4478:49;;4552:2;4542:8;4539:16;4536:36;;;4568:1;4565;4558:12;4536:36;;;4591:62;4645:7;4634:8;4623:9;4619:24;4591:62;:::i;:::-;4581:72;;;2940:1719;;;;;;;;:::o;4664:180::-;4723:6;4776:2;4764:9;4755:7;4751:23;4747:32;4744:52;;;4792:1;4789;4782:12;4744:52;-1:-1:-1;4815:23:1;;4664:180;-1:-1:-1;4664:180:1:o;5080:388::-;5148:6;5156;5209:2;5197:9;5188:7;5184:23;5180:32;5177:52;;;5225:1;5222;5215:12;5177:52;5264:9;5251:23;5283:31;5308:5;5283:31;:::i;:::-;5333:5;-1:-1:-1;5390:2:1;5375:18;;5362:32;5403:33;5362:32;5403:33;:::i;:::-;5455:7;5445:17;;;5080:388;;;;;:::o;5913:447::-;5965:3;6003:5;5997:12;6030:6;6025:3;6018:19;6056:4;6085:2;6080:3;6076:12;6069:19;;6122:2;6115:5;6111:14;6143:1;6153:182;6167:6;6164:1;6161:13;6153:182;;;6232:13;;6247:6;6228:26;6216:39;;6275:12;;;;6310:15;;;;6189:1;6182:9;6153:182;;;-1:-1:-1;6351:3:1;;5913:447;-1:-1:-1;;;;;5913:447:1:o;6365:451::-;6417:3;6455:5;6449:12;6482:6;6477:3;6470:19;6508:4;6537:2;6532:3;6528:12;6521:19;;6574:2;6567:5;6563:14;6595:1;6605:186;6619:6;6616:1;6613:13;6605:186;;;6684:13;;6699:10;6680:30;6668:43;;6731:12;;;;6766:15;;;;6641:1;6634:9;6605:186;;6821:1308;7197:4;7245:3;7234:9;7230:19;-1:-1:-1;;;;;7349:2:1;7341:6;7337:15;7326:9;7319:34;7372:2;7410:3;7405:2;7394:9;7390:18;7383:31;7434:6;7469;7463:13;7500:6;7492;7485:22;7538:3;7527:9;7523:19;7516:26;;7577:2;7569:6;7565:15;7551:29;;7598:1;7608:178;7622:6;7619:1;7616:13;7608:178;;;7687:13;;7683:22;;7671:35;;7761:15;;;;7726:12;;;;7644:1;7637:9;7608:178;;;7612:3;;7822:6;7817:2;7806:9;7802:18;7795:34;7838:45;7879:2;7868:9;7864:18;7856:6;5894;5883:18;5871:31;;5818:90;7838:45;7929:9;7924:3;7920:19;7914:3;7903:9;7899:19;7892:48;7963:40;7999:3;7991:6;7963:40;:::i;:::-;7949:54;;;;;8052:9;8044:6;8040:22;8034:3;8023:9;8019:19;8012:51;8080:43;8116:6;8108;8080:43;:::i;:::-;8072:51;6821:1308;-1:-1:-1;;;;;;;;;6821:1308:1:o;8134:250::-;8219:1;8229:113;8243:6;8240:1;8237:13;8229:113;;;8319:11;;;8313:18;8300:11;;;8293:39;8265:2;8258:10;8229:113;;;-1:-1:-1;;8376:1:1;8358:16;;8351:27;8134:250::o;8389:492::-;8564:3;8602:6;8596:13;8618:66;8677:6;8672:3;8665:4;8657:6;8653:17;8618:66;:::i;:::-;8747:13;;8706:16;;;;8769:70;8747:13;8706:16;8816:4;8804:17;;8769:70;:::i;:::-;8855:20;;8389:492;-1:-1:-1;;;;8389:492:1:o;11516:265::-;11600:6;11653:2;11641:9;11632:7;11628:23;11624:32;11621:52;;;11669:1;11666;11659:12;11621:52;11701:9;11695:16;11720:31;11745:5;11720:31;:::i;11786:184::-;11856:6;11909:2;11897:9;11888:7;11884:23;11880:32;11877:52;;;11925:1;11922;11915:12;11877:52;-1:-1:-1;11948:16:1;;11786:184;-1:-1:-1;11786:184:1:o;13031:277::-;13098:6;13151:2;13139:9;13130:7;13126:23;13122:32;13119:52;;;13167:1;13164;13157:12;13119:52;13199:9;13193:16;13252:5;13245:13;13238:21;13231:5;13228:32;13218:60;;13274:1;13271;13264:12;14131:287;14260:3;14298:6;14292:13;14314:66;14373:6;14368:3;14361:4;14353:6;14349:17;14314:66;:::i;:::-;14396:16;;;;;14131:287;-1:-1:-1;;14131:287:1:o;14781:396::-;14930:2;14919:9;14912:21;14893:4;14962:6;14956:13;15005:6;15000:2;14989:9;14985:18;14978:34;15021:79;15093:6;15088:2;15077:9;15073:18;15068:2;15060:6;15056:15;15021:79;:::i;:::-;15161:2;15140:15;-1:-1:-1;;15136:29:1;15121:45;;;;15168:2;15117:54;;14781:396;-1:-1:-1;;14781:396:1:o
Swarm Source
ipfs://93e78a7f71b8587d699effe7a5b317b98b62fd7d0f38d5212a0c860102893886
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|