Source Code
Overview
GLMR Balance
GLMR Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Transfer Ownersh... | 266106 | 1462 days ago | IN | 0 GLMR | 0.0025994 |
View more zero value Internal Transactions in Advanced View mode
Cross-Chain Transactions
Loading...
Loading
Contract Name:
VaultNova
Compiler Version
v0.8.0+commit.c7dfd78e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* MIT License
* ===========
*
* Copyright (c) 2021 Novabeam
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
import "../abstracts/VaultChef.sol";
contract VaultNova is VaultChef {
using SafeERC20 for IERC20;
using SafeMath for uint256;
/* ========== CONSTRUCTOR ========== */
constructor(
address _sToken,
address _vGovernance,
address _routerAddress,
address _mChef,
uint _chefPid
) VaultChef(_sToken, _sToken, _sToken, _vGovernance, _routerAddress, _mChef, _chefPid) {
}
/* ========== VIEW FUNCTIONS ========== */
function earnedNova(address account) public view returns (uint) {
return earned(account);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @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() {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
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 {
_setOwner(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");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}// SPDX-License-Identifier: MIT
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 make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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 `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @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);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @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");
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @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
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 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 functionCall(target, data, "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");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(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) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(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) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason 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 {
// 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
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
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;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a / b + (a % b == 0 ? 0 : 1);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IBoringERC20 {
function mint(address to, uint256 amount) external;
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
/// @notice EIP 2612
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IBoringERC20.sol";
interface IComplexRewarder {
function onNovaReward(
uint256 pid,
address user,
uint256 newLpAmount
) external;
function pendingTokens(uint256 pid, address user)
external
view
returns (uint256 pending);
function rewardToken() external view returns (IBoringERC20);
function poolRewardsPerSec(uint256 pid) external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IComplexRewarder.sol";
import "./IBoringERC20.sol";
interface IMasterChef {
function totalAllocPoint() external view returns (uint256);
function deposit(uint256 _pid, uint256 _amount) external;
function poolLength() external view returns (uint256);
function novaPerSec() external view returns (uint256);
function poolTotalLp(uint256 pid) external view returns (uint256);
function poolInfo(uint _pid) view external returns (
address lpToken, // Address of LP token contract.
uint256 allocPoint, // How many allocation points assigned to this pool. Nova to distribute per block.
uint256 lastRewardTimestamp, // Last block number that Nova distribution occurs.
uint256 accNovaPerShare, // Accumulated Nova per share, times 1e18. See below.
uint16 depositFeeBP, // Deposit fee in basis points
uint256 harvestInterval, // Harvest interval in seconds
uint256 totalLp
);
function poolRewardsPerSec(uint256 _pid) external view returns (
address[] memory addresses,
string[] memory symbols,
uint256[] memory decimals,
uint256[] memory rewardsPerSec
);
function userInfo(uint _pid, address _account) view external returns (
uint256 amount, // How many LP tokens the user has provided.
uint256 rewardDebt, // Reward debt. See explanation below.
uint256 rewardLockedUp, // Reward locked up.
uint256 nextHarvestUntil // When can the user harvest again.
);
function withdraw(uint256 _pid, uint256 _amount) external;
}// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.6.2;
import './IUniswapV2Router01.sol';
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* MIT License
* ===========
*
* Copyright (c) 2021 Novabeam
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
import "./VaultController.sol";
import "../../farm/interfaces/IMasterChef.sol";
import "../interfaces/IVault.sol";
import "../../uniswapv2/interfaces/IUniswapV2Router02.sol";
abstract contract Vault is VaultController, IVault {
using SafeERC20 for IERC20;
using SafeMath for uint256;
/* ========== STATE VARIABLES ========== */
uint256 public lastHarvest;
/* ========== CONSTRUCTOR ========== */
constructor(
address _sToken,
address _rToken,
address _nToken,
address _vGovernance
) VaultController(_sToken, _rToken, _nToken, _vGovernance) {
}
/* ========== MUTATIVE FUNCTIONS ========== */
function deposit(uint _amount) public override {
_depositTo(_amount, msg.sender);
}
function depositAll() external override {
deposit(_stakingToken.balanceOf(msg.sender));
}
function withdrawAll() external override {
withdraw(balanceOf(msg.sender));
}
function harvest() public virtual override {
_harvest();
(uint harvested, uint treasuryFeeNova, uint buyBackFeeNova) = getFees();
depositToken(harvested);
totalBuyBack = totalBuyBack.add(buyBackFeeNova);
totalTreasury = totalTreasury.add(treasuryFeeNova);
totalProfit = totalProfit.add(harvested);
emit Harvested(harvested, treasuryFeeNova, buyBackFeeNova);
lastHarvest = block.timestamp;
}
function withdraw(uint _amount) public override virtual nonReentrant {
harvest();
uint amount = Math.min(_amount, _principal[msg.sender]);
uint shares = Math.min(amount.mul(totalShares).div(balance()), _shares[msg.sender]);
totalShares = totalShares.sub(shares);
_shares[msg.sender] = _shares[msg.sender].sub(shares);
_principal[msg.sender] = _principal[msg.sender].sub(amount);
resetShares();
amount = _withdrawTokenWithCorrection(amount);
uint withdrawalFee = _vaultGovernance.calculateWithdrawalFee(amount, _depositedAt[msg.sender]);
if (withdrawalFee > 0) {
_stakingToken.safeTransfer(_vaultGovernance.treasuryAddress(), withdrawalFee);
amount = amount.sub(withdrawalFee);
totalWithdrawalFee = totalWithdrawalFee.add(withdrawalFee);
}
_stakingToken.safeTransfer(msg.sender, amount);
emit Withdrawn(msg.sender, amount, withdrawalFee);
}
function getReward() external virtual override nonReentrant {
harvest();
uint amount = earned(msg.sender);
if (amount > 0) {
amount = _withdrawTokenWithCorrection(amount);
_stakingToken.safeTransfer(msg.sender, amount);
totalShares = totalShares.sub(_shares[msg.sender]);
if (totalShares == 0) {
_shares[msg.sender] = principalOf(msg.sender);
} else {
uint bal = balance().sub(principalOf(msg.sender));
_shares[msg.sender] = principalOf(msg.sender).mul(totalShares).div(bal);
}
totalShares = totalShares.add(_shares[msg.sender]);
emit RewardsPaid(msg.sender, amount, 0);
}
}
function emergencyWithdraw(uint _amount) override virtual public whenPaused nonReentrant {
uint amount = Math.min(_amount, _principal[msg.sender]);
uint shares = Math.min(amount.mul(totalShares).div(balance()), _shares[msg.sender]);
totalShares = totalShares.sub(shares);
_shares[msg.sender] = _shares[msg.sender].sub(shares);
_principal[msg.sender] = _principal[msg.sender].sub(amount);
resetShares();
amount = _withdrawTokenWithCorrection(amount);
_stakingToken.safeTransfer(msg.sender, amount);
emit Withdrawn(msg.sender, amount, 0);
}
/* ========== INTERNAL FUNCTIONS ========== */
function getFees() internal virtual returns (uint harvested, uint treasuryFeeNova, uint buyBackFeeNova);
function depositToken(uint _amount) internal virtual;
function _withdrawTokenWithCorrection(uint amount) internal virtual returns (uint);
function _harvest() internal virtual {
depositToken(0);
}
function _depositTo(uint _amount, address _to) internal virtual nonReentrant whenNotPaused {
harvest();
uint _pool = balance();
uint _before = _stakingToken.balanceOf(address(this));
_stakingToken.safeTransferFrom(msg.sender, address(this), _amount);
uint _after = _stakingToken.balanceOf(address(this));
_amount = _after.sub(_before);
uint depositFee = _vaultGovernance.calculateDepositFee(_amount);
if (depositFee > 0) {
_stakingToken.safeTransfer(_vaultGovernance.treasuryAddress(), depositFee);
_amount = _amount.sub(depositFee);
totalDepositFee = totalDepositFee.add(depositFee);
}
uint shares = 0;
if (totalShares == 0) {
shares = _amount;
} else {
shares = (_amount.mul(totalShares)).div(_pool);
}
totalShares = totalShares.add(shares);
_shares[_to] = _shares[_to].add(shares);
_principal[_to] = _principal[_to].add(_amount);
_depositedAt[_to] = block.timestamp;
depositToken(_amount);
emit Deposited(_to, _amount, depositFee);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* MIT License
* ===========
*
* Copyright (c) 2021 Novabeam
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
import "../../farm/interfaces/IMasterChef.sol";
import "../../uniswapv2/interfaces/IUniswapV2Router02.sol";
import "./Vault.sol";
import "../interfaces/IVaultChef.sol";
abstract contract VaultChef is Vault {
using SafeERC20 for IERC20;
using SafeMath for uint256;
/* ========== STATE VARIABLES ========== */
IUniswapV2Router02 internal _router;
IMasterChef internal _masterChef;
uint internal _pid;
/* ========== CONSTRUCTOR ========== */
constructor(
address _sToken,
address _rToken,
address _nToken,
address _vGovernance,
address _routerAddress,
address _mChef,
uint _chefPid
) Vault(_sToken, _rToken, _nToken, _vGovernance) {
_router = IUniswapV2Router02(_routerAddress);
_masterChef = IMasterChef(_mChef);
_pid = _chefPid;
_stakingToken.safeApprove(address(_masterChef), type(uint256).max);
}
/* ========== VIEW FUNCTIONS ========== */
function chef() external view returns (address) {
return address(_masterChef);
}
function router() external view returns (address) {
return address(_router);
}
function pid() external view returns (uint) {
return _pid;
}
function balance() public view virtual override returns (uint amount) {
(amount,,,) = _masterChef.userInfo(_pid, address(this));
}
/* ========== INTERNAL FUNCTIONS ========== */
function getFees() internal override virtual returns (uint harvested, uint treasuryFeeNova, uint buyBackFeeNova) {
uint256 _balance = _rewardsToken.balanceOf(address(this));
treasuryFeeNova = _vaultGovernance.calculateTreasuryFee(_balance);
buyBackFeeNova = _vaultGovernance.calculateBuyBackFee(_balance);
IVaultStrategyReward buyBackAddress = IVaultStrategyReward(_vaultGovernance.buyBackAddress());
_rewardsToken.safeTransfer(address(buyBackAddress), buyBackFeeNova);
_rewardsToken.safeTransfer(_vaultGovernance.treasuryAddress(), treasuryFeeNova);
try buyBackAddress.sendStrategyReward() {} catch {}
harvested = _rewardsToken.balanceOf(address(this));
}
function depositToken(uint _amount) internal virtual override {
_masterChef.deposit(_pid, _amount);
}
function _withdrawTokenWithCorrection(uint amount) internal virtual override returns (uint) {
uint before = _stakingToken.balanceOf(address(this));
_masterChef.withdraw(_pid, amount);
return _stakingToken.balanceOf(address(this)).sub(before);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* MIT License
* ===========
*
* Copyright (c) 2021 Novabeam
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "../interfaces/IVaultStrategyReward.sol";
import "../interfaces/IVaultGovernance.sol";
import "../interfaces/IVaultController.sol";
abstract contract VaultController is IVaultController, Pausable, ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
/* ========== STATE VARIABLES ========== */
IVaultGovernance internal _vaultGovernance;
IERC20 internal _stakingToken;
IERC20 internal _rewardsToken;
IERC20 internal _novaToken;
uint public totalShares;
mapping(address => uint) internal _shares;
mapping(address => uint) internal _principal;
mapping(address => uint) internal _depositedAt;
uint public totalBuyBack;
uint public totalTreasury;
uint public totalProfit;
uint public totalDepositFee;
uint public totalWithdrawalFee;
/* ========== Event ========== */
event Recovered(address token, uint amount);
/* ========== CONSTRUCTOR ========== */
constructor(address _sToken, address _rToken, address _nToken, address _vGovernance) {
_stakingToken = IERC20(_sToken);
_rewardsToken = IERC20(_rToken);
_novaToken = IERC20(_nToken);
_vaultGovernance = IVaultGovernance(_vGovernance);
}
/* ========== VIEW FUNCTIONS ========== */
function totalSupply() external view override returns (uint) {
return totalShares;
}
function balance() public view virtual override returns (uint amount) {
return _stakingToken.balanceOf(address(this));
}
function
balanceOf(address account) public view override returns (uint) {
if (totalShares == 0) return 0;
return balance().mul(sharesOf(account)).div(totalShares);
}
function sharesOf(address account) public view override returns (uint) {
return _shares[account];
}
function principalOf(address account) public view override returns (uint) {
return _principal[account];
}
function earned(address account) public view virtual override returns (uint) {
if (balanceOf(account) >= principalOf(account)) {
return balanceOf(account).sub(principalOf(account));
} else {
return 0;
}
}
function depositedAt(address account) external view override returns (uint) {
return _depositedAt[account];
}
function stakingToken() external view override returns (address) {
return address(_stakingToken);
}
function rewardsToken() external view override returns (address) {
return address(_rewardsToken);
}
function novaToken() external view override returns (address) {
return address(_novaToken);
}
function vaultGovernance() external view override returns (address) {
return address(_vaultGovernance);
}
function resetShares() virtual internal {
uint shares = _shares[msg.sender];
if (shares > 0 && shares < 1000) {
totalShares = totalShares.sub(shares);
delete _shares[msg.sender];
}
}
/* ========== SALVAGE PURPOSE ONLY ========== */
function emergencyWithdraw(uint _amount) virtual public whenPaused nonReentrant {}
function recoverToken(address _token, uint amount) virtual external onlyOwner {
require(_token != address(_stakingToken), 'VaultController: cannot recover staking token');
IERC20(_token).safeTransfer(owner(), amount);
emit Recovered(_token, amount);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
*
* MIT License
* ===========
*
* Copyright (c) 2021 Novabeam
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
import "./IVaultController.sol";
interface IVault is IVaultController {
function deposit(uint _amount) external;
function depositAll() external;
function withdraw(uint _amount) external;
function withdrawAll() external;
function getReward() external;
function harvest() external;
event Deposited(address indexed user, uint amount, uint depositFee);
event Withdrawn(address indexed user, uint amount, uint withdrawalFee);
event RewardsPaid(address indexed user, uint rewards, uint rewardsNova);
event Harvested(uint harvested, uint treasuryFeeInNova, uint buyBackInNova);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
*
* MIT License
* ===========
*
* Copyright (c) 2021 Novabeam
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
import "./IVault.sol";
interface IVaultChef is IVault {
function chef() external view returns (address);
function router() external view returns (address);
function pid() external view returns (uint);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
*
* MIT License
* ===========
*
* Copyright (c) 2021 Novabeam
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
interface IVaultController {
function totalSupply() external view returns (uint);
function balance() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function principalOf(address account) external view returns (uint);
function sharesOf(address account) external view returns (uint);
function earned(address account) external view returns (uint);
function depositedAt(address account) external view returns (uint);
function rewardsToken() external view returns (address);
function stakingToken() external view returns (address);
function novaToken() external view returns (address);
function vaultGovernance() external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
*
* MIT License
* ===========
*
* Copyright (c) 2021 Novabeam
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
interface IVaultGovernance {
function setWithdrawalFeeFreePeriod(uint _period) external;
function setWithdrawalFee(uint _fee) external;
function setDepositFee(uint _fee) external;
function setTreasuryFee(uint _fee) external;
function setBuyBackFee(uint _fee) external;
function setBuyBackAddress(address _buyBackAddress) external;
function setTreasuryAddress(address _treasuryAddress) external;
function calculateWithdrawalFee(uint amount, uint depositedAt) external view returns (uint);
function calculateDepositFee(uint amount) external view returns (uint);
function calculateTreasuryFee(uint amount) external view returns (uint);
function calculateBuyBackFee(uint amount) external view returns (uint);
function calculateNovaFee(uint amount, uint option) external view returns (uint);
function withdrawalFee() external view returns (uint);
function withdrawalFeeFreePeriod() external view returns (uint);
function depositFee() external view returns (uint);
function treasuryFee() external view returns (uint);
function buyBackFee() external view returns (uint);
function buyBackAddress() external view returns (address);
function treasuryAddress() external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
*
* MIT License
* ===========
*
* Copyright (c) 2021 Novabeam
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
interface IVaultStrategyReward {
function totalShares() external view returns (uint256);
function totalReleased() external view returns (uint256);
function shares(address account) external view returns (uint256);
function released(address account) external view returns (uint256);
function vault(uint256 index) external view returns (address);
function nova() external view returns (address);
function sendStrategyReward() external;
function addPayee(address _vault, uint256 shares_) external;
function updatePayee(address _vault, uint256 shares_) external;
}{
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_sToken","type":"address"},{"internalType":"address","name":"_vGovernance","type":"address"},{"internalType":"address","name":"_routerAddress","type":"address"},{"internalType":"address","name":"_mChef","type":"address"},{"internalType":"uint256","name":"_chefPid","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"depositFee","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"harvested","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryFeeInNova","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"buyBackInNova","type":"uint256"}],"name":"Harvested","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"rewards","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardsNova","type":"uint256"}],"name":"RewardsPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"withdrawalFee","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chef","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"depositedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earnedNova","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastHarvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"novaToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"principalOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"sharesOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBuyBack","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDepositFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalProfit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTreasury","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalWithdrawalFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vaultGovernance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b50604051620026ff380380620026ff83398101604081905262000034916200045d565b6000805460ff1916905560018055848080868686868480808681808083620000656200005f6200010a565b6200010e565b600480546001600160a01b03199081166001600160a01b03968716179182905560058054821695871695909517909455600680548516938616939093179092556003805484169185169190911790556011805483168b85161790556012805490921689841617918290556013889055620000f8965082169450169150600019905062000160602090811b62000ddc17901c565b505050505050505050505050620006db565b3390565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b801580620001ef5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906200019990309086906004016200051c565b60206040518083038186803b158015620001b257600080fd5b505afa158015620001c7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ed9190620004e5565b155b620002175760405162461bcd60e51b81526004016200020e906200064b565b60405180910390fd5b620002728363095ea7b360e01b84846040516024016200023992919062000536565b60408051808303601f190181529190526020810180516001600160e01b0319939093166001600160e01b03938416179052906200027716565b505050565b6000620002d3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200031360201b62000edb179092919060201c565b805190915015620002725780806020019051810190620002f49190620004c3565b620002725760405162461bcd60e51b81526004016200020e9062000601565b60606200032484846000856200032e565b90505b9392505050565b606082471015620003535760405162461bcd60e51b81526004016200020e9062000584565b6200035e85620003fd565b6200037d5760405162461bcd60e51b81526004016200020e90620005ca565b600080866001600160a01b031685876040516200039b9190620004fe565b60006040518083038185875af1925050503d8060008114620003da576040519150601f19603f3d011682016040523d82523d6000602084013e620003df565b606091505b509092509050620003f282828662000407565b979650505050505050565b803b15155b919050565b606083156200041857508162000327565b825115620004295782518084602001fd5b8160405162461bcd60e51b81526004016200020e91906200054f565b80516001600160a01b03811681146200040257600080fd5b600080600080600060a0868803121562000475578081fd5b620004808662000445565b9450620004906020870162000445565b9350620004a06040870162000445565b9250620004b06060870162000445565b9150608086015190509295509295909350565b600060208284031215620004d5578081fd5b8151801515811462000327578182fd5b600060208284031215620004f7578081fd5b5051919050565b6000825162000512818460208701620006a8565b9190910192915050565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b600060208252825180602084015262000570816040850160208701620006a8565b601f01601f19169190910160400192915050565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606082015260800190565b60005b83811015620006c5578181015183820152602001620006ab565b83811115620006d5576000848401525b50505050565b61201480620006eb6000396000f3fe608060405234801561001057600080fd5b50600436106102055760003560e01c8063853828b61161011a578063ce91bb9e116100ad578063f1a392da1161007c578063f1a392da14610387578063f2fde38b1461038f578063f5eb42dc146103a2578063f887ea40146103b5578063fe255a5e146103bd57610205565b8063ce91bb9e1461035c578063d1af0c7d1461036f578063de5f626814610377578063f10684541461037f57610205565b8063916bd71e116100e9578063916bd71e14610326578063b29a81401461032e578063b69ef8a814610341578063b6b55f251461034957610205565b8063853828b614610306578063860015191461030e578063897534a9146103165780638da5cb5b1461031e57610205565b80633d18b9121161019d5780635c975abb1161016c5780635c975abb146102bb57806361e20a1c146102d057806370a08231146102e3578063715018a6146102f657806372f702f3146102fe57610205565b80633d18b912146102905780634641257d1461029857806346951239146102a05780635312ea8e146102a857610205565b8063208e5acc116101d9578063208e5acc1461025857806323ecd50e1461026b5780632e1a7d4d146102735780633a98ef391461028857610205565b80628cc2621461020a578063104e51421461023357806318160ddd146102485780631fc8bc5d14610250575b600080fd5b61021d610218366004611ab4565b6103c5565b60405161022a9190611ed5565b60405180910390f35b61023b610409565b60405161022a9190611bb8565b61021d610418565b61023b61041e565b61021d610266366004611ab4565b61042d565b61021d610448565b610286610281366004611b37565b61044e565b005b61021d610702565b610286610708565b610286610858565b61021d6108f1565b6102866102b6366004611b37565b6108f7565b6102c3610a4b565b60405161022a9190611c23565b61021d6102de366004611ab4565b610a54565b61021d6102f1366004611ab4565b610a6f565b610286610aa4565b61023b610aef565b610286610afe565b61021d610b0a565b61021d610b10565b61023b610b16565b61021d610b25565b61028661033c366004611aec565b610b2b565b61021d610bf1565b610286610357366004611b37565b610c7f565b61021d61036a366004611ab4565b610c8c565b61023b610c97565b610286610ca6565b61021d610d29565b61021d610d2f565b61028661039d366004611ab4565b610d35565b61021d6103b0366004611ab4565b610da3565b61023b610dbe565b61023b610dcd565b60006103d082610a54565b6103d983610a6f565b10610400576103f96103ea83610a54565b6103f384610a6f565b90610ef4565b9050610404565b5060005b919050565b6006546001600160a01b031690565b60075490565b6012546001600160a01b031690565b6001600160a01b03166000908152600a602052604090205490565b600e5481565b6002600154141561047a5760405162461bcd60e51b815260040161047190611e48565b60405180910390fd5b6002600155610487610858565b336000908152600960205260408120546104a2908390610f00565b905060006104dd6104c86104b4610bf1565b6007546104c2908690610f16565b90610f22565b33600090815260086020526040902054610f00565b6007549091506104ed9082610ef4565b6007553360009081526008602052604090205461050a9082610ef4565b336000908152600860209081526040808320939093556009905220546105309083610ef4565b33600090815260096020526040902055610548610f2e565b61055182610f76565b600354336000908152600a6020526040808220549051631127bce960e11b815293955090926001600160a01b039092169163224f79d29161059791879190600401611ef5565b60206040518083038186803b1580156105af57600080fd5b505afa1580156105c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e79190611b4f565b9050801561069e576003546040805163c5f956af60e01b81529051610680926001600160a01b03169163c5f956af916004808301926020929190829003018186803b15801561063557600080fd5b505afa158015610649573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066d9190611ad0565b6004546001600160a01b031690836110e5565b61068a8382610ef4565b600f5490935061069a9082611104565b600f555b6004546106b5906001600160a01b031633856110e5565b336001600160a01b03167f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc684836040516106f0929190611ef5565b60405180910390a25050600180555050565b60075481565b6002600154141561072b5760405162461bcd60e51b815260040161047190611e48565b6002600155610738610858565b6000610743336103c5565b905080156108515761075481610f76565b60045490915061076e906001600160a01b031633836110e5565b3360009081526008602052604090205460075461078a91610ef4565b60078190556107b15761079c33610a54565b336000908152600860205260409020556107f4565b60006107c76107bf33610a54565b6103f3610bf1565b90506107e2816104c26007546107dc33610a54565b90610f16565b33600090815260086020526040902055505b3360009081526008602052604090205460075461081091611104565b60075560405133907f53195aae24c76f608fd5b9b6ee2da62eb3a6f4e5279d15a8ddfef43199a4b38e90610848908490600090611ef5565b60405180910390a25b5060018055565b610860611110565b600080600061086d61111a565b92509250925061087c836114b0565b600b546108899082611104565b600b55600c546108999083611104565b600c55600d546108a99084611104565b600d556040517febdd323f18ba49318367d0c92a04d5c51a67f15a60ad50d46523db464661a302906108e090859085908590611f03565b60405180910390a150504260105550565b600b5481565b6108ff610a4b565b61091b5760405162461bcd60e51b815260040161047190611c61565b6002600154141561093e5760405162461bcd60e51b815260040161047190611e48565b60026001553360009081526009602052604081205461095e908390610f00565b905060006109706104c86104b4610bf1565b6007549091506109809082610ef4565b6007553360009081526008602052604090205461099d9082610ef4565b336000908152600860209081526040808320939093556009905220546109c39083610ef4565b336000908152600960205260409020556109db610f2e565b6109e482610f76565b6004549092506109fe906001600160a01b031633846110e5565b336001600160a01b03167f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6836000604051610a3a929190611ef5565b60405180910390a250506001805550565b60005460ff1690565b6001600160a01b031660009081526009602052604090205490565b600060075460001415610a8457506000610404565b610a9e6007546104c2610a9685610da3565b6107dc610bf1565b92915050565b610aac611518565b6001600160a01b0316610abd610b16565b6001600160a01b031614610ae35760405162461bcd60e51b815260040161047190611d92565b610aed600061151c565b565b6004546001600160a01b031690565b610aed61028133610a6f565b600d5481565b600c5481565b6002546001600160a01b031690565b600f5481565b610b33611518565b6001600160a01b0316610b44610b16565b6001600160a01b031614610b6a5760405162461bcd60e51b815260040161047190611d92565b6004546001600160a01b0383811691161415610b985760405162461bcd60e51b815260040161047190611cd5565b610bb4610ba3610b16565b6001600160a01b03841690836110e5565b7f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa288282604051610be5929190611c0a565b60405180910390a15050565b6012546013546040516393f1a40b60e01b81526000926001600160a01b0316916393f1a40b91610c2691903090600401611ede565b60806040518083038186803b158015610c3e57600080fd5b505afa158015610c52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c769190611b67565b50919392505050565b610c89813361156e565b50565b6000610a9e826103c5565b6005546001600160a01b031690565b600480546040516370a0823160e01b8152610aed926001600160a01b03909216916370a0823191610cd991339101611bb8565b60206040518083038186803b158015610cf157600080fd5b505afa158015610d05573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103579190611b4f565b60135490565b60105481565b610d3d611518565b6001600160a01b0316610d4e610b16565b6001600160a01b031614610d745760405162461bcd60e51b815260040161047190611d92565b6001600160a01b038116610d9a5760405162461bcd60e51b815260040161047190611c8f565b610c898161151c565b6001600160a01b031660009081526008602052604090205490565b6011546001600160a01b031690565b6003546001600160a01b031690565b801580610e645750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e90610e129030908690600401611bcc565b60206040518083038186803b158015610e2a57600080fd5b505afa158015610e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e629190611b4f565b155b610e805760405162461bcd60e51b815260040161047190611e7f565b610ed68363095ea7b360e01b8484604051602401610e9f929190611c0a565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526118ff565b505050565b6060610eea848460008561198e565b90505b9392505050565b6000610eed8284611f70565b6000818310610f0f5781610eed565b5090919050565b6000610eed8284611f51565b6000610eed8284611f31565b336000908152600860205260409020548015801590610f4e57506103e881105b15610c8957600754610f609082610ef4565b6007553360009081526008602052604081205550565b600480546040516370a0823160e01b815260009283926001600160a01b0316916370a0823191610fa891309101611bb8565b60206040518083038186803b158015610fc057600080fd5b505afa158015610fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff89190611b4f565b601254601354604051630441a3e760e41b81529293506001600160a01b039091169163441a3e709161102e918790600401611ef5565b600060405180830381600087803b15801561104857600080fd5b505af115801561105c573d6000803e3d6000fd5b5050600480546040516370a0823160e01b8152610eed94508593506001600160a01b03909116916370a082319161109591309101611bb8565b60206040518083038186803b1580156110ad57600080fd5b505afa1580156110c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f39190611b4f565b610ed68363a9059cbb60e01b8484604051602401610e9f929190611c0a565b6000610eed8284611f19565b610aed60006114b0565b6005546040516370a0823160e01b81526000918291829182916001600160a01b03909116906370a0823190611153903090600401611bb8565b60206040518083038186803b15801561116b57600080fd5b505afa15801561117f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a39190611b4f565b600354604051634ba71a4b60e01b81529192506001600160a01b031690634ba71a4b906111d4908490600401611ed5565b60206040518083038186803b1580156111ec57600080fd5b505afa158015611200573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112249190611b4f565b600354604051633f147d4760e21b81529194506001600160a01b03169063fc51f51c90611255908490600401611ed5565b60206040518083038186803b15801561126d57600080fd5b505afa158015611281573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a59190611b4f565b91506000600360009054906101000a90046001600160a01b03166001600160a01b031663783478ad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112f757600080fd5b505afa15801561130b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132f9190611ad0565b600554909150611349906001600160a01b031682856110e5565b6003546040805163c5f956af60e01b815290516113da926001600160a01b03169163c5f956af916004808301926020929190829003018186803b15801561138f57600080fd5b505afa1580156113a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c79190611ad0565b6005546001600160a01b031690866110e5565b806001600160a01b0316633f556e8e6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561141557600080fd5b505af1925050508015611426575060015b506005546040516370a0823160e01b81526001600160a01b03909116906370a0823190611457903090600401611bb8565b60206040518083038186803b15801561146f57600080fd5b505afa158015611483573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a79190611b4f565b94505050909192565b601254601354604051631c57762b60e31b81526001600160a01b039092169163e2bbb158916114e3918590600401611ef5565b600060405180830381600087803b1580156114fd57600080fd5b505af1158015611511573d6000803e3d6000fd5b5050505050565b3390565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260015414156115915760405162461bcd60e51b815260040161047190611e48565b600260015561159e610a4b565b156115bb5760405162461bcd60e51b815260040161047190611d68565b6115c3610858565b60006115cd610bf1565b600480546040516370a0823160e01b81529293506000926001600160a01b03909116916370a082319161160291309101611bb8565b60206040518083038186803b15801561161a57600080fd5b505afa15801561162e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116529190611b4f565b60045490915061166d906001600160a01b0316333087611a4e565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a082319161169f91309101611bb8565b60206040518083038186803b1580156116b757600080fd5b505afa1580156116cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ef9190611b4f565b90506116fb8183610ef4565b60035460405163247d284b60e01b81529196506000916001600160a01b039091169063247d284b90611731908990600401611ed5565b60206040518083038186803b15801561174957600080fd5b505afa15801561175d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117819190611b4f565b905080156117ed576003546040805163c5f956af60e01b815290516117cf926001600160a01b03169163c5f956af916004808301926020929190829003018186803b15801561063557600080fd5b6117d98682610ef4565b600e549096506117e99082611104565b600e555b60006007546000141561180157508561181d565b61181a856104c26007548a610f1690919063ffffffff16565b90505b60075461182a9082611104565b6007556001600160a01b0386166000908152600860205260409020546118509082611104565b6001600160a01b03871660009081526008602090815260408083209390935560099052205461187f9088611104565b6001600160a01b038716600090815260096020908152604080832093909355600a9052204290556118af876114b0565b856001600160a01b03167f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca88846040516118ea929190611ef5565b60405180910390a25050600180555050505050565b6000611954826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610edb9092919063ffffffff16565b805190915015610ed657808060200190518101906119729190611b17565b610ed65760405162461bcd60e51b815260040161047190611dfe565b6060824710156119b05760405162461bcd60e51b815260040161047190611d22565b6119b985611a75565b6119d55760405162461bcd60e51b815260040161047190611dc7565b600080866001600160a01b031685876040516119f19190611b9c565b60006040518083038185875af1925050503d8060008114611a2e576040519150601f19603f3d011682016040523d82523d6000602084013e611a33565b606091505b5091509150611a43828286611a7b565b979650505050505050565b611a6f846323b872dd60e01b858585604051602401610e9f93929190611be6565b50505050565b3b151590565b60608315611a8a575081610eed565b825115611a9a5782518084602001fd5b8160405162461bcd60e51b81526004016104719190611c2e565b600060208284031215611ac5578081fd5b8135610eed81611fc9565b600060208284031215611ae1578081fd5b8151610eed81611fc9565b60008060408385031215611afe578081fd5b8235611b0981611fc9565b946020939093013593505050565b600060208284031215611b28578081fd5b81518015158114610eed578182fd5b600060208284031215611b48578081fd5b5035919050565b600060208284031215611b60578081fd5b5051919050565b60008060008060808587031215611b7c578182fd5b505082516020840151604085015160609095015191969095509092509050565b60008251611bae818460208701611f87565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602082528251806020840152611c4d816040850160208701611f87565b601f01601f19169190910160400192915050565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252602d908201527f5661756c74436f6e74726f6c6c65723a2063616e6e6f74207265636f7665722060408201526c39ba30b5b4b733903a37b5b2b760991b606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b90815260200190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60008219821115611f2c57611f2c611fb3565b500190565b600082611f4c57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611f6b57611f6b611fb3565b500290565b600082821015611f8257611f82611fb3565b500390565b60005b83811015611fa2578181015183820152602001611f8a565b83811115611a6f5750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610c8957600080fdfea264697066735822122024b10288c3c87ecc388531ce0fe1758b7295db220945106332b7f77adee6c09964736f6c6343000800003300000000000000000000000036e737f1437dc801f68275418a72f9c8e79a96df000000000000000000000000d0315ef43d5a9043b8a2a7465883076b18db31ec000000000000000000000000e4cdeec505eb6745d1ba1be40784fba9976cf9bc000000000000000000000000bd5b8d19c7ef00025d9dbcbbee134bc8a84a8b890000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102055760003560e01c8063853828b61161011a578063ce91bb9e116100ad578063f1a392da1161007c578063f1a392da14610387578063f2fde38b1461038f578063f5eb42dc146103a2578063f887ea40146103b5578063fe255a5e146103bd57610205565b8063ce91bb9e1461035c578063d1af0c7d1461036f578063de5f626814610377578063f10684541461037f57610205565b8063916bd71e116100e9578063916bd71e14610326578063b29a81401461032e578063b69ef8a814610341578063b6b55f251461034957610205565b8063853828b614610306578063860015191461030e578063897534a9146103165780638da5cb5b1461031e57610205565b80633d18b9121161019d5780635c975abb1161016c5780635c975abb146102bb57806361e20a1c146102d057806370a08231146102e3578063715018a6146102f657806372f702f3146102fe57610205565b80633d18b912146102905780634641257d1461029857806346951239146102a05780635312ea8e146102a857610205565b8063208e5acc116101d9578063208e5acc1461025857806323ecd50e1461026b5780632e1a7d4d146102735780633a98ef391461028857610205565b80628cc2621461020a578063104e51421461023357806318160ddd146102485780631fc8bc5d14610250575b600080fd5b61021d610218366004611ab4565b6103c5565b60405161022a9190611ed5565b60405180910390f35b61023b610409565b60405161022a9190611bb8565b61021d610418565b61023b61041e565b61021d610266366004611ab4565b61042d565b61021d610448565b610286610281366004611b37565b61044e565b005b61021d610702565b610286610708565b610286610858565b61021d6108f1565b6102866102b6366004611b37565b6108f7565b6102c3610a4b565b60405161022a9190611c23565b61021d6102de366004611ab4565b610a54565b61021d6102f1366004611ab4565b610a6f565b610286610aa4565b61023b610aef565b610286610afe565b61021d610b0a565b61021d610b10565b61023b610b16565b61021d610b25565b61028661033c366004611aec565b610b2b565b61021d610bf1565b610286610357366004611b37565b610c7f565b61021d61036a366004611ab4565b610c8c565b61023b610c97565b610286610ca6565b61021d610d29565b61021d610d2f565b61028661039d366004611ab4565b610d35565b61021d6103b0366004611ab4565b610da3565b61023b610dbe565b61023b610dcd565b60006103d082610a54565b6103d983610a6f565b10610400576103f96103ea83610a54565b6103f384610a6f565b90610ef4565b9050610404565b5060005b919050565b6006546001600160a01b031690565b60075490565b6012546001600160a01b031690565b6001600160a01b03166000908152600a602052604090205490565b600e5481565b6002600154141561047a5760405162461bcd60e51b815260040161047190611e48565b60405180910390fd5b6002600155610487610858565b336000908152600960205260408120546104a2908390610f00565b905060006104dd6104c86104b4610bf1565b6007546104c2908690610f16565b90610f22565b33600090815260086020526040902054610f00565b6007549091506104ed9082610ef4565b6007553360009081526008602052604090205461050a9082610ef4565b336000908152600860209081526040808320939093556009905220546105309083610ef4565b33600090815260096020526040902055610548610f2e565b61055182610f76565b600354336000908152600a6020526040808220549051631127bce960e11b815293955090926001600160a01b039092169163224f79d29161059791879190600401611ef5565b60206040518083038186803b1580156105af57600080fd5b505afa1580156105c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e79190611b4f565b9050801561069e576003546040805163c5f956af60e01b81529051610680926001600160a01b03169163c5f956af916004808301926020929190829003018186803b15801561063557600080fd5b505afa158015610649573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066d9190611ad0565b6004546001600160a01b031690836110e5565b61068a8382610ef4565b600f5490935061069a9082611104565b600f555b6004546106b5906001600160a01b031633856110e5565b336001600160a01b03167f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc684836040516106f0929190611ef5565b60405180910390a25050600180555050565b60075481565b6002600154141561072b5760405162461bcd60e51b815260040161047190611e48565b6002600155610738610858565b6000610743336103c5565b905080156108515761075481610f76565b60045490915061076e906001600160a01b031633836110e5565b3360009081526008602052604090205460075461078a91610ef4565b60078190556107b15761079c33610a54565b336000908152600860205260409020556107f4565b60006107c76107bf33610a54565b6103f3610bf1565b90506107e2816104c26007546107dc33610a54565b90610f16565b33600090815260086020526040902055505b3360009081526008602052604090205460075461081091611104565b60075560405133907f53195aae24c76f608fd5b9b6ee2da62eb3a6f4e5279d15a8ddfef43199a4b38e90610848908490600090611ef5565b60405180910390a25b5060018055565b610860611110565b600080600061086d61111a565b92509250925061087c836114b0565b600b546108899082611104565b600b55600c546108999083611104565b600c55600d546108a99084611104565b600d556040517febdd323f18ba49318367d0c92a04d5c51a67f15a60ad50d46523db464661a302906108e090859085908590611f03565b60405180910390a150504260105550565b600b5481565b6108ff610a4b565b61091b5760405162461bcd60e51b815260040161047190611c61565b6002600154141561093e5760405162461bcd60e51b815260040161047190611e48565b60026001553360009081526009602052604081205461095e908390610f00565b905060006109706104c86104b4610bf1565b6007549091506109809082610ef4565b6007553360009081526008602052604090205461099d9082610ef4565b336000908152600860209081526040808320939093556009905220546109c39083610ef4565b336000908152600960205260409020556109db610f2e565b6109e482610f76565b6004549092506109fe906001600160a01b031633846110e5565b336001600160a01b03167f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6836000604051610a3a929190611ef5565b60405180910390a250506001805550565b60005460ff1690565b6001600160a01b031660009081526009602052604090205490565b600060075460001415610a8457506000610404565b610a9e6007546104c2610a9685610da3565b6107dc610bf1565b92915050565b610aac611518565b6001600160a01b0316610abd610b16565b6001600160a01b031614610ae35760405162461bcd60e51b815260040161047190611d92565b610aed600061151c565b565b6004546001600160a01b031690565b610aed61028133610a6f565b600d5481565b600c5481565b6002546001600160a01b031690565b600f5481565b610b33611518565b6001600160a01b0316610b44610b16565b6001600160a01b031614610b6a5760405162461bcd60e51b815260040161047190611d92565b6004546001600160a01b0383811691161415610b985760405162461bcd60e51b815260040161047190611cd5565b610bb4610ba3610b16565b6001600160a01b03841690836110e5565b7f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa288282604051610be5929190611c0a565b60405180910390a15050565b6012546013546040516393f1a40b60e01b81526000926001600160a01b0316916393f1a40b91610c2691903090600401611ede565b60806040518083038186803b158015610c3e57600080fd5b505afa158015610c52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c769190611b67565b50919392505050565b610c89813361156e565b50565b6000610a9e826103c5565b6005546001600160a01b031690565b600480546040516370a0823160e01b8152610aed926001600160a01b03909216916370a0823191610cd991339101611bb8565b60206040518083038186803b158015610cf157600080fd5b505afa158015610d05573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103579190611b4f565b60135490565b60105481565b610d3d611518565b6001600160a01b0316610d4e610b16565b6001600160a01b031614610d745760405162461bcd60e51b815260040161047190611d92565b6001600160a01b038116610d9a5760405162461bcd60e51b815260040161047190611c8f565b610c898161151c565b6001600160a01b031660009081526008602052604090205490565b6011546001600160a01b031690565b6003546001600160a01b031690565b801580610e645750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e90610e129030908690600401611bcc565b60206040518083038186803b158015610e2a57600080fd5b505afa158015610e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e629190611b4f565b155b610e805760405162461bcd60e51b815260040161047190611e7f565b610ed68363095ea7b360e01b8484604051602401610e9f929190611c0a565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526118ff565b505050565b6060610eea848460008561198e565b90505b9392505050565b6000610eed8284611f70565b6000818310610f0f5781610eed565b5090919050565b6000610eed8284611f51565b6000610eed8284611f31565b336000908152600860205260409020548015801590610f4e57506103e881105b15610c8957600754610f609082610ef4565b6007553360009081526008602052604081205550565b600480546040516370a0823160e01b815260009283926001600160a01b0316916370a0823191610fa891309101611bb8565b60206040518083038186803b158015610fc057600080fd5b505afa158015610fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff89190611b4f565b601254601354604051630441a3e760e41b81529293506001600160a01b039091169163441a3e709161102e918790600401611ef5565b600060405180830381600087803b15801561104857600080fd5b505af115801561105c573d6000803e3d6000fd5b5050600480546040516370a0823160e01b8152610eed94508593506001600160a01b03909116916370a082319161109591309101611bb8565b60206040518083038186803b1580156110ad57600080fd5b505afa1580156110c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f39190611b4f565b610ed68363a9059cbb60e01b8484604051602401610e9f929190611c0a565b6000610eed8284611f19565b610aed60006114b0565b6005546040516370a0823160e01b81526000918291829182916001600160a01b03909116906370a0823190611153903090600401611bb8565b60206040518083038186803b15801561116b57600080fd5b505afa15801561117f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a39190611b4f565b600354604051634ba71a4b60e01b81529192506001600160a01b031690634ba71a4b906111d4908490600401611ed5565b60206040518083038186803b1580156111ec57600080fd5b505afa158015611200573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112249190611b4f565b600354604051633f147d4760e21b81529194506001600160a01b03169063fc51f51c90611255908490600401611ed5565b60206040518083038186803b15801561126d57600080fd5b505afa158015611281573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a59190611b4f565b91506000600360009054906101000a90046001600160a01b03166001600160a01b031663783478ad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112f757600080fd5b505afa15801561130b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132f9190611ad0565b600554909150611349906001600160a01b031682856110e5565b6003546040805163c5f956af60e01b815290516113da926001600160a01b03169163c5f956af916004808301926020929190829003018186803b15801561138f57600080fd5b505afa1580156113a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c79190611ad0565b6005546001600160a01b031690866110e5565b806001600160a01b0316633f556e8e6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561141557600080fd5b505af1925050508015611426575060015b506005546040516370a0823160e01b81526001600160a01b03909116906370a0823190611457903090600401611bb8565b60206040518083038186803b15801561146f57600080fd5b505afa158015611483573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a79190611b4f565b94505050909192565b601254601354604051631c57762b60e31b81526001600160a01b039092169163e2bbb158916114e3918590600401611ef5565b600060405180830381600087803b1580156114fd57600080fd5b505af1158015611511573d6000803e3d6000fd5b5050505050565b3390565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260015414156115915760405162461bcd60e51b815260040161047190611e48565b600260015561159e610a4b565b156115bb5760405162461bcd60e51b815260040161047190611d68565b6115c3610858565b60006115cd610bf1565b600480546040516370a0823160e01b81529293506000926001600160a01b03909116916370a082319161160291309101611bb8565b60206040518083038186803b15801561161a57600080fd5b505afa15801561162e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116529190611b4f565b60045490915061166d906001600160a01b0316333087611a4e565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a082319161169f91309101611bb8565b60206040518083038186803b1580156116b757600080fd5b505afa1580156116cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ef9190611b4f565b90506116fb8183610ef4565b60035460405163247d284b60e01b81529196506000916001600160a01b039091169063247d284b90611731908990600401611ed5565b60206040518083038186803b15801561174957600080fd5b505afa15801561175d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117819190611b4f565b905080156117ed576003546040805163c5f956af60e01b815290516117cf926001600160a01b03169163c5f956af916004808301926020929190829003018186803b15801561063557600080fd5b6117d98682610ef4565b600e549096506117e99082611104565b600e555b60006007546000141561180157508561181d565b61181a856104c26007548a610f1690919063ffffffff16565b90505b60075461182a9082611104565b6007556001600160a01b0386166000908152600860205260409020546118509082611104565b6001600160a01b03871660009081526008602090815260408083209390935560099052205461187f9088611104565b6001600160a01b038716600090815260096020908152604080832093909355600a9052204290556118af876114b0565b856001600160a01b03167f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca88846040516118ea929190611ef5565b60405180910390a25050600180555050505050565b6000611954826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610edb9092919063ffffffff16565b805190915015610ed657808060200190518101906119729190611b17565b610ed65760405162461bcd60e51b815260040161047190611dfe565b6060824710156119b05760405162461bcd60e51b815260040161047190611d22565b6119b985611a75565b6119d55760405162461bcd60e51b815260040161047190611dc7565b600080866001600160a01b031685876040516119f19190611b9c565b60006040518083038185875af1925050503d8060008114611a2e576040519150601f19603f3d011682016040523d82523d6000602084013e611a33565b606091505b5091509150611a43828286611a7b565b979650505050505050565b611a6f846323b872dd60e01b858585604051602401610e9f93929190611be6565b50505050565b3b151590565b60608315611a8a575081610eed565b825115611a9a5782518084602001fd5b8160405162461bcd60e51b81526004016104719190611c2e565b600060208284031215611ac5578081fd5b8135610eed81611fc9565b600060208284031215611ae1578081fd5b8151610eed81611fc9565b60008060408385031215611afe578081fd5b8235611b0981611fc9565b946020939093013593505050565b600060208284031215611b28578081fd5b81518015158114610eed578182fd5b600060208284031215611b48578081fd5b5035919050565b600060208284031215611b60578081fd5b5051919050565b60008060008060808587031215611b7c578182fd5b505082516020840151604085015160609095015191969095509092509050565b60008251611bae818460208701611f87565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602082528251806020840152611c4d816040850160208701611f87565b601f01601f19169190910160400192915050565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252602d908201527f5661756c74436f6e74726f6c6c65723a2063616e6e6f74207265636f7665722060408201526c39ba30b5b4b733903a37b5b2b760991b606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b90815260200190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60008219821115611f2c57611f2c611fb3565b500190565b600082611f4c57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611f6b57611f6b611fb3565b500290565b600082821015611f8257611f82611fb3565b500390565b60005b83811015611fa2578181015183820152602001611f8a565b83811115611a6f5750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610c8957600080fdfea264697066735822122024b10288c3c87ecc388531ce0fe1758b7295db220945106332b7f77adee6c09964736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000036e737f1437dc801f68275418a72f9c8e79a96df000000000000000000000000d0315ef43d5a9043b8a2a7465883076b18db31ec000000000000000000000000e4cdeec505eb6745d1ba1be40784fba9976cf9bc000000000000000000000000bd5b8d19c7ef00025d9dbcbbee134bc8a84a8b890000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _sToken (address): 0x36e737F1437DC801f68275418A72f9c8E79A96df
Arg [1] : _vGovernance (address): 0xd0315eF43d5a9043b8a2a7465883076b18DB31EC
Arg [2] : _routerAddress (address): 0xe4CDEeC505EB6745d1BA1BE40784fba9976CF9bc
Arg [3] : _mChef (address): 0xBD5b8D19c7eF00025d9DbCBBEe134BC8A84A8B89
Arg [4] : _chefPid (uint256): 0
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000036e737f1437dc801f68275418a72f9c8e79a96df
Arg [1] : 000000000000000000000000d0315ef43d5a9043b8a2a7465883076b18db31ec
Arg [2] : 000000000000000000000000e4cdeec505eb6745d1ba1be40784fba9976cf9bc
Arg [3] : 000000000000000000000000bd5b8d19c7ef00025d9dbcbbee134bc8a84a8b89
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in GLMR
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.