Source Code
Overview
MOVR Balance
MOVR Value
$0.00View more zero value Internal Transactions in Advanced View mode
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xc0520505...555c7dcD2 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
VaultPink
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
pragma experimental ABIEncoderV2;
/*
*
* MIT License
* ===========
*
* Copyright (c) 2021 DotFinance
*
* 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 "@openzeppelin/contracts/utils/math/Math.sol";
import "../library/pancakeswap/SafeMath.sol";
import "../library/pancakeswap/SafeBEP20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "../interfaces/IStrategy.sol";
import "../interfaces/IPinkMinterV1.sol";
import "../interfaces/IPinkChef.sol";
import "./VaultController.sol";
import {PoolConstant} from "../library/PoolConstant.sol";
contract VaultPink is VaultController, IStrategy, ReentrancyGuardUpgradeable {
using SafeMath for uint;
using SafeBEP20 for IBEP20;
/* ========== CONSTANTS ============= */
PoolConstant.PoolTypes public constant override poolType = PoolConstant.PoolTypes.Pink;
/* ========== STATE VARIABLES ========== */
address public pinkToken;
uint public override pid;
uint private _totalSupply;
mapping(address => uint) private _balances;
mapping(address => uint) private _depositedAt;
/* ========== INITIALIZER ========== */
function initialize(address _token) external initializer {
require(_token != address(0), "token must be set");
pinkToken = _token;
__VaultController_init(IBEP20(pinkToken));
__ReentrancyGuard_init();
}
/* ========== VIEWS ========== */
function totalSupply() external view override returns (uint) {
return _totalSupply;
}
function balance() external view override returns (uint) {
return _totalSupply;
}
function balanceOf(address account) external view override returns (uint) {
return _balances[account];
}
function sharesOf(address account) external view override returns (uint) {
return _balances[account];
}
function principalOf(address account) external view override returns (uint) {
return _balances[account];
}
function depositedAt(address account) external view override returns (uint) {
return _depositedAt[account];
}
function withdrawableBalanceOf(address account) public view override returns (uint) {
return _balances[account];
}
function rewardsToken() external view override returns (address) {
return pinkToken;
}
function priceShare() external view override returns (uint) {
return 1e18;
}
function earned(address) override external view returns (uint) {
return 0;
}
/* ========== MUTATIVE FUNCTIONS ========== */
function deposit(uint amount) override public {
_deposit(amount, msg.sender);
}
function depositAll() override external {
deposit(_stakingToken.balanceOf(msg.sender));
}
function withdraw(uint amount) override public nonReentrant {
require(amount > 0, "VaultPink: amount must be greater than zero");
_pinkChef.notifyWithdrawn(msg.sender, amount);
_totalSupply = _totalSupply.sub(amount);
_balances[msg.sender] = _balances[msg.sender].sub(amount);
uint withdrawalFee;
if (canMint()) {
uint depositTimestamp = _depositedAt[msg.sender];
withdrawalFee = _minter.withdrawalFee(amount, depositTimestamp);
if (withdrawalFee > 0) {
_minter.mintFor(address(_stakingToken), withdrawalFee, 0, msg.sender, depositTimestamp);
amount = amount.sub(withdrawalFee);
}
}
_stakingToken.safeTransfer(msg.sender, amount);
emit Withdrawn(msg.sender, amount, withdrawalFee);
}
function withdrawAll() external override {
uint _withdraw = withdrawableBalanceOf(msg.sender);
if (_withdraw > 0) {
withdraw(_withdraw);
}
getReward();
}
function getReward() public override nonReentrant {
uint pinkAmount = _pinkChef.safePinkTransfer(msg.sender);
emit PinkPaid(msg.sender, pinkAmount, 0);
}
function harvest() external override {
}
/* ========== RESTRICTED FUNCTIONS ========== */
function setMinter(address newMinter) public override onlyOwner {
VaultController.setMinter(newMinter);
}
function setPinkChef(IPinkChef _chef) public override onlyOwner {
require(address(_pinkChef) == address(0), "VaultPink: setPinkChef only once");
VaultController.setPinkChef(IPinkChef(_chef));
}
/* ========== PRIVATE FUNCTIONS ========== */
function _deposit(uint amount, address _to) private nonReentrant notPaused {
require(amount > 0, "VaultPink: amount must be greater than zero");
_totalSupply = _totalSupply.add(amount);
_balances[_to] = _balances[_to].add(amount);
_depositedAt[_to] = block.timestamp;
_stakingToken.safeTransferFrom(msg.sender, address(this), amount);
_pinkChef.notifyDeposited(msg.sender, amount);
emit Deposited(_to, amount);
}
/* ========== SALVAGE PURPOSE ONLY ========== */
function recoverToken(address tokenAddress, uint tokenAmount) external override onlyOwner {
require(tokenAddress != address(_stakingToken), "VaultPink: cannot recover underlying token");
IBEP20(tokenAddress).safeTransfer(owner(), tokenAmount);
emit Recovered(tokenAddress, tokenAmount);
}
}// 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.7;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @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) {
uint256 c = a + b;
require(c >= a, 'SafeMath: addition overflow');
return c;
}
/**
* @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 sub(a, b, 'SafeMath: subtraction overflow');
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @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) {
// 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 0;
}
uint256 c = a * b;
require(c / a == b, 'SafeMath: multiplication overflow');
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) {
return div(a, b, 'SafeMath: division by zero');
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts 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) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts 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 mod(a, b, 'SafeMath: modulo by zero');
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message 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,
string memory errorMessage
) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
z = x < y ? x : y;
}
// babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
function sqrt(uint256 y) internal pure returns (uint256 z) {
if (y > 3) {
z = y;
uint256 x = y / 2 + 1;
while (x < z) {
z = x;
x = (y / x + x) / 2;
}
} else if (y != 0) {
z = 1;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import './IBEP20.sol';
import './SafeMath.sol';
import './Address.sol';
/**
* @title SafeBEP20
* @dev Wrappers around BEP20 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 SafeBEP20 for IBEP20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeBEP20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(
IBEP20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IBEP20 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
* {IBEP20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IBEP20 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'
// solhint-disable-next-line max-line-length
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
'SafeBEP20: approve from non-zero to non-zero allowance'
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IBEP20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(value);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IBEP20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(
value,
'SafeBEP20: decreased allowance below zero'
);
_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(IBEP20 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, 'SafeBEP20: low-level call failed');
if (returndata.length > 0) {
// Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), 'SafeBEP20: BEP20 operation did not succeed');
}
}
}// 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;
import "../proxy/utils/Initializable.sol";
/**
* @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 ReentrancyGuardUpgradeable is Initializable {
// 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;
function __ReentrancyGuard_init() internal initializer {
__ReentrancyGuard_init_unchained();
}
function __ReentrancyGuard_init_unchained() internal initializer {
_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;
}
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
pragma experimental ABIEncoderV2;
/*
*
* MIT License
* ===========
*
* Copyright (c) 2021 DotFinance
*
* 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 "../library/PoolConstant.sol";
import "./IVaultController.sol";
interface IStrategy is IVaultController {
function deposit(uint _amount) external;
function depositAll() external;
function withdraw(uint _amount) external; // PINK STAKING POOL ONLY
function withdrawAll() external;
function getReward() external; // PINK STAKING POOL ONLY
function harvest() external;
function totalSupply() external view returns (uint);
function balance() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function sharesOf(address account) external view returns (uint);
function principalOf(address account) external view returns (uint);
function earned(address account) external view returns (uint);
function withdrawableBalanceOf(address account) external view returns (uint); // PINK STAKING POOL ONLY
function priceShare() external view returns (uint);
/* ========== Strategy Information ========== */
function pid() external view returns (uint);
function poolType() external view returns (PoolConstant.PoolTypes);
function depositedAt(address account) external view returns (uint);
function rewardsToken() external view returns (address);
event Deposited(address indexed user, uint amount);
event Withdrawn(address indexed user, uint amount, uint withdrawalFee);
event ProfitPaid(address indexed user, uint profit, uint performanceFee);
event PinkPaid(address indexed user, uint profit, uint performanceFee);
event Harvested(uint profit);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
interface IPinkMinterV1 {
function isMinter(address) view external returns(bool);
function amountPinkToMint(uint movrProfit) view external returns(uint);
function withdrawalFee(uint amount, uint depositedAt) view external returns(uint);
function performanceFee(uint profit) view external returns(uint);
function mintFor(address flip, uint _withdrawalFee, uint _performanceFee, address to, uint depositedAt) external payable;
function pinkPerProfitMOVR() view external returns(uint);
function WITHDRAWAL_FEE_FREE_PERIOD() view external returns(uint);
function WITHDRAWAL_FEE() view external returns(uint);
function setMinter(address minter, bool canMint) external;
// V2 functions
function mint(uint amount) external;
function safePinkTransfer(address to, uint256 amount) external;
function mintGov(uint amount) external;
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
pragma experimental ABIEncoderV2;
/*
*
* MIT License
* ===========
*
* Copyright (c) 2021 DotFinance
*
* 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 IPinkChef {
struct UserInfo {
uint balance;
uint pending;
uint rewardPaid;
}
struct VaultInfo {
address token;
uint allocPoint; // How many allocation points assigned to this pool. PINKs to distribute per block.
uint lastRewardBlock; // Last block number that PINKs distribution occurs.
uint accPinkPerShare; // Accumulated PINKs per share, times 1e12. See below.
}
function pinkPerBlock() external view returns (uint);
function totalAllocPoint() external view returns (uint);
function vaultInfoOf(address vault) external view returns (VaultInfo memory);
function vaultUserInfoOf(address vault, address user) external view returns (UserInfo memory);
function pendingPink(address vault, address user) external view returns (uint);
function notifyDeposited(address user, uint amount) external;
function notifyWithdrawn(address user, uint amount) external;
function safePinkTransfer(address user) external returns (uint);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
pragma experimental ABIEncoderV2;
/*
*
* MIT License
* ===========
*
* Copyright (c) 2021 DotFinance
*
* 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 "../library/pancakeswap/SafeBEP20.sol";
import "../library/pancakeswap/BEP20.sol";
import "../interfaces/ISolarRouter02.sol";
import "../interfaces/ISolarPair.sol";
import "../interfaces/IStrategy.sol";
import "../interfaces/ISolarDistributorV2.sol";
import "../interfaces/IPinkMinterV1.sol";
import "../interfaces/IPinkChef.sol";
import "../library/PausableUpgradeable.sol";
import "../library/WhitelistUpgradeable.sol";
abstract contract VaultController is IVaultController, PausableUpgradeable, WhitelistUpgradeable {
using SafeBEP20 for IBEP20;
/* ========== STATE VARIABLES ========== */
address public keeper;
BEP20 public pink;
IBEP20 internal _stakingToken;
IPinkMinterV1 internal _minter;
IPinkChef internal _pinkChef;
/* ========== VARIABLE GAP ========== */
uint256[49] private __gap;
/* ========== Event ========== */
event KeeperUpdated(address indexed _before, address indexed _after);
event Recovered(address token, uint amount);
/* ========== MODIFIERS ========== */
modifier onlyKeeper {
require(msg.sender == keeper || msg.sender == owner(), 'VaultController: caller is not the owner or keeper');
_;
}
/* ========== INITIALIZER ========== */
function __VaultController_init(IBEP20 token) internal initializer {
__PausableUpgradeable_init();
__WhitelistUpgradeable_init();
_stakingToken = token;
}
/* ========== VIEWS FUNCTIONS ========== */
function minter() external view override returns (address) {
return canMint() ? address(_minter) : address(0);
}
function canMint() internal view returns (bool) {
return address(_minter) != address(0) && _minter.isMinter(address(this));
}
function pinkChef() external view override returns (address) {
return address(_pinkChef);
}
function stakingToken() external view override returns (address) {
return address(_stakingToken);
}
/* ========== RESTRICTED FUNCTIONS ========== */
function setKeeper(address _keeper) external onlyKeeper {
require(_keeper != address(0), 'VaultController: invalid keeper address');
address keeperBefore = keeper;
keeper = _keeper;
emit KeeperUpdated(keeperBefore, keeper);
}
function setMinter(address newMinter) virtual public onlyOwner {
// can zero
_minter = IPinkMinterV1(newMinter);
if (newMinter != address(0)) {
require(newMinter == pink.getOwner(), 'VaultController: not pink minter');
_stakingToken.safeApprove(newMinter, 0);
_stakingToken.safeApprove(newMinter, type(uint).max);
}
}
function setPink(address _token) public onlyOwner {
require(_token != address(0), 'VaultController: invalid pink token address');
require(address(pink) == address(0), 'VaultController: setPink only once');
pink = BEP20(_token);
}
function setPinkChef(IPinkChef newPinkChef) virtual public onlyOwner {
require(address(_pinkChef) == address(0), 'VaultController: setPinkChef only once');
_pinkChef = newPinkChef;
}
/* ========== SALVAGE PURPOSE ONLY ========== */
function recoverToken(address _token, uint amount) virtual external onlyOwner {
require(_token != address(_stakingToken), 'VaultController: cannot recover underlying token');
IBEP20(_token).safeTransfer(owner(), amount);
emit Recovered(_token, amount);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
/*
*
* MIT License
* ===========
*
* Copyright (c) 2021 DotFinance
*
* 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
*/
library PoolConstant {
enum PoolTypes {
PinkStake, // no perf fee
PinkFlip_deprecated, // deprecated
SolarStake, FlipToFlip, FlipToSolar,
Pink, // no perf fee
PinkMOVR,
Venus
}
struct PoolInfoBSC {
address pool;
uint balance;
uint principal;
uint available;
uint tvl;
uint utilized;
uint liquidity;
uint pBASE;
uint pPINK;
uint depositedAt;
uint feeDuration;
uint feePercentage;
}
struct PoolInfoETH {
address pool;
uint collateralETH;
uint collateralBSC;
uint bnbDebt;
uint leverage;
uint tvl;
uint updatedAt;
uint depositedAt;
uint feeDuration;
uint feePercentage;
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.7;
interface IBEP20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the token decimals.
*/
function decimals() external view returns (uint8);
/**
* @dev Returns the token symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the token name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the bep token owner.
*/
function getOwner() external view returns (address);
/**
* @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.7;
/**
* @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) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly {
codehash := extcodehash(account)
}
return (codehash != accountHash && codehash != 0x0);
}
/**
* @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');
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(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');
return _functionCallWithValue(target, data, value, errorMessage);
}
function _functionCallWithValue(
address target,
bytes memory data,
uint256 weiValue,
string memory errorMessage
) private returns (bytes memory) {
require(isContract(target), 'Address: call to non-contract');
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{value: weiValue}(data);
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
// solhint-disable-next-line no-inline-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 This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
*/
bool private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Modifier to protect an initializer function from being invoked twice.
*/
modifier initializer() {
require(_initializing || !_initialized, "Initializable: contract is already initialized");
bool isTopLevelCall = !_initializing;
if (isTopLevelCall) {
_initializing = true;
_initialized = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
/*
*
* MIT License
* ===========
*
* Copyright (c) 2021 DotFinance
*
* 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 minter() external view returns (address);
function pinkChef() external view returns (address);
function stakingToken() external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import './Ownable.sol';
import './Context.sol';
import './IBEP20.sol';
import './SafeMath.sol';
import './Address.sol';
/**
* @dev Implementation of the {IBEP20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {BEP20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-BEP20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of BEP20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IBEP20-approve}.
*/
contract BEP20 is Context, IBEP20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name, string memory symbol) public {
_name = name;
_symbol = symbol;
_decimals = 18;
}
/**
* @dev Returns the bep token owner.
*/
function getOwner() external override view returns (address) {
return owner();
}
/**
* @dev Returns the token name.
*/
function name() public override view returns (string memory) {
return _name;
}
/**
* @dev Returns the token decimals.
*/
function decimals() public override view returns (uint8) {
return _decimals;
}
/**
* @dev Returns the token symbol.
*/
function symbol() public override view returns (string memory) {
return _symbol;
}
/**
* @dev See {BEP20-totalSupply}.
*/
function totalSupply() public override view returns (uint256) {
return _totalSupply;
}
/**
* @dev See {BEP20-balanceOf}.
*/
function balanceOf(address account) public override view returns (uint256) {
return _balances[account];
}
/**
* @dev See {BEP20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {BEP20-allowance}.
*/
function allowance(address owner, address spender) public override view returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {BEP20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {BEP20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {BEP20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for `sender`'s tokens of at least
* `amount`.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(
sender,
_msgSender(),
_allowances[sender][_msgSender()].sub(amount, 'BEP20: transfer amount exceeds allowance')
);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {BEP20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {BEP20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender].sub(subtractedValue, 'BEP20: decreased allowance below zero')
);
return true;
}
/**
* @dev Creates `amount` tokens and assigns them to `msg.sender`, increasing
* the total supply.
*
* Requirements
*
* - `msg.sender` must be the token owner
*/
function mint(uint256 amount) public onlyOwner returns (bool) {
_mint(_msgSender(), amount);
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal {
require(sender != address(0), 'BEP20: transfer from the zero address');
require(recipient != address(0), 'BEP20: transfer to the zero address');
_balances[sender] = _balances[sender].sub(amount, 'BEP20: transfer amount exceeds balance');
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal {
require(account != address(0), 'BEP20: mint to the zero address');
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal {
require(account != address(0), 'BEP20: burn from the zero address');
_balances[account] = _balances[account].sub(amount, 'BEP20: burn amount exceeds balance');
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal {
require(owner != address(0), 'BEP20: approve from the zero address');
require(spender != address(0), 'BEP20: approve to the zero address');
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Destroys `amount` tokens from `account`.`amount` is then deducted
* from the caller's allowance.
*
* See {_burn} and {_approve}.
*/
function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(
account,
_msgSender(),
_allowances[account][_msgSender()].sub(amount, 'BEP20: burn amount exceeds allowance')
);
}
}// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import './ISolarRouter01.sol';
interface ISolarRouter02 is ISolarRouter01 {
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: GPL-3.0
pragma solidity 0.8.7;
interface ISolarPair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "./libraries/IBoringERC20.sol";
interface ISolarDistributorV2 {
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
}
struct PoolInfo {
IBoringERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this poolInfo. SOLAR to distribute per block.
uint256 lastRewardTimestamp; // Last block timestamp that SOLAR distribution occurs.
uint256 accSolarPerShare; // Accumulated SOLAR per share, times 1e12. See below.
}
function solarPerBlock() external view returns (uint256);
function poolInfo(uint256 pid) external view returns (address lpToken, uint256 allocPoint, uint256 lastRewardTimestamp, uint256 accSolarPerShare);
function userInfo(uint256 pid, address user) external view returns (uint amount, uint rewardDebt);
function totalAllocPoint() external view returns (uint256);
function deposit(uint256 _pid, uint256 _amount) external;
function withdraw(uint256 _pid, uint256 _amount) external;
}/*
____ __ __ __ _
/ __/__ __ ___ / /_ / / ___ / /_ (_)__ __
_\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
/___/
* Docs: https://docs.synthetix.io/
*
*
* MIT License
* ===========
*
* Copyright (c) 2020 Synthetix
*
* 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
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
abstract contract PausableUpgradeable is OwnableUpgradeable {
uint public lastPauseTime;
bool public paused;
event PauseChanged(bool isPaused);
modifier notPaused {
require(!paused, "PausableUpgradeable: cannot be performed while the contract is paused");
_;
}
function __PausableUpgradeable_init() internal initializer {
__Ownable_init();
require(owner() != address(0), "PausableUpgradeable: owner must be set");
}
function setPaused(bool _paused) external onlyOwner {
if (_paused == paused) {
return;
}
paused = _paused;
if (paused) {
lastPauseTime = block.timestamp;
}
emit PauseChanged(paused);
}
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
/*
*
* MIT License
* ===========
*
* Copyright (c) 2021 DotFinance
*
* 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 "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
contract WhitelistUpgradeable is OwnableUpgradeable {
mapping (address => bool) private _whitelist;
bool private _disable; // default - false means whitelist feature is working on. if true no more use of whitelist
event Whitelisted(address indexed _address, bool whitelist);
event EnableWhitelist();
event DisableWhitelist();
modifier onlyWhitelisted {
require(_disable || _whitelist[msg.sender], "Whitelist: caller is not on the whitelist");
_;
}
function __WhitelistUpgradeable_init() internal initializer {
__Ownable_init();
}
function isWhitelist(address _address) public view returns(bool) {
return _whitelist[_address];
}
function setWhitelist(address _address, bool _on) external onlyOwner {
_whitelist[_address] = _on;
emit Whitelisted(_address, _on);
}
function disableWhitelist(bool disable) external onlyOwner {
_disable = disable;
if (disable) {
emit DisableWhitelist();
} else {
emit EnableWhitelist();
}
}
uint256[49] private __gap;
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.7;
import './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.
*/
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() {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view 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 onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = 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 onlyOwner {
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
require(newOwner != address(0), 'Ownable: new owner is the zero address');
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.7;
/*
* @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 GSN 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.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor() {}
function _msgSender() internal view returns (address payable) {
return payable(msg.sender);
}
function _msgData() internal view returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
interface ISolarRouter01 {
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, uint fee) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut, uint fee) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path, uint fee) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path, uint fee) external view returns (uint[] memory amounts);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
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 "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal initializer {
__Context_init_unchained();
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal initializer {
_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);
}
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";
/**
* @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 ContextUpgradeable is Initializable {
function __Context_init() internal initializer {
__Context_init_unchained();
}
function __Context_init_unchained() internal initializer {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
uint256[50] private __gap;
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[],"name":"DisableWhitelist","type":"event"},{"anonymous":false,"inputs":[],"name":"EnableWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"profit","type":"uint256"}],"name":"Harvested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_before","type":"address"},{"indexed":true,"internalType":"address","name":"_after","type":"address"}],"name":"KeeperUpdated","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":"bool","name":"isPaused","type":"bool"}],"name":"PauseChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"profit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"performanceFee","type":"uint256"}],"name":"PinkPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"profit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"performanceFee","type":"uint256"}],"name":"ProfitPaid","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":"_address","type":"address"},{"indexed":false,"internalType":"bool","name":"whitelist","type":"bool"}],"name":"Whitelisted","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":"","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":[{"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":"bool","name":"disable","type":"bool"}],"name":"disableWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keeper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPauseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minter","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":[],"name":"pink","outputs":[{"internalType":"contract BEP20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pinkChef","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pinkToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolType","outputs":[{"internalType":"enum PoolConstant.PoolTypes","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceShare","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":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","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":[{"internalType":"address","name":"_keeper","type":"address"}],"name":"setKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newMinter","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setPink","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPinkChef","name":"_chef","type":"address"}],"name":"setPinkChef","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_on","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","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":"totalSupply","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":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"withdrawableBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
0x608060405234801561001057600080fd5b506121a9806100206000396000f3fe608060405234801561001057600080fd5b506004361061023c5760003560e01c8063853828b61161013b578063c432c95b116100b8578063f10684541161007c578063f1068454146104a6578063f2fde38b146104b0578063f5eb42dc146102f7578063f80af887146104c3578063fca3b5aa146104d657600080fd5b8063c432c95b1461043a578063c4d66de81461044d578063c683630d14610460578063d1af0c7d1461048c578063de5f62681461049e57600080fd5b8063aced1661116100ff578063aced1661146103ec578063b1dd61b6146103ff578063b29a814014610414578063b69ef8a8146102b1578063b6b55f251461042757600080fd5b8063853828b6146103a65780638da5cb5b146103ae57806391b4ded9146103bf57806397c6e97b146103c8578063aae23696146103d957600080fd5b80634641257d116101c957806361e20a1c1161018d57806361e20a1c146102f757806370a08231146102f7578063715018a61461037a57806372f702f314610382578063748747e61461039357600080fd5b80634641257d146102af57806349ba1b491461032957806353d6fd591461033c5780635c975abb1461034f5780635eaa81631461036c57600080fd5b806318160ddd1161021057806318160ddd146102b1578063208e5acc146102ba5780632e1a7d4d146102e45780633aa6c4f9146102f75780633d18b9121461032157600080fd5b80628cc26214610241578063075461721461026857806315fbef331461028857806316c38b3c1461029c575b600080fd5b61025561024f366004611e58565b50600090565b6040519081526020015b60405180910390f35b6102706104e9565b6040516001600160a01b03909116815260200161025f565b61013454610270906001600160a01b031681565b6102af6102aa366004611ef7565b61050f565b005b61013654610255565b6102556102c8366004611e58565b6001600160a01b03166000908152610138602052604090205490565b6102af6102f2366004611f31565b6105b4565b610255610305366004611e58565b6001600160a01b03166000908152610137602052604090205490565b6102af61083c565b6102af610337366004611ef7565b61092d565b6102af61034a366004611e92565b6109c6565b60665461035c9060ff1681565b604051901515815260200161025f565b670de0b6b3a7640000610255565b6102af610a4f565b60ce546001600160a01b0316610270565b6102af6103a1366004611e58565b610a83565b6102af610bc5565b6033546001600160a01b0316610270565b61025560655481565b60d0546001600160a01b0316610270565b60cd54610270906001600160a01b031681565b60cc54610270906001600160a01b031681565b610407600581565b60405161025f9190611f7f565b6102af610422366004611ecb565b610bed565b6102af610435366004611f31565b610cf4565b6102af610448366004611e58565b610cfe565b6102af61045b366004611e58565b610e18565b61035c61046e366004611e58565b6001600160a01b031660009081526099602052604090205460ff1690565b610134546001600160a01b0316610270565b6102af610eff565b6102556101355481565b6102af6104be366004611e58565b610f7c565b6102af6104d1366004611e58565b611014565b6102af6104e4366004611e58565b6110a0565b60006104f36110d3565b6104fd5750600090565b60cf546001600160a01b03165b905090565b6033546001600160a01b031633146105425760405162461bcd60e51b815260040161053990612028565b60405180910390fd5b60665460ff16151581151514156105565750565b6066805460ff191682151590811790915560ff161561057457426065555b60665460405160ff909116151581527f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59060200160405180910390a15b50565b60026101025414156105d85760405162461bcd60e51b81526004016105399061205d565b600261010255806105fb5760405162461bcd60e51b815260040161053990612094565b60d054604051634682dd4d60e01b8152336004820152602481018390526001600160a01b0390911690634682dd4d90604401600060405180830381600087803b15801561064757600080fd5b505af115801561065b573d6000803e3d6000fd5b50506101365461066e9250905082611166565b61013655336000908152610137602052604090205461068d9082611166565b33600090815261013760205260408120919091556106a96110d3565b156107df573360009081526101386020526040908190205460cf5491516312b8a16760e21b8152600481018590526024810182905290916001600160a01b031690634ae2859c9060440160206040518083038186803b15801561070b57600080fd5b505afa15801561071f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107439190611f4a565b915081156107dd5760cf5460ce54604051636d499b0160e01b81526001600160a01b039182166004820152602481018590526000604482015233606482015260848101849052911690636d499b019060a401600060405180830381600087803b1580156107af57600080fd5b505af11580156107c3573d6000803e3d6000fd5b505050506107da828461116690919063ffffffff16565b92505b505b60ce546107f6906001600160a01b031633846111af565b604080518381526020810183905233917f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc691015b60405180910390a25050600161010255565b60026101025414156108605760405162461bcd60e51b81526004016105399061205d565b60026101025560d054604051639fc1d80f60e01b81523360048201526000916001600160a01b031690639fc1d80f90602401602060405180830381600087803b1580156108ac57600080fd5b505af11580156108c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e49190611f4a565b604080518281526000602082015291925033917f4564580f74473725a415654b094e1086ad4c2328a10232c210ada4f8f45348ef910160405180910390a250600161010255565b565b6033546001600160a01b031633146109575760405162461bcd60e51b815260040161053990612028565b609a805460ff1916821580159190911790915561099a576040517f508560e15717a4e9058b9a19d806cb679004a1bd953376f71fda71c141e5dc5390600090a150565b6040517fa2927d972f7cfc5ff8b7ad79f9adf0bdb885d0e569f40d0037df2e1299616ae090600090a150565b6033546001600160a01b031633146109f05760405162461bcd60e51b815260040161053990612028565b6001600160a01b038216600081815260996020908152604091829020805460ff191685151590811790915591519182527fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f26440910160405180910390a25050565b6033546001600160a01b03163314610a795760405162461bcd60e51b815260040161053990612028565b61092b6000611217565b60cc546001600160a01b0316331480610aa657506033546001600160a01b031633145b610b0d5760405162461bcd60e51b815260206004820152603260248201527f5661756c74436f6e74726f6c6c65723a2063616c6c6572206973206e6f74207460448201527134329037bbb732b91037b91035b2b2b832b960711b6064820152608401610539565b6001600160a01b038116610b735760405162461bcd60e51b815260206004820152602760248201527f5661756c74436f6e74726f6c6c65723a20696e76616c6964206b6565706572206044820152666164647265737360c81b6064820152608401610539565b60cc80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f53d3703fe259def57584466f32d1b94c30278008c683c21b04501c4966f13a6990600090a35050565b33600090815261013760205260409020548015610be557610be5816105b4565b6105b161083c565b6033546001600160a01b03163314610c175760405162461bcd60e51b815260040161053990612028565b60ce546001600160a01b0383811691161415610c885760405162461bcd60e51b815260206004820152602a60248201527f5661756c7450696e6b3a2063616e6e6f74207265636f76657220756e6465726c6044820152693cb4b733903a37b5b2b760b11b6064820152608401610539565b610cae610c9d6033546001600160a01b031690565b6001600160a01b03841690836111af565b604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28910160405180910390a15050565b6105b18133611269565b6033546001600160a01b03163314610d285760405162461bcd60e51b815260040161053990612028565b6001600160a01b038116610d925760405162461bcd60e51b815260206004820152602b60248201527f5661756c74436f6e74726f6c6c65723a20696e76616c69642070696e6b20746f60448201526a6b656e206164647265737360a81b6064820152608401610539565b60cd546001600160a01b031615610df65760405162461bcd60e51b815260206004820152602260248201527f5661756c74436f6e74726f6c6c65723a2073657450696e6b206f6e6c79206f6e604482015261636560f01b6064820152608401610539565b60cd80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff1680610e31575060005460ff16155b610e4d5760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff16158015610e6f576000805461ffff19166101011790555b6001600160a01b038216610eb95760405162461bcd60e51b81526020600482015260116024820152701d1bdad95b881b5d5cdd081899481cd95d607a1b6044820152606401610539565b61013480546001600160a01b0319166001600160a01b038416908117909155610ee19061144c565b610ee96114e3565b8015610efb576000805461ff00191690555b5050565b60ce546040516370a0823160e01b815233600482015261092b916001600160a01b0316906370a082319060240160206040518083038186803b158015610f4457600080fd5b505afa158015610f58573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104359190611f4a565b6033546001600160a01b03163314610fa65760405162461bcd60e51b815260040161053990612028565b6001600160a01b03811661100b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610539565b6105b181611217565b6033546001600160a01b0316331461103e5760405162461bcd60e51b815260040161053990612028565b60d0546001600160a01b0316156110975760405162461bcd60e51b815260206004820181905260248201527f5661756c7450696e6b3a2073657450696e6b43686566206f6e6c79206f6e63656044820152606401610539565b6105b181611556565b6033546001600160a01b031633146110ca5760405162461bcd60e51b815260040161053990612028565b6105b18161160a565b60cf546000906001600160a01b03161580159061050a575060cf546040516355138f0d60e11b81523060048201526001600160a01b039091169063aa271e1a9060240160206040518083038186803b15801561112e57600080fd5b505afa158015611142573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050a9190611f14565b60006111a883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061176e565b9392505050565b6040516001600160a01b03831660248201526044810182905261121290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526117a8565b505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600261010254141561128d5760405162461bcd60e51b81526004016105399061205d565b60026101025560665460ff161561131a5760405162461bcd60e51b815260206004820152604560248201527f5061757361626c655570677261646561626c653a2063616e6e6f74206265207060448201527f6572666f726d6564207768696c652074686520636f6e74726163742069732070606482015264185d5cd95960da1b608482015260a401610539565b6000821161133a5760405162461bcd60e51b815260040161053990612094565b61013654611348908361187a565b610136556001600160a01b03811660009081526101376020526040902054611370908361187a565b6001600160a01b038083166000908152610137602090815260408083209490945561013890529190912042905560ce546113ad91163330856118d9565b60d05460405163678789d160e01b8152336004820152602481018490526001600160a01b039091169063678789d190604401600060405180830381600087803b1580156113f957600080fd5b505af115801561140d573d6000803e3d6000fd5b50505050806001600160a01b03167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c48360405161082a91815260200190565b600054610100900460ff1680611465575060005460ff16155b6114815760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff161580156114a3576000805461ffff19166101011790555b6114ab611917565b6114b36119f0565b60ce80546001600160a01b0319166001600160a01b0384161790558015610efb576000805461ff00191690555050565b600054610100900460ff16806114fc575060005460ff16155b6115185760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff1615801561153a576000805461ffff19166101011790555b611542611a4f565b80156105b1576000805461ff001916905550565b6033546001600160a01b031633146115805760405162461bcd60e51b815260040161053990612028565b60d0546001600160a01b0316156115e85760405162461bcd60e51b815260206004820152602660248201527f5661756c74436f6e74726f6c6c65723a2073657450696e6b43686566206f6e6c60448201526579206f6e636560d01b6064820152608401610539565b60d080546001600160a01b0319166001600160a01b0392909216919091179055565b6033546001600160a01b031633146116345760405162461bcd60e51b815260040161053990612028565b60cf80546001600160a01b0319166001600160a01b038316908117909155156105b15760cd60009054906101000a90046001600160a01b03166001600160a01b031663893d20e86040518163ffffffff1660e01b815260040160206040518083038186803b1580156116a557600080fd5b505afa1580156116b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116dd9190611e75565b6001600160a01b0316816001600160a01b03161461173d5760405162461bcd60e51b815260206004820181905260248201527f5661756c74436f6e74726f6c6c65723a206e6f742070696e6b206d696e7465726044820152606401610539565b60ce54611755906001600160a01b0316826000611ac0565b60ce546105b1906001600160a01b031682600019611ac0565b600081848411156117925760405162461bcd60e51b81526004016105399190611fa7565b50600061179f84866120f7565b95945050505050565b60006117fd826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611be49092919063ffffffff16565b805190915015611212578080602001905181019061181b9190611f14565b6112125760405162461bcd60e51b815260206004820152602a60248201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610539565b60008061188783856120df565b9050838110156111a85760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610539565b6040516001600160a01b03808516602483015283166044820152606481018290526119119085906323b872dd60e01b906084016111db565b50505050565b600054610100900460ff1680611930575060005460ff16155b61194c5760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff1615801561196e576000805461ffff19166101011790555b611976611bfb565b600061198a6033546001600160a01b031690565b6001600160a01b031614156115425760405162461bcd60e51b815260206004820152602660248201527f5061757361626c655570677261646561626c653a206f776e6572206d757374206044820152651899481cd95d60d21b6064820152608401610539565b600054610100900460ff1680611a09575060005460ff16155b611a255760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff16158015611a47576000805461ffff19166101011790555b611542611bfb565b600054610100900460ff1680611a68575060005460ff16155b611a845760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff16158015611aa6576000805461ffff19166101011790555b60016101025580156105b1576000805461ff001916905550565b801580611b495750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015611b0f57600080fd5b505afa158015611b23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b479190611f4a565b155b611bb45760405162461bcd60e51b815260206004820152603660248201527f5361666542455032303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610539565b6040516001600160a01b03831660248201526044810182905261121290849063095ea7b360e01b906064016111db565b6060611bf38484600085611c62565b949350505050565b600054610100900460ff1680611c14575060005460ff16155b611c305760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff16158015611c52576000805461ffff19166101011790555b611c5a611d55565b611542611dbf565b6060611c6d85611e1f565b611cb95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610539565b600080866001600160a01b03168587604051611cd59190611f63565b60006040518083038185875af1925050503d8060008114611d12576040519150601f19603f3d011682016040523d82523d6000602084013e611d17565b606091505b50915091508115611d2b579150611bf39050565b805115611d3b5780518082602001fd5b8360405162461bcd60e51b81526004016105399190611fa7565b600054610100900460ff1680611d6e575060005460ff16155b611d8a5760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff16158015611542576000805461ffff191661010117905580156105b1576000805461ff001916905550565b600054610100900460ff1680611dd8575060005460ff16155b611df45760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff16158015611e16576000805461ffff19166101011790555b61154233611217565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611bf3575050151592915050565b600060208284031215611e6a57600080fd5b81356111a881612150565b600060208284031215611e8757600080fd5b81516111a881612150565b60008060408385031215611ea557600080fd5b8235611eb081612150565b91506020830135611ec081612165565b809150509250929050565b60008060408385031215611ede57600080fd5b8235611ee981612150565b946020939093013593505050565b600060208284031215611f0957600080fd5b81356111a881612165565b600060208284031215611f2657600080fd5b81516111a881612165565b600060208284031215611f4357600080fd5b5035919050565b600060208284031215611f5c57600080fd5b5051919050565b60008251611f7581846020870161210e565b9190910192915050565b6020810160088310611fa157634e487b7160e01b600052602160045260246000fd5b91905290565b6020815260008251806020840152611fc681604085016020870161210e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252602b908201527f5661756c7450696e6b3a20616d6f756e74206d7573742062652067726561746560408201526a72207468616e207a65726f60a81b606082015260800190565b600082198211156120f2576120f261213a565b500190565b6000828210156121095761210961213a565b500390565b60005b83811015612129578181015183820152602001612111565b838111156119115750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146105b157600080fd5b80151581146105b157600080fdfea26469706673582212200dc8289b80c0f8487eff6ac8a17d2e5faedc2a72a4d68b3f19f3a7640d164d4064736f6c63430008070033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061023c5760003560e01c8063853828b61161013b578063c432c95b116100b8578063f10684541161007c578063f1068454146104a6578063f2fde38b146104b0578063f5eb42dc146102f7578063f80af887146104c3578063fca3b5aa146104d657600080fd5b8063c432c95b1461043a578063c4d66de81461044d578063c683630d14610460578063d1af0c7d1461048c578063de5f62681461049e57600080fd5b8063aced1661116100ff578063aced1661146103ec578063b1dd61b6146103ff578063b29a814014610414578063b69ef8a8146102b1578063b6b55f251461042757600080fd5b8063853828b6146103a65780638da5cb5b146103ae57806391b4ded9146103bf57806397c6e97b146103c8578063aae23696146103d957600080fd5b80634641257d116101c957806361e20a1c1161018d57806361e20a1c146102f757806370a08231146102f7578063715018a61461037a57806372f702f314610382578063748747e61461039357600080fd5b80634641257d146102af57806349ba1b491461032957806353d6fd591461033c5780635c975abb1461034f5780635eaa81631461036c57600080fd5b806318160ddd1161021057806318160ddd146102b1578063208e5acc146102ba5780632e1a7d4d146102e45780633aa6c4f9146102f75780633d18b9121461032157600080fd5b80628cc26214610241578063075461721461026857806315fbef331461028857806316c38b3c1461029c575b600080fd5b61025561024f366004611e58565b50600090565b6040519081526020015b60405180910390f35b6102706104e9565b6040516001600160a01b03909116815260200161025f565b61013454610270906001600160a01b031681565b6102af6102aa366004611ef7565b61050f565b005b61013654610255565b6102556102c8366004611e58565b6001600160a01b03166000908152610138602052604090205490565b6102af6102f2366004611f31565b6105b4565b610255610305366004611e58565b6001600160a01b03166000908152610137602052604090205490565b6102af61083c565b6102af610337366004611ef7565b61092d565b6102af61034a366004611e92565b6109c6565b60665461035c9060ff1681565b604051901515815260200161025f565b670de0b6b3a7640000610255565b6102af610a4f565b60ce546001600160a01b0316610270565b6102af6103a1366004611e58565b610a83565b6102af610bc5565b6033546001600160a01b0316610270565b61025560655481565b60d0546001600160a01b0316610270565b60cd54610270906001600160a01b031681565b60cc54610270906001600160a01b031681565b610407600581565b60405161025f9190611f7f565b6102af610422366004611ecb565b610bed565b6102af610435366004611f31565b610cf4565b6102af610448366004611e58565b610cfe565b6102af61045b366004611e58565b610e18565b61035c61046e366004611e58565b6001600160a01b031660009081526099602052604090205460ff1690565b610134546001600160a01b0316610270565b6102af610eff565b6102556101355481565b6102af6104be366004611e58565b610f7c565b6102af6104d1366004611e58565b611014565b6102af6104e4366004611e58565b6110a0565b60006104f36110d3565b6104fd5750600090565b60cf546001600160a01b03165b905090565b6033546001600160a01b031633146105425760405162461bcd60e51b815260040161053990612028565b60405180910390fd5b60665460ff16151581151514156105565750565b6066805460ff191682151590811790915560ff161561057457426065555b60665460405160ff909116151581527f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59060200160405180910390a15b50565b60026101025414156105d85760405162461bcd60e51b81526004016105399061205d565b600261010255806105fb5760405162461bcd60e51b815260040161053990612094565b60d054604051634682dd4d60e01b8152336004820152602481018390526001600160a01b0390911690634682dd4d90604401600060405180830381600087803b15801561064757600080fd5b505af115801561065b573d6000803e3d6000fd5b50506101365461066e9250905082611166565b61013655336000908152610137602052604090205461068d9082611166565b33600090815261013760205260408120919091556106a96110d3565b156107df573360009081526101386020526040908190205460cf5491516312b8a16760e21b8152600481018590526024810182905290916001600160a01b031690634ae2859c9060440160206040518083038186803b15801561070b57600080fd5b505afa15801561071f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107439190611f4a565b915081156107dd5760cf5460ce54604051636d499b0160e01b81526001600160a01b039182166004820152602481018590526000604482015233606482015260848101849052911690636d499b019060a401600060405180830381600087803b1580156107af57600080fd5b505af11580156107c3573d6000803e3d6000fd5b505050506107da828461116690919063ffffffff16565b92505b505b60ce546107f6906001600160a01b031633846111af565b604080518381526020810183905233917f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc691015b60405180910390a25050600161010255565b60026101025414156108605760405162461bcd60e51b81526004016105399061205d565b60026101025560d054604051639fc1d80f60e01b81523360048201526000916001600160a01b031690639fc1d80f90602401602060405180830381600087803b1580156108ac57600080fd5b505af11580156108c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e49190611f4a565b604080518281526000602082015291925033917f4564580f74473725a415654b094e1086ad4c2328a10232c210ada4f8f45348ef910160405180910390a250600161010255565b565b6033546001600160a01b031633146109575760405162461bcd60e51b815260040161053990612028565b609a805460ff1916821580159190911790915561099a576040517f508560e15717a4e9058b9a19d806cb679004a1bd953376f71fda71c141e5dc5390600090a150565b6040517fa2927d972f7cfc5ff8b7ad79f9adf0bdb885d0e569f40d0037df2e1299616ae090600090a150565b6033546001600160a01b031633146109f05760405162461bcd60e51b815260040161053990612028565b6001600160a01b038216600081815260996020908152604091829020805460ff191685151590811790915591519182527fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f26440910160405180910390a25050565b6033546001600160a01b03163314610a795760405162461bcd60e51b815260040161053990612028565b61092b6000611217565b60cc546001600160a01b0316331480610aa657506033546001600160a01b031633145b610b0d5760405162461bcd60e51b815260206004820152603260248201527f5661756c74436f6e74726f6c6c65723a2063616c6c6572206973206e6f74207460448201527134329037bbb732b91037b91035b2b2b832b960711b6064820152608401610539565b6001600160a01b038116610b735760405162461bcd60e51b815260206004820152602760248201527f5661756c74436f6e74726f6c6c65723a20696e76616c6964206b6565706572206044820152666164647265737360c81b6064820152608401610539565b60cc80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f53d3703fe259def57584466f32d1b94c30278008c683c21b04501c4966f13a6990600090a35050565b33600090815261013760205260409020548015610be557610be5816105b4565b6105b161083c565b6033546001600160a01b03163314610c175760405162461bcd60e51b815260040161053990612028565b60ce546001600160a01b0383811691161415610c885760405162461bcd60e51b815260206004820152602a60248201527f5661756c7450696e6b3a2063616e6e6f74207265636f76657220756e6465726c6044820152693cb4b733903a37b5b2b760b11b6064820152608401610539565b610cae610c9d6033546001600160a01b031690565b6001600160a01b03841690836111af565b604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28910160405180910390a15050565b6105b18133611269565b6033546001600160a01b03163314610d285760405162461bcd60e51b815260040161053990612028565b6001600160a01b038116610d925760405162461bcd60e51b815260206004820152602b60248201527f5661756c74436f6e74726f6c6c65723a20696e76616c69642070696e6b20746f60448201526a6b656e206164647265737360a81b6064820152608401610539565b60cd546001600160a01b031615610df65760405162461bcd60e51b815260206004820152602260248201527f5661756c74436f6e74726f6c6c65723a2073657450696e6b206f6e6c79206f6e604482015261636560f01b6064820152608401610539565b60cd80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff1680610e31575060005460ff16155b610e4d5760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff16158015610e6f576000805461ffff19166101011790555b6001600160a01b038216610eb95760405162461bcd60e51b81526020600482015260116024820152701d1bdad95b881b5d5cdd081899481cd95d607a1b6044820152606401610539565b61013480546001600160a01b0319166001600160a01b038416908117909155610ee19061144c565b610ee96114e3565b8015610efb576000805461ff00191690555b5050565b60ce546040516370a0823160e01b815233600482015261092b916001600160a01b0316906370a082319060240160206040518083038186803b158015610f4457600080fd5b505afa158015610f58573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104359190611f4a565b6033546001600160a01b03163314610fa65760405162461bcd60e51b815260040161053990612028565b6001600160a01b03811661100b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610539565b6105b181611217565b6033546001600160a01b0316331461103e5760405162461bcd60e51b815260040161053990612028565b60d0546001600160a01b0316156110975760405162461bcd60e51b815260206004820181905260248201527f5661756c7450696e6b3a2073657450696e6b43686566206f6e6c79206f6e63656044820152606401610539565b6105b181611556565b6033546001600160a01b031633146110ca5760405162461bcd60e51b815260040161053990612028565b6105b18161160a565b60cf546000906001600160a01b03161580159061050a575060cf546040516355138f0d60e11b81523060048201526001600160a01b039091169063aa271e1a9060240160206040518083038186803b15801561112e57600080fd5b505afa158015611142573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050a9190611f14565b60006111a883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061176e565b9392505050565b6040516001600160a01b03831660248201526044810182905261121290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526117a8565b505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600261010254141561128d5760405162461bcd60e51b81526004016105399061205d565b60026101025560665460ff161561131a5760405162461bcd60e51b815260206004820152604560248201527f5061757361626c655570677261646561626c653a2063616e6e6f74206265207060448201527f6572666f726d6564207768696c652074686520636f6e74726163742069732070606482015264185d5cd95960da1b608482015260a401610539565b6000821161133a5760405162461bcd60e51b815260040161053990612094565b61013654611348908361187a565b610136556001600160a01b03811660009081526101376020526040902054611370908361187a565b6001600160a01b038083166000908152610137602090815260408083209490945561013890529190912042905560ce546113ad91163330856118d9565b60d05460405163678789d160e01b8152336004820152602481018490526001600160a01b039091169063678789d190604401600060405180830381600087803b1580156113f957600080fd5b505af115801561140d573d6000803e3d6000fd5b50505050806001600160a01b03167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c48360405161082a91815260200190565b600054610100900460ff1680611465575060005460ff16155b6114815760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff161580156114a3576000805461ffff19166101011790555b6114ab611917565b6114b36119f0565b60ce80546001600160a01b0319166001600160a01b0384161790558015610efb576000805461ff00191690555050565b600054610100900460ff16806114fc575060005460ff16155b6115185760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff1615801561153a576000805461ffff19166101011790555b611542611a4f565b80156105b1576000805461ff001916905550565b6033546001600160a01b031633146115805760405162461bcd60e51b815260040161053990612028565b60d0546001600160a01b0316156115e85760405162461bcd60e51b815260206004820152602660248201527f5661756c74436f6e74726f6c6c65723a2073657450696e6b43686566206f6e6c60448201526579206f6e636560d01b6064820152608401610539565b60d080546001600160a01b0319166001600160a01b0392909216919091179055565b6033546001600160a01b031633146116345760405162461bcd60e51b815260040161053990612028565b60cf80546001600160a01b0319166001600160a01b038316908117909155156105b15760cd60009054906101000a90046001600160a01b03166001600160a01b031663893d20e86040518163ffffffff1660e01b815260040160206040518083038186803b1580156116a557600080fd5b505afa1580156116b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116dd9190611e75565b6001600160a01b0316816001600160a01b03161461173d5760405162461bcd60e51b815260206004820181905260248201527f5661756c74436f6e74726f6c6c65723a206e6f742070696e6b206d696e7465726044820152606401610539565b60ce54611755906001600160a01b0316826000611ac0565b60ce546105b1906001600160a01b031682600019611ac0565b600081848411156117925760405162461bcd60e51b81526004016105399190611fa7565b50600061179f84866120f7565b95945050505050565b60006117fd826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611be49092919063ffffffff16565b805190915015611212578080602001905181019061181b9190611f14565b6112125760405162461bcd60e51b815260206004820152602a60248201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610539565b60008061188783856120df565b9050838110156111a85760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610539565b6040516001600160a01b03808516602483015283166044820152606481018290526119119085906323b872dd60e01b906084016111db565b50505050565b600054610100900460ff1680611930575060005460ff16155b61194c5760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff1615801561196e576000805461ffff19166101011790555b611976611bfb565b600061198a6033546001600160a01b031690565b6001600160a01b031614156115425760405162461bcd60e51b815260206004820152602660248201527f5061757361626c655570677261646561626c653a206f776e6572206d757374206044820152651899481cd95d60d21b6064820152608401610539565b600054610100900460ff1680611a09575060005460ff16155b611a255760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff16158015611a47576000805461ffff19166101011790555b611542611bfb565b600054610100900460ff1680611a68575060005460ff16155b611a845760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff16158015611aa6576000805461ffff19166101011790555b60016101025580156105b1576000805461ff001916905550565b801580611b495750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015611b0f57600080fd5b505afa158015611b23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b479190611f4a565b155b611bb45760405162461bcd60e51b815260206004820152603660248201527f5361666542455032303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610539565b6040516001600160a01b03831660248201526044810182905261121290849063095ea7b360e01b906064016111db565b6060611bf38484600085611c62565b949350505050565b600054610100900460ff1680611c14575060005460ff16155b611c305760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff16158015611c52576000805461ffff19166101011790555b611c5a611d55565b611542611dbf565b6060611c6d85611e1f565b611cb95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610539565b600080866001600160a01b03168587604051611cd59190611f63565b60006040518083038185875af1925050503d8060008114611d12576040519150601f19603f3d011682016040523d82523d6000602084013e611d17565b606091505b50915091508115611d2b579150611bf39050565b805115611d3b5780518082602001fd5b8360405162461bcd60e51b81526004016105399190611fa7565b600054610100900460ff1680611d6e575060005460ff16155b611d8a5760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff16158015611542576000805461ffff191661010117905580156105b1576000805461ff001916905550565b600054610100900460ff1680611dd8575060005460ff16155b611df45760405162461bcd60e51b815260040161053990611fda565b600054610100900460ff16158015611e16576000805461ffff19166101011790555b61154233611217565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611bf3575050151592915050565b600060208284031215611e6a57600080fd5b81356111a881612150565b600060208284031215611e8757600080fd5b81516111a881612150565b60008060408385031215611ea557600080fd5b8235611eb081612150565b91506020830135611ec081612165565b809150509250929050565b60008060408385031215611ede57600080fd5b8235611ee981612150565b946020939093013593505050565b600060208284031215611f0957600080fd5b81356111a881612165565b600060208284031215611f2657600080fd5b81516111a881612165565b600060208284031215611f4357600080fd5b5035919050565b600060208284031215611f5c57600080fd5b5051919050565b60008251611f7581846020870161210e565b9190910192915050565b6020810160088310611fa157634e487b7160e01b600052602160045260246000fd5b91905290565b6020815260008251806020840152611fc681604085016020870161210e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252602b908201527f5661756c7450696e6b3a20616d6f756e74206d7573742062652067726561746560408201526a72207468616e207a65726f60a81b606082015260800190565b600082198211156120f2576120f261213a565b500190565b6000828210156121095761210961213a565b500390565b60005b83811015612129578181015183820152602001612111565b838111156119115750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146105b157600080fd5b80151581146105b157600080fdfea26469706673582212200dc8289b80c0f8487eff6ac8a17d2e5faedc2a72a4d68b3f19f3a7640d164d4064736f6c63430008070033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in MOVR
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.