Contract
0x502352eeb9dc171ec486bb39daf675b9276718d4
2
Contract Overview
Balance:
0 GLMR
GLMR Value:
$0.00
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Contract Name:
CGSAuto
Compiler Version
v0.6.12+commit.27d51765
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.6.12; import "./helpers/ERC20.sol"; import "./libraries/Address.sol"; import "./libraries/SafeERC20.sol"; import "./libraries/EnumerableSet.sol"; import "./helpers/Ownable.sol"; import "./helpers/ReentrancyGuard.sol"; import "./interfaces/IPancakeswapFarm.sol"; import "./helpers/Pausable.sol"; contract CGSAuto is Ownable, Pausable { using SafeERC20 for IERC20; using SafeMath for uint256; struct UserInfo { uint256 shares; // number of shares for a user uint256 lastDepositedTime; // keeps track of deposited time for potential penalty uint256 cakeAtLastUserAction; // keeps track of cake deposited at the last user action uint256 lastUserActionTime; // keeps track of the last user action time } IERC20 public immutable token; // Cake token // IERC20 public immutable receiptToken; // Syrup token IPancakeswapFarm public immutable masterchef; mapping(address => UserInfo) public userInfo; uint256 public totalShares; uint256 public lastHarvestedTime; address public admin; address public treasury; uint256 public constant MAX_PERFORMANCE_FEE = 500; // 5% uint256 public constant MAX_CALL_FEE = 100; // 1% uint256 public constant MAX_WITHDRAW_FEE = 100; // 1% uint256 public constant MAX_WITHDRAW_FEE_PERIOD = 72 hours; // 3 days uint256 public performanceFee = 200; // 2% uint256 public callFee = 25; // 0.25% uint256 public withdrawFee = 0; // 0% uint256 public withdrawFeePeriod = 0; // 0 hour uint256 public constant CGSPID = 9; event Deposit(address indexed sender, uint256 amount, uint256 shares, uint256 lastDepositedTime); event Withdraw(address indexed sender, uint256 amount, uint256 shares); event Harvest(address indexed sender, uint256 performanceFee, uint256 callFee); event Pause(); event Unpause(); /** * @notice Constructor * @param _token: Cake token contract * @param _masterchef: MasterChef contract * @param _admin: address of the admin * @param _treasury: address of the treasury (collects fees) */ constructor( IERC20 _token, IPancakeswapFarm _masterchef, address _admin, address _treasury ) public { token = _token; masterchef = _masterchef; admin = _admin; treasury = _treasury; // Infinite approve IERC20(_token).safeApprove(address(_masterchef), uint256(-1)); } /** * @notice Checks if the msg.sender is the admin address */ modifier onlyAdmin() { require(msg.sender == admin, "admin: wut?"); _; } /** * @notice Checks if the msg.sender is a contract or a proxy */ modifier notContract() { require(!_isContract(msg.sender), "contract not allowed"); require(msg.sender == tx.origin, "proxy contract not allowed"); _; } /** * @notice Deposits funds into the Cake Vault * @dev Only possible when contract not paused. * @param _amount: number of tokens to deposit (in CAKE) */ function deposit(uint256 _amount) external whenNotPaused notContract { require(_amount > 0, "Nothing to deposit"); uint256 pool = balanceOf(); // For transfer tax uint256 beforeDeposit = token.balanceOf(address(this)); token.safeTransferFrom(msg.sender, address(this), _amount); uint256 afterDeposit = token.balanceOf(address(this)); _amount = afterDeposit.sub(beforeDeposit); // real amount of LP transfer to this address uint256 currentShares = 0; if (totalShares != 0) { currentShares = (_amount.mul(totalShares)).div(pool); } else { currentShares = _amount; } UserInfo storage user = userInfo[msg.sender]; user.shares = user.shares.add(currentShares); user.lastDepositedTime = block.timestamp; totalShares = totalShares.add(currentShares); user.cakeAtLastUserAction = user.shares.mul(balanceOf()).div(totalShares); user.lastUserActionTime = block.timestamp; _earn(); emit Deposit(msg.sender, _amount, currentShares, block.timestamp); } /** * @notice Withdraws all funds for a user */ function withdrawAll() external notContract { withdraw(userInfo[msg.sender].shares); } /** * @notice Reinvests CAKE tokens into MasterChef * @dev Only possible when contract not paused. */ function harvest() external notContract whenNotPaused { IPancakeswapFarm(masterchef).withdraw(CGSPID, 0); uint256 bal = available(); uint256 currentPerformanceFee = bal.mul(performanceFee).div(10000); token.safeTransfer(treasury, currentPerformanceFee); uint256 currentCallFee = bal.mul(callFee).div(10000); token.safeTransfer(msg.sender, currentCallFee); _earn(); lastHarvestedTime = block.timestamp; emit Harvest(msg.sender, currentPerformanceFee, currentCallFee); } /** * @notice Sets admin address * @dev Only callable by the contract owner. */ function setAdmin(address _admin) external onlyOwner { require(_admin != address(0), "Cannot be zero address"); admin = _admin; } /** * @notice Sets treasury address * @dev Only callable by the contract owner. */ function setTreasury(address _treasury) external onlyOwner { require(_treasury != address(0), "Cannot be zero address"); treasury = _treasury; } /** * @notice Sets performance fee * @dev Only callable by the contract admin. */ function setPerformanceFee(uint256 _performanceFee) external onlyAdmin { require(_performanceFee <= MAX_PERFORMANCE_FEE, "performanceFee cannot be more than MAX_PERFORMANCE_FEE"); performanceFee = _performanceFee; } /** * @notice Sets call fee * @dev Only callable by the contract admin. */ function setCallFee(uint256 _callFee) external onlyAdmin { require(_callFee <= MAX_CALL_FEE, "callFee cannot be more than MAX_CALL_FEE"); callFee = _callFee; } /** * @notice Sets withdraw fee * @dev Only callable by the contract admin. */ function setWithdrawFee(uint256 _withdrawFee) external onlyAdmin { require(_withdrawFee <= MAX_WITHDRAW_FEE, "withdrawFee cannot be more than MAX_WITHDRAW_FEE"); withdrawFee = _withdrawFee; } /** * @notice Sets withdraw fee period * @dev Only callable by the contract admin. */ function setWithdrawFeePeriod(uint256 _withdrawFeePeriod) external onlyAdmin { require( _withdrawFeePeriod <= MAX_WITHDRAW_FEE_PERIOD, "withdrawFeePeriod cannot be more than MAX_WITHDRAW_FEE_PERIOD" ); withdrawFeePeriod = _withdrawFeePeriod; } /** * @notice Withdraws from MasterChef to Vault without caring about rewards. * @dev EMERGENCY ONLY. Only callable by the contract admin. */ function emergencyWithdraw() external onlyAdmin { IPancakeswapFarm(masterchef).emergencyWithdraw(CGSPID); } /** * @notice Withdraw unexpected tokens sent to the Cake Vault */ function inCaseTokensGetStuck(address _token) external onlyAdmin { require(_token != address(token), "Token cannot be same as deposit token"); // require(_token != address(receiptToken), "Token cannot be same as receipt token"); uint256 amount = IERC20(_token).balanceOf(address(this)); IERC20(_token).safeTransfer(msg.sender, amount); } /** * @notice Triggers stopped state * @dev Only possible when contract not paused. */ function pause() external onlyAdmin whenNotPaused { _pause(); emit Pause(); } /** * @notice Returns to normal state * @dev Only possible when contract is paused. */ function unpause() external onlyAdmin whenPaused { _unpause(); emit Unpause(); } /** * @notice Calculates the expected harvest reward from third party * @return Expected reward to collect in CAKE */ function calculateHarvestCougarRewards() external view returns (uint256) { uint256 amount = IPancakeswapFarm(masterchef).pendingCougar(CGSPID, address(this)); amount = amount.add(available()); uint256 currentCallFee = amount.mul(callFee).div(10000); return currentCallFee; } /** * @notice Calculates the total pending rewards that can be restaked * @return Returns total pending cake rewards */ function calculateTotalPendingCougarRewards() external view returns (uint256) { uint256 amount = IPancakeswapFarm(masterchef).pendingCougar(CGSPID, address(this)); amount = amount.add(available()); return amount; } /** * @notice Calculates the price per share */ function getPricePerFullShare() external view returns (uint256) { return totalShares == 0 ? 1e18 : balanceOf().mul(1e18).div(totalShares); } /** * @notice Withdraws from funds from the Cake Vault * @param _shares: Number of shares to withdraw */ function withdraw(uint256 _shares) public notContract { UserInfo storage user = userInfo[msg.sender]; require(_shares > 0, "Nothing to withdraw"); require(_shares <= user.shares, "Withdraw amount exceeds balance"); uint256 currentAmount = (balanceOf().mul(_shares)).div(totalShares); user.shares = user.shares.sub(_shares); totalShares = totalShares.sub(_shares); uint256 bal = available(); if (bal < currentAmount) { uint256 balWithdraw = currentAmount.sub(bal); IPancakeswapFarm(masterchef).withdraw(CGSPID, balWithdraw); uint256 balAfter = available(); uint256 diff = balAfter.sub(bal); if (diff < balWithdraw) { currentAmount = bal.add(diff); } } if (block.timestamp < user.lastDepositedTime.add(withdrawFeePeriod)) { uint256 currentWithdrawFee = currentAmount.mul(withdrawFee).div(10000); token.safeTransfer(treasury, currentWithdrawFee); currentAmount = currentAmount.sub(currentWithdrawFee); } if (user.shares > 0) { user.cakeAtLastUserAction = user.shares.mul(balanceOf()).div(totalShares); } else { user.cakeAtLastUserAction = 0; } user.lastUserActionTime = block.timestamp; token.safeTransfer(msg.sender, currentAmount); emit Withdraw(msg.sender, currentAmount, _shares); } /** * @notice Custom logic for how much the vault allows to be borrowed * @dev The contract puts 100% of the tokens to work. */ function available() public view returns (uint256) { return token.balanceOf(address(this)); } /** * @notice Calculates the total underlying tokens * @dev It includes tokens held by the contract and held in MasterChef */ function balanceOf() public view returns (uint256) { (uint256 amount, ) = IPancakeswapFarm(masterchef).userInfo(CGSPID, address(this)); return token.balanceOf(address(this)).add(amount); } /** * @notice Deposits tokens into MasterChef to earn staking rewards */ function _earn() internal { uint256 bal = available(); if (bal > 0) { IPancakeswapFarm(masterchef).deposit(CGSPID, bal, treasury); } } /** * @notice Checks if address is a contract * @dev It prevents contract from being targetted */ function _isContract(address addr) internal view returns (bool) { uint256 size; assembly { size := extcodesize(addr) } return size > 0; } }
pragma solidity ^0.6.12; // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol 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; } }
pragma solidity 0.6.12; import "./SafeMath.sol"; import "./Address.sol"; import "../interfaces/IERC20.sol"; // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/SafeERC20.sol library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn( token, abi.encodeWithSelector(token.transfer.selector, to, value) ); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn( token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value) ); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn( token, abi.encodeWithSelector(token.approve.selector, spender, value) ); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn( token, abi.encodeWithSelector( token.approve.selector, spender, newAllowance ) ); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).sub( value, "SafeERC20: 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(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall( data, "SafeERC20: low-level call failed" ); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require( abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed" ); } } }
pragma solidity 0.6.12; // import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/EnumerableSet.sol"; library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require( set._values.length > index, "EnumerableSet: index out of bounds" ); return set._values[index]; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } }
pragma solidity 0.6.12; // import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/SafeERC20.sol"; library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require( address(this).balance >= amount, "Address: insufficient balance" ); // 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" ); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{value: value}(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall( target, data, "Address: low-level static call failed" ); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.3._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall( target, data, "Address: low-level delegate call failed" ); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.3._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
pragma solidity 0.6.12; interface IPancakeswapFarm { function poolLength() external view returns (uint256); function userInfo(uint256 _pid, address _user) external view returns (uint256, uint256); // Return reward multiplier over the given _from to _to block. function getMultiplier(uint256 _from, uint256 _to) external view returns (uint256); // View function to see pending Cougar on frontend. function pendingCougar(uint256 _pid, address _user) external view returns (uint256); // Deposit LP tokens to MasterChef for CAKE allocation. function deposit(uint256 _pid, uint256 _amount) external; // Deposit LP tokens to MasterChef for CAKE allocation (with referral). function deposit(uint256 _pid, uint256 _amount, address _referrer) external; // Withdraw LP tokens from MasterChef. function withdraw(uint256 _pid, uint256 _amount) external; // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) external; }
pragma solidity ^0.6.12; // import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol"; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval( address indexed owner, address indexed spender, uint256 value ); }
pragma solidity 0.6.12; // "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/ReentrancyGuard.sol"; 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() internal { _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; } }
pragma solidity 0.6.12; import "./Context.sol"; // "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Pausable.sol"; contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() internal { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!_paused, "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(_paused, "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
pragma solidity 0.6.12; import "./Context.sol"; // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { 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 virtual 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 virtual onlyOwner { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
pragma solidity 0.6.12; import "./Context.sol"; import "../libraries/SafeMath.sol"; import "../interfaces/IERC20.sol"; // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol contract ERC20 is Context, IERC20 { using SafeMath for uint256; 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 name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-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 virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: 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 {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual 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 {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve( _msgSender(), spender, _allowances[_msgSender()][spender].sub( subtractedValue, "ERC20: decreased allowance below zero" ) ); 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 CGSVmatic 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 virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub( amount, "ERC20: 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 virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _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 virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub( amount, "ERC20: 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 internal function is equivalent to `approve`, and can be used to * e.g. set CGSVmatic 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 virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
pragma solidity 0.6.12; // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Context.sol abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
[{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"contract IPancakeswapFarm","name":"_masterchef","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastDepositedTime","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"performanceFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"callFee","type":"uint256"}],"name":"Harvest","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":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"CGSPID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_CALL_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PERFORMANCE_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WITHDRAW_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WITHDRAW_FEE_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calculateHarvestCougarRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calculateTotalPendingCougarRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callFee","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":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"inCaseTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastHarvestedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterchef","outputs":[{"internalType":"contract IPancakeswapFarm","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"performanceFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_callFee","type":"uint256"}],"name":"setCallFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_performanceFee","type":"uint256"}],"name":"setPerformanceFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdrawFee","type":"uint256"}],"name":"setWithdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdrawFeePeriod","type":"uint256"}],"name":"setWithdrawFeePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"lastDepositedTime","type":"uint256"},{"internalType":"uint256","name":"cakeAtLastUserAction","type":"uint256"},{"internalType":"uint256","name":"lastUserActionTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFeePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c060405260c86006556019600755600060085560006009553480156200002557600080fd5b5060405162002e0e38038062002e0e833981810160405260808110156200004b57600080fd5b508051602082015160408301516060909301519192909160006200006e62000137565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b191690556001600160601b0319606085811b821660805284901b1660a052600480546001600160a01b038481166001600160a01b0319928316179092556005805484841692169190911790556200012d9085168460001962001d356200013b602090811b91909117901c565b505050506200054e565b3390565b801580620001c5575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156200019557600080fd5b505afa158015620001aa573d6000803e3d6000fd5b505050506040513d6020811015620001c157600080fd5b5051155b620002025760405162461bcd60e51b815260040180806020018281038252603681526020018062002dd86036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b179091526200025a9185916200025f16565b505050565b6060620002bb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200031b60201b62001e4d179092919060201c565b8051909150156200025a57808060200190516020811015620002dc57600080fd5b50516200025a5760405162461bcd60e51b815260040180806020018281038252602a81526020018062002dae602a913960400191505060405180910390fd5b60606200032c848460008562000336565b90505b9392505050565b606082471015620003795760405162461bcd60e51b815260040180806020018281038252602681526020018062002d886026913960400191505060405180910390fd5b62000384856200049e565b620003d6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310620004175780518252601f199092019160209182019101620003f6565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146200047b576040519150601f19603f3d011682016040523d82523d6000602084013e62000480565b606091505b50909250905062000493828286620004a4565b979650505050505050565b3b151590565b60608315620004b55750816200032f565b825115620004c65782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101562000512578181015183820152602001620004f8565b50505050905090810190601f168015620005405780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60805160601c60a05160601c6127bb620005cd600039806107ff5280610bdd528061102a5280611338528061140a528061193a5280611cef52806120eb525080610900528061097c5280610c755280610cca5280610d4052806110c35280611696528061173c52806117685280611a085280611d1352506127bb6000f3fe608060405234801561001057600080fd5b506004361061023d5760003560e01c8063860ff1b51161013b578063d4b0de2f116100b8578063f0f442601161007c578063f0f442601461048c578063f2fde38b146104b2578063f851a440146104d8578063fb1db278146104e0578063fc0c546a146104e85761023d565b8063d4b0de2f146102ca578063db2e21bc1461044e578063def68a9c14610456578063df10b4e61461047c578063e941fa78146104845761023d565b8063a454dd6d116100ff578063a454dd6d146103fc578063b60f053114610404578063b6ac642a1461040c578063b6b55f2514610429578063bdca9165146104465761023d565b8063860ff1b5146103d457806387788782146103dc57806388267415146103e45780638da5cb5b146103ec57806390321e1a146103f45761023d565b806348a0d754116101c9578063715018a61161018d578063715018a6146103ac578063722713f7146103b457806377c7b8fc146103bc5780638456cb59146103c4578063853828b6146103cc5761023d565b806348a0d754146103215780635c975abb1461032957806361d027b314610345578063704b6c021461036957806370897b231461038f5761023d565b80632cfc5f01116102105780632cfc5f01146102e45780632e1a7d4d146102ec5780633a98ef39146103095780633f4ba83a146103115780634641257d146103195761023d565b80631959a002146102425780631efac1b81461028e57806326465826146102ad5780632ad5a53f146102ca575b600080fd5b6102686004803603602081101561025857600080fd5b50356001600160a01b03166104f0565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6102ab600480360360208110156102a457600080fd5b5035610518565b005b6102ab600480360360208110156102c357600080fd5b50356105ac565b6102d261063e565b60408051918252519081900360200190f35b6102d2610643565b6102ab6004803603602081101561030257600080fd5b503561064a565b6102d26109e3565b6102ab6109e9565b6102ab610abe565b6102d2610d3c565b610331610ddc565b604080519115158252519081900360200190f35b61034d610dec565b604080516001600160a01b039092168252519081900360200190f35b6102ab6004803603602081101561037f57600080fd5b50356001600160a01b0316610dfb565b6102ab600480360360208110156103a557600080fd5b5035610ec9565b6102ab610f5c565b6102d2610ffe565b6102d2611142565b6102ab61117c565b6102ab61124e565b6102d261130c565b6102d26113be565b6102d26113c4565b61034d6113c9565b6102d26113d8565b6102d26113de565b6102d26114af565b6102ab6004803603602081101561042257600080fd5b50356114b5565b6102ab6004803603602081101561043f57600080fd5b5035611547565b6102d26118e5565b6102ab6118eb565b6102ab6004803603602081101561046c57600080fd5b50356001600160a01b03166119b9565b6102d2611b0c565b6102d2611b12565b6102ab600480360360208110156104a257600080fd5b50356001600160a01b0316611b18565b6102ab600480360360208110156104c857600080fd5b50356001600160a01b0316611be6565b61034d611cde565b61034d611ced565b61034d611d11565b6001602081905260009182526040909120805491810154600282015460039092015490919084565b6004546001600160a01b03163314610565576040805162461bcd60e51b815260206004820152600b60248201526a61646d696e3a207775743f60a81b604482015290519081900360640190fd5b6203f4808111156105a75760405162461bcd60e51b815260040180806020018281038252603d8152602001806126b9603d913960400191505060405180910390fd5b600955565b6004546001600160a01b031633146105f9576040805162461bcd60e51b815260206004820152600b60248201526a61646d696e3a207775743f60a81b604482015290519081900360640190fd5b60648111156106395760405162461bcd60e51b815260040180806020018281038252602881526020018061261a6028913960400191505060405180910390fd5b600755565b606481565b6203f48081565b61065333611e66565b1561069c576040805162461bcd60e51b815260206004820152601460248201527318dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b604482015290519081900360640190fd5b3332146106ed576040805162461bcd60e51b815260206004820152601a6024820152791c1c9bde1e4818dbdb9d1c9858dd081b9bdd08185b1b1bddd95960321b604482015290519081900360640190fd5b33600090815260016020526040902081610744576040805162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015290519081900360640190fd5b805482111561079a576040805162461bcd60e51b815260206004820152601f60248201527f576974686472617720616d6f756e7420657863656564732062616c616e636500604482015290519081900360640190fd5b60006107ba6002546107b4856107ae610ffe565b90611e6c565b90611ece565b82549091506107c99084611f10565b82556002546107d89084611f10565b60025560006107e5610d3c565b9050818110156108b75760006107fb8383611f10565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663441a3e706009836040518363ffffffff1660e01b81526004018083815260200182815260200192505050600060405180830381600087803b15801561086c57600080fd5b505af1158015610880573d6000803e3d6000fd5b50505050600061088e610d3c565b9050600061089c8285611f10565b9050828110156108b3576108b08482611f52565b94505b5050505b60095460018401546108c891611f52565b4210156109375760006108ec6127106107b460085486611e6c90919063ffffffff16565b600554909150610929906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683611fac565b6109338382611f10565b9250505b825415610961576109576002546107b461094f610ffe565b865490611e6c565b6002840155610969565b600060028401555b4260038401556109a36001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163384611fac565b6040805183815260208101869052815133927ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568928290030190a250505050565b60025481565b6004546001600160a01b03163314610a36576040805162461bcd60e51b815260206004820152600b60248201526a61646d696e3a207775743f60a81b604482015290519081900360640190fd5b600054600160a01b900460ff16610a8b576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b610a93611ffe565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b610ac733611e66565b15610b10576040805162461bcd60e51b815260206004820152601460248201527318dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b604482015290519081900360640190fd5b333214610b61576040805162461bcd60e51b815260206004820152601a6024820152791c1c9bde1e4818dbdb9d1c9858dd081b9bdd08185b1b1bddd95960321b604482015290519081900360640190fd5b600054600160a01b900460ff1615610bb3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60408051630441a3e760e41b81526009600482015260006024820181905291516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263441a3e70926044808201939182900301818387803b158015610c2057600080fd5b505af1158015610c34573d6000803e3d6000fd5b505050506000610c42610d3c565b90506000610c616127106107b460065485611e6c90919063ffffffff16565b600554909150610c9e906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683611fac565b6000610cbb6127106107b460075486611e6c90919063ffffffff16565b9050610cf16001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383611fac565b610cf96120a6565b426003556040805183815260208101839052815133927f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954928290030190a2505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610dab57600080fd5b505afa158015610dbf573d6000803e3d6000fd5b505050506040513d6020811015610dd557600080fd5b5051905090565b600054600160a01b900460ff1690565b6005546001600160a01b031681565b610e03612151565b6000546001600160a01b03908116911614610e53576040805162461bcd60e51b81526020600482018190526024820152600080516020612699833981519152604482015290519081900360640190fd5b6001600160a01b038116610ea7576040805162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b03163314610f16576040805162461bcd60e51b815260206004820152600b60248201526a61646d696e3a207775743f60a81b604482015290519081900360640190fd5b6101f4811115610f575760405162461bcd60e51b81526004018080602001828103825260368152602001806126426036913960400191505060405180910390fd5b600655565b610f64612151565b6000546001600160a01b03908116911614610fb4576040805162461bcd60e51b81526020600482018190526024820152600080516020612699833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b604080516393f1a40b60e01b815260096004820152306024820152815160009283926001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016926393f1a40b92604480840193919291829003018186803b15801561106e57600080fd5b505afa158015611082573d6000803e3d6000fd5b505050506040513d604081101561109857600080fd5b5051604080516370a0823160e01b8152306004820152905191925061113c9183916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a0823191602480820192602092909190829003018186803b15801561110a57600080fd5b505afa15801561111e573d6000803e3d6000fd5b505050506040513d602081101561113457600080fd5b505190611f52565b91505090565b600060025460001461116d576111686002546107b4670de0b6b3a76400006107ae610ffe565b611177565b670de0b6b3a76400005b905090565b6004546001600160a01b031633146111c9576040805162461bcd60e51b815260206004820152600b60248201526a61646d696e3a207775743f60a81b604482015290519081900360640190fd5b600054600160a01b900460ff161561121b576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b611223612155565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b61125733611e66565b156112a0576040805162461bcd60e51b815260206004820152601460248201527318dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b604482015290519081900360640190fd5b3332146112f1576040805162461bcd60e51b815260206004820152601a6024820152791c1c9bde1e4818dbdb9d1c9858dd081b9bdd08185b1b1bddd95960321b604482015290519081900360640190fd5b3360009081526001602052604090205461130a9061064a565b565b6040805163c0d94fbd60e01b815260096004820152306024820152905160009182916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163c0d94fbd916044808301926020929190829003018186803b15801561137e57600080fd5b505afa158015611392573d6000803e3d6000fd5b505050506040513d60208110156113a857600080fd5b5051905061113c6113b7610d3c565b8290611f52565b60065481565b600981565b6000546001600160a01b031690565b60075481565b6040805163c0d94fbd60e01b815260096004820152306024820152905160009182916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163c0d94fbd916044808301926020929190829003018186803b15801561145057600080fd5b505afa158015611464573d6000803e3d6000fd5b505050506040513d602081101561147a57600080fd5b505190506114896113b7610d3c565b905060006114a86127106107b460075485611e6c90919063ffffffff16565b9250505090565b60035481565b6004546001600160a01b03163314611502576040805162461bcd60e51b815260206004820152600b60248201526a61646d696e3a207775743f60a81b604482015290519081900360640190fd5b60648111156115425760405162461bcd60e51b81526004018080602001828103825260308152602001806127206030913960400191505060405180910390fd5b600855565b600054600160a01b900460ff1615611599576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6115a233611e66565b156115eb576040805162461bcd60e51b815260206004820152601460248201527318dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b604482015290519081900360640190fd5b33321461163c576040805162461bcd60e51b815260206004820152601a6024820152791c1c9bde1e4818dbdb9d1c9858dd081b9bdd08185b1b1bddd95960321b604482015290519081900360640190fd5b60008111611686576040805162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc819195c1bdcda5d60721b604482015290519081900360640190fd5b6000611690610ffe565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561170157600080fd5b505afa158015611715573d6000803e3d6000fd5b505050506040513d602081101561172b57600080fd5b505190506117646001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330866121e3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156117d357600080fd5b505afa1580156117e7573d6000803e3d6000fd5b505050506040513d60208110156117fd57600080fd5b5051905061180b8183611f10565b9350600060025460001461183957611832846107b460025488611e6c90919063ffffffff16565b905061183c565b50835b33600090815260016020526040902080546118579083611f52565b815542600182015560025461186c9083611f52565b6002819055611888906107b4611880610ffe565b845490611e6c565b600282015542600382015561189b6120a6565b60408051878152602081018490524281830152905133917f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e919081900360600190a2505050505050565b6101f481565b6004546001600160a01b03163314611938576040805162461bcd60e51b815260206004820152600b60248201526a61646d696e3a207775743f60a81b604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635312ea8e60096040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561199f57600080fd5b505af11580156119b3573d6000803e3d6000fd5b50505050565b6004546001600160a01b03163314611a06576040805162461bcd60e51b815260206004820152600b60248201526a61646d696e3a207775743f60a81b604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611a775760405162461bcd60e51b81526004018080602001828103825260258152602001806125cf6025913960400191505060405180910390fd5b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611ac657600080fd5b505afa158015611ada573d6000803e3d6000fd5b505050506040513d6020811015611af057600080fd5b50519050611b086001600160a01b0383163383611fac565b5050565b60095481565b60085481565b611b20612151565b6000546001600160a01b03908116911614611b70576040805162461bcd60e51b81526020600482018190526024820152600080516020612699833981519152604482015290519081900360640190fd5b6001600160a01b038116611bc4576040805162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b611bee612151565b6000546001600160a01b03908116911614611c3e576040805162461bcd60e51b81526020600482018190526024820152600080516020612699833981519152604482015290519081900360640190fd5b6001600160a01b038116611c835760405162461bcd60e51b81526004018080602001828103825260268152602001806125a96026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b801580611dbb575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611d8d57600080fd5b505afa158015611da1573d6000803e3d6000fd5b505050506040513d6020811015611db757600080fd5b5051155b611df65760405162461bcd60e51b81526004018080602001828103825260368152602001806127506036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052611e48908490612239565b505050565b6060611e5c84846000856122ea565b90505b9392505050565b3b151590565b600082611e7b57506000611ec8565b82820282848281611e8857fe5b0414611ec55760405162461bcd60e51b81526004018080602001828103825260218152602001806126786021913960400191505060405180910390fd5b90505b92915050565b6000611ec583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612446565b6000611ec583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506124e8565b600082820183811015611ec5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611e48908490612239565b600054600160a01b900460ff16612053576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612089612151565b604080516001600160a01b039092168252519081900360200190a1565b60006120b0610d3c565b9050801561214e5760055460408051638dbdbe6d60e01b815260096004820152602481018490526001600160a01b03928316604482015290517f000000000000000000000000000000000000000000000000000000000000000090921691638dbdbe6d9160648082019260009290919082900301818387803b15801561213557600080fd5b505af1158015612149573d6000803e3d6000fd5b505050505b50565b3390565b600054600160a01b900460ff16156121a7576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612089612151565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526119b39085905b606061228e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611e4d9092919063ffffffff16565b805190915015611e48578080602001905160208110156122ad57600080fd5b5051611e485760405162461bcd60e51b815260040180806020018281038252602a8152602001806126f6602a913960400191505060405180910390fd5b60608247101561232b5760405162461bcd60e51b81526004018080602001828103825260268152602001806125f46026913960400191505060405180910390fd5b61233485611e66565b612385576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106123c45780518252601f1990920191602091820191016123a5565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612426576040519150601f19603f3d011682016040523d82523d6000602084013e61242b565b606091505b509150915061243b828286612542565b979650505050505050565b600081836124d25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561249757818101518382015260200161247f565b50505050905090810190601f1680156124c45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816124de57fe5b0495945050505050565b6000818484111561253a5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561249757818101518382015260200161247f565b505050900390565b60608315612551575081611e5f565b8251156125615782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561249757818101518382015260200161247f56fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373546f6b656e2063616e6e6f742062652073616d65206173206465706f73697420746f6b656e416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c63616c6c4665652063616e6e6f74206265206d6f7265207468616e204d41585f43414c4c5f464545706572666f726d616e63654665652063616e6e6f74206265206d6f7265207468616e204d41585f504552464f524d414e43455f464545536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65727769746864726177466565506572696f642063616e6e6f74206265206d6f7265207468616e204d41585f57495448445241575f4645455f504552494f445361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656477697468647261774665652063616e6e6f74206265206d6f7265207468616e204d41585f57495448445241575f4645455361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220a7cdacfdefb4fb78220f12e67c8d6c6bae42c463866c9e5adb42832dcfc5840c64736f6c634300060c0033416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000000002dfc76901bb2ac2a5fa5fc479590a490bbb10a5f000000000000000000000000c5c772e21a39f88f0960172016cf455da6ff52af00000000000000000000000075c630f22298c20aaeeb1592639d29e325bee91d000000000000000000000000c07aeeeb785c30fd0dac23f1b498cd12ef2f3290
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002dfc76901bb2ac2a5fa5fc479590a490bbb10a5f000000000000000000000000c5c772e21a39f88f0960172016cf455da6ff52af00000000000000000000000075c630f22298c20aaeeb1592639d29e325bee91d000000000000000000000000c07aeeeb785c30fd0dac23f1b498cd12ef2f3290
-----Decoded View---------------
Arg [0] : _token (address): 0x2dfc76901bb2ac2a5fa5fc479590a490bbb10a5f
Arg [1] : _masterchef (address): 0xc5c772e21a39f88f0960172016cf455da6ff52af
Arg [2] : _admin (address): 0x75c630f22298c20aaeeb1592639d29e325bee91d
Arg [3] : _treasury (address): 0xc07aeeeb785c30fd0dac23f1b498cd12ef2f3290
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000002dfc76901bb2ac2a5fa5fc479590a490bbb10a5f
Arg [1] : 000000000000000000000000c5c772e21a39f88f0960172016cf455da6ff52af
Arg [2] : 00000000000000000000000075c630f22298c20aaeeb1592639d29e325bee91d
Arg [3] : 000000000000000000000000c07aeeeb785c30fd0dac23f1b498cd12ef2f3290
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.