More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 15,200 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit | 19161216 | 19 hrs ago | IN | 0 CRO | 0.57996851 | ||||
Deposit | 19161212 | 19 hrs ago | IN | 0 CRO | 0.64473476 | ||||
Deposit | 19153021 | 32 hrs ago | IN | 0 CRO | 0.71294763 | ||||
Deposit | 19152489 | 33 hrs ago | IN | 0 CRO | 0.71303853 | ||||
Deposit | 19151912 | 34 hrs ago | IN | 0 CRO | 0.70420608 | ||||
Deposit | 19151905 | 34 hrs ago | IN | 0 CRO | 0.57996851 | ||||
Withdraw | 19134042 | 2 days ago | IN | 0 CRO | 0.73352133 | ||||
Deposit | 19128939 | 2 days ago | IN | 0 CRO | 0.70420608 | ||||
Deposit | 19128922 | 2 days ago | IN | 0 CRO | 0.70420608 | ||||
Deposit | 19126198 | 3 days ago | IN | 0 CRO | 0.70429698 | ||||
Deposit | 19126155 | 3 days ago | IN | 0 CRO | 0.71308398 | ||||
Deposit | 19124995 | 3 days ago | IN | 0 CRO | 1.15339033 | ||||
Deposit | 19121654 | 3 days ago | IN | 0 CRO | 0.57996851 | ||||
Deposit | 19106591 | 4 days ago | IN | 0 CRO | 0.64473476 | ||||
Withdraw | 19078720 | 6 days ago | IN | 0 CRO | 0.7239522 | ||||
Deposit | 19075551 | 6 days ago | IN | 0 CRO | 0.71285673 | ||||
Deposit | 19075429 | 6 days ago | IN | 0 CRO | 0.76901778 | ||||
Deposit | 19075393 | 6 days ago | IN | 0 CRO | 0.57996851 | ||||
Deposit | 19074667 | 6 days ago | IN | 0 CRO | 0.64473476 | ||||
Deposit | 19060515 | 7 days ago | IN | 0 CRO | 0.57996851 | ||||
Withdraw | 19048836 | 8 days ago | IN | 0 CRO | 0.72636918 | ||||
Deposit | 19046780 | 8 days ago | IN | 0 CRO | 0.64473476 | ||||
Withdraw | 19033048 | 9 days ago | IN | 0 CRO | 0.79824213 | ||||
Deposit | 19032682 | 9 days ago | IN | 0 CRO | 0.70425153 | ||||
Deposit | 19014092 | 10 days ago | IN | 0 CRO | 0.57996851 |
Loading...
Loading
Contract Name:
CandyMasterChef
Compiler Version
v0.8.4+commit.c7e474f2
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.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../interfaces/ICandy.sol"; import "../interfaces/ICandyReferral.sol"; contract CandyMasterChef is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; using SafeERC20 for ICandy; /// @notice Info of each user. /// `amount` LP token amount the user has provided. /// `rewardDebt` Used to calculate the correct amount of rewards. See explanation below. /// /// We do some fancy math here. Basically, any point in time, the amount of CANDYs /// entitled to a user but is pending to be distributed is: /// /// pending reward = (user share * pool.accCandyPerShare) - user.rewardDebt /// /// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens: /// 1. The pool's `accCandyPerShare` (and `lastRewardBlock`) gets updated. /// 2. User receives the pending reward sent to his/her address. /// 3. User's `amount` gets updated. Pool's `totalBoostedShare` gets updated. /// 4. User's `rewardDebt` gets updated. struct UserInfo { uint256 amount; uint256 rewardDebt; uint256 boostMultiplier; } /// @notice Info of each pool. /// `allocPoint` The amount of allocation points assigned to the pool. /// Also known as the amount of "multipliers". Combined with `totalXAllocPoint`, it defines the % of /// CANDY rewards each pool gets. /// `accCandyPerShare` Accumulated CANDYs per share, times 1e12. /// `lastRewardBlock` Last block number that pool update action is executed. /// `isRegular` The flag to set pool is regular or special. See below: /// In MasterChef farms are "regular pools". "special pools", which use a different sets of /// `allocPoint` and their own `totalSpecialAllocPoint` are designed to handle the distribution of /// the CANDY rewards to all the CandyCity products. /// `totalBoostedShare` The total amount of user shares in each pool. After considering the share boosts. struct PoolInfo { uint256 accCandyPerShare; uint256 lastRewardBlock; uint256 allocPoint; uint256 totalBoostedShare; bool isRegular; } /// @notice Address of CANDY contract. ICandy public immutable candyToken; /// @notice Farm referral contract ICandyReferral public refContract; /// @notice The contract handles the share boosts. address public boostContract; /// @notice Developer account to receive address public devAccount; /// @notice Info of each pool. PoolInfo[] public poolInfo; /// @notice Address of the LP token for each pool. IERC20[] public lpToken; /// @notice Info of each pool user. mapping(uint256 => mapping(address => UserInfo)) public userInfo; /// @notice The whitelist of addresses allowed to deposit in special pools. mapping(address => bool) public whiteList; /// @notice Total CANDY staked in the pools, we have this amount to prevent user staked CANDY token is being sent as rewards uint256 public totalCandyStaked; /// @notice Total regular allocation points. Must be the sum of all regular pools' allocation points. uint256 public totalRegularAllocPoint; /// @notice Total special allocation points. Must be the sum of all special pools' allocation points. uint256 public totalSpecialAllocPoint; /// @notice Reward generated per block uint256 public rewardPerBlock; /// @notice total CANDY rate = toRegular + toSpecial uint256 public constant CANDY_RATE_TOTAL_PRECISION = 1e5; /// @notice CANDY distribute % for regular farm pool uint256 public candyRateToRegularFarm = 16666; /// @notice CANDY distribute % for special pools uint256 public candyRateToSpecialFarm = 83334; /// @notice Referral commission fee, default 1% uint16 public refCommissionFee = 100; /// @notice Max referral commission fee should be less than 10% uint16 public constant MAX_REF_FEE = 1000; uint16 public constant FEE_PRECISION = 1e4; uint256 public constant ACC_CANDY_PRECISION = 1e18; /// @notice Basic boost factor, none boosted user's boost factor uint256 public constant BOOST_PRECISION = 100 * 1e10; /// @notice Hard limit for maxmium boost factor, it must greater than BOOST_PRECISION uint256 public constant MAX_BOOST_PRECISION = 200 * 1e10; event AddPool( uint256 indexed pid, uint256 allocPoint, IERC20 indexed lpToken, bool isRegular ); event SetPool(uint256 indexed pid, uint256 allocPoint); event UpdatePool( uint256 indexed pid, uint256 lastRewardBlock, uint256 lpSupply, uint256 accCandyPerShare ); event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event EmergencyWithdraw( address indexed user, uint256 indexed pid, uint256 amount ); event UpdateEmissionRate(uint256 oldRate, uint256 newRate); event UpdateCandyRate(uint256 regularFarmRate, uint256 specialFarmRate); event UpdateRefContract(address oldContract, address newContract); event UpdateRefCommissionFee(uint16 oldFee, uint16 newFee); event UpdateDevAccount(address oldAccount, address newAccount); event UpdateWhiteList(address indexed user, bool isValid); event UpdateBoostContract(address indexed boostContract); event UpdateBoostMultiplier( address indexed user, uint256 pid, uint256 oldMultiplier, uint256 newMultiplier ); /// @param _candyToken The candy token contract address. /// @param _refContract The referral contract /// @param _devAccount The account to receive CANDY minted for the dev team /// @param _rewardPerBlock Emission rate constructor( ICandy _candyToken, ICandyReferral _refContract, address _devAccount, uint256 _rewardPerBlock ) { require(_devAccount != address(0), "Invalid dev account"); candyToken = _candyToken; refContract = _refContract; devAccount = _devAccount; rewardPerBlock = _rewardPerBlock; } /** * @dev Throws if caller is not the boost contract. */ modifier onlyBoostContract() { require( boostContract == msg.sender, "Ownable: caller is not the boost contract" ); _; } /// @notice Returns the number of pools. function poolLength() public view returns (uint256 pools) { pools = poolInfo.length; } /// @notice Add a new pool. Can only be called by the owner. /// @param _allocPoint Number of allocation points for the new pool. /// @param _lpToken Address of the LP BEP-20 token. /// @param _isRegular Whether the pool is regular or special. LP farms are always "regular". "Special" pools are /// @param _withUpdate Whether call "massUpdatePools" operation. /// only for CANDY distributions within CandyCity products. function add( uint256 _allocPoint, IERC20 _lpToken, bool _isRegular, bool _withUpdate ) external onlyOwner { require(_lpToken.balanceOf(address(this)) >= 0, "None ERC20 tokens"); if (_withUpdate) { massUpdatePools(); } if (_isRegular) totalRegularAllocPoint += _allocPoint; else totalSpecialAllocPoint += _allocPoint; lpToken.push(_lpToken); poolInfo.push( PoolInfo({ allocPoint: _allocPoint, lastRewardBlock: block.number, accCandyPerShare: 0, isRegular: _isRegular, totalBoostedShare: 0 }) ); emit AddPool(lpToken.length - 1, _allocPoint, _lpToken, _isRegular); } /// @notice Update the given pool's CANDY allocation point. Can only be called by the owner. /// @param _pid The id of the pool. See `poolInfo`. /// @param _allocPoint New number of allocation points for the pool. /// @param _withUpdate Whether call "massUpdatePools" operation. function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) external onlyOwner { // No matter _withUpdate is true or false, we need to execute updatePool once before set the pool parameters. updatePool(_pid); if (_withUpdate) { massUpdatePools(); } if (poolInfo[_pid].isRegular) { totalRegularAllocPoint = totalRegularAllocPoint + _allocPoint - poolInfo[_pid].allocPoint; } else { totalSpecialAllocPoint = totalSpecialAllocPoint + _allocPoint - poolInfo[_pid].allocPoint; } poolInfo[_pid].allocPoint = _allocPoint; emit SetPool(_pid, _allocPoint); } /// @notice View function for checking pending CANDY rewards. /// @param _pid The id of the pool. See `poolInfo`. /// @param _user Address of the user. function pendingCandy(uint256 _pid, address _user) external view returns (uint256) { PoolInfo memory pool = poolInfo[_pid]; UserInfo memory user = userInfo[_pid][_user]; uint256 accCandyPerShare = pool.accCandyPerShare; uint256 lpSupply = pool.totalBoostedShare; if (block.number > pool.lastRewardBlock && lpSupply != 0) { uint256 multiplier = block.number - pool.lastRewardBlock; uint256 candyReward = (multiplier * candyPerBlock(pool.isRegular) * pool.allocPoint) / ( pool.isRegular ? totalRegularAllocPoint : totalSpecialAllocPoint ); accCandyPerShare += (candyReward * ACC_CANDY_PRECISION) / lpSupply; } uint256 boostedAmount = (user.amount * getBoostMultiplier(_user, _pid)) / BOOST_PRECISION; return (boostedAmount * accCandyPerShare) / ACC_CANDY_PRECISION - user.rewardDebt; } /// @notice Update CANDY reward for all the active pools. Be careful of gas spending! function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { PoolInfo memory pool = poolInfo[pid]; if (pool.allocPoint != 0) { updatePool(pid); } } } /// @notice Calculates and returns the `amount` of CANDY per block. /// @param _isRegular If the pool belongs to regular or special. function candyPerBlock(bool _isRegular) public view returns (uint256 amount) { if (_isRegular) { amount = (rewardPerBlock * candyRateToRegularFarm) / CANDY_RATE_TOTAL_PRECISION; } else { amount = (rewardPerBlock * candyRateToSpecialFarm) / CANDY_RATE_TOTAL_PRECISION; } } /// @notice Update reward variables for the given pool. /// @param _pid The id of the pool. See `poolInfo`. /// @return pool Returns the pool that was updated. function updatePool(uint256 _pid) public returns (PoolInfo memory pool) { pool = poolInfo[_pid]; if (block.number > pool.lastRewardBlock) { uint256 lpSupply = pool.totalBoostedShare; uint256 totalAllocPoint = ( pool.isRegular ? totalRegularAllocPoint : totalSpecialAllocPoint ); if (lpSupply > 0 && totalAllocPoint > 0) { uint256 multiplier = block.number - pool.lastRewardBlock; uint256 candyReward = (multiplier * candyPerBlock(pool.isRegular) * pool.allocPoint) / totalAllocPoint; // CANDY token is minted for user rewards candyToken.mint(candyReward); candyToken.mint(devAccount, candyReward / 10); // 10% of mint amount is sent to dev team wallet pool.accCandyPerShare += (candyReward * ACC_CANDY_PRECISION) / lpSupply; } pool.lastRewardBlock = block.number; poolInfo[_pid] = pool; emit UpdatePool( _pid, pool.lastRewardBlock, lpSupply, pool.accCandyPerShare ); } } /// @notice Deposit LP tokens to pool. /// @param _pid The id of the pool. See `poolInfo`. /// @param _amount Amount of LP tokens to deposit. /// @param _referrer Referrer who bring me to Candy Finance function deposit( uint256 _pid, uint256 _amount, address _referrer ) external nonReentrant { PoolInfo memory pool = updatePool(_pid); UserInfo storage user = userInfo[_pid][msg.sender]; // Record referrer to this depositer refContract.recordReferrer(_msgSender(), _referrer); require(pool.isRegular || whiteList[msg.sender], "Unable to deposit"); uint256 multiplier = getBoostMultiplier(msg.sender, _pid); if (user.amount > 0) { safeRewardTransfer(msg.sender, _pid, multiplier); } if (_amount > 0) { uint256 before = lpToken[_pid].balanceOf(address(this)); lpToken[_pid].safeTransferFrom(msg.sender, address(this), _amount); _amount = lpToken[_pid].balanceOf(address(this)) - before; user.amount += _amount; if (lpToken[_pid] == candyToken) totalCandyStaked += _amount; // Update total boosted share. pool.totalBoostedShare += (_amount * multiplier) / BOOST_PRECISION; } user.rewardDebt = (((user.amount * multiplier) / BOOST_PRECISION) * pool.accCandyPerShare) / ACC_CANDY_PRECISION; poolInfo[_pid] = pool; emit Deposit(msg.sender, _pid, _amount); } /// @notice Withdraw LP tokens from pool. /// @param _pid The id of the pool. See `poolInfo`. /// @param _amount Amount of LP tokens to withdraw. function withdraw(uint256 _pid, uint256 _amount) external nonReentrant { PoolInfo memory pool = updatePool(_pid); UserInfo storage user = userInfo[_pid][msg.sender]; require(user.amount >= _amount, "withdraw: Insufficient"); uint256 multiplier = getBoostMultiplier(msg.sender, _pid); safeRewardTransfer(msg.sender, _pid, multiplier); if (_amount > 0) { user.amount -= _amount; if (lpToken[_pid] == candyToken) totalCandyStaked -= _amount; lpToken[_pid].safeTransfer(msg.sender, _amount); } user.rewardDebt = (((user.amount * multiplier) / BOOST_PRECISION) * pool.accCandyPerShare) / ACC_CANDY_PRECISION; poolInfo[_pid].totalBoostedShare -= (_amount * multiplier) / BOOST_PRECISION; emit Withdraw(msg.sender, _pid, _amount); } /// @notice Withdraw without caring about the rewards. EMERGENCY ONLY. /// @param _pid The id of the pool. See `poolInfo`. function emergencyWithdraw(uint256 _pid) external nonReentrant { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; uint256 amount = user.amount; user.amount = 0; user.rewardDebt = 0; uint256 boostedAmount = (amount * getBoostMultiplier(msg.sender, _pid)) / BOOST_PRECISION; pool.totalBoostedShare = pool.totalBoostedShare > boostedAmount ? pool.totalBoostedShare - boostedAmount : 0; if (lpToken[_pid] == candyToken) totalCandyStaked -= amount; // Note: transfer can fail or succeed if `amount` is zero. lpToken[_pid].safeTransfer(msg.sender, amount); emit EmergencyWithdraw(msg.sender, _pid, amount); } /// @notice Update the % of CANDY distributions for regular pools and special pools. /// @param _regularFarmRate The % of CANDY to regular pools each block. /// @param _specialFarmRate The % of CANDY to special pools each block. /// @param _withUpdate Whether call "massUpdatePools" operation. function updateCandyRate( uint256 _regularFarmRate, uint256 _specialFarmRate, bool _withUpdate ) external onlyOwner { require( _regularFarmRate > 0 && _specialFarmRate > 0 && _regularFarmRate + _specialFarmRate == CANDY_RATE_TOTAL_PRECISION, "Invalid rates" ); if (_withUpdate) { massUpdatePools(); } candyRateToRegularFarm = _regularFarmRate; candyRateToSpecialFarm = _specialFarmRate; emit UpdateCandyRate(_regularFarmRate, _specialFarmRate); } /// @notice Update emission rate /// @param _rewardPerBlock The new emission rate value function updateEmissionRate(uint256 _rewardPerBlock) external onlyOwner { uint256 prevRewardPerBlock_ = rewardPerBlock; rewardPerBlock = _rewardPerBlock; emit UpdateEmissionRate(prevRewardPerBlock_, rewardPerBlock); } /// @notice Update referral commission fee function updateRefCommissionFee(uint16 _refFee) external onlyOwner { require(_refFee <= MAX_REF_FEE, "Too much fee"); emit UpdateRefCommissionFee(refCommissionFee, _refFee); refCommissionFee = _refFee; } /// @notice Update referral contract function updateRefContract(ICandyReferral _refContract) external onlyOwner { require(address(_refContract) != address(0), "Invalid contract"); emit UpdateRefContract(address(refContract), address(_refContract)); refContract = _refContract; } /// @notice Update the dev account for the CANDY team /// @param _devAccount To receive the minted CANDY tokens for the team function updateDevAccount(address _devAccount) external onlyOwner { require(_devAccount != address(0), "Invalid dev account"); address oldAccount = devAccount; devAccount = _devAccount; emit UpdateDevAccount(oldAccount, devAccount); } /// @notice Update whitelisted addresses for special pools. /// @param _user The address to be updated. /// @param _isValid The flag for valid or invalid. function updateWhiteList(address _user, bool _isValid) external onlyOwner { require(_user != address(0), "Invalid user"); whiteList[_user] = _isValid; emit UpdateWhiteList(_user, _isValid); } /// @notice Update boost contract address and max boost factor. /// @param _newBoostContract The new address for handling all the share boosts. function updateBoostContract(address _newBoostContract) external onlyOwner { require( _newBoostContract != address(0) && _newBoostContract != boostContract, "Invalid contract" ); boostContract = _newBoostContract; emit UpdateBoostContract(_newBoostContract); } /// @notice Update user boost factor. /// @param _user The user address for boost factor updates. /// @param _pid The pool id for the boost factor updates. /// @param _newMultiplier New boost multiplier. function updateBoostMultiplier( address _user, uint256 _pid, uint256 _newMultiplier ) external onlyBoostContract nonReentrant { require(_user != address(0), "Invalid user"); require(poolInfo[_pid].isRegular, "Only regular farm could be boosted"); require( _newMultiplier >= BOOST_PRECISION && _newMultiplier <= MAX_BOOST_PRECISION, "Invalid boost multiplier" ); PoolInfo memory pool = updatePool(_pid); UserInfo storage user = userInfo[_pid][_user]; uint256 prevMultiplier = getBoostMultiplier(_user, _pid); safeRewardTransfer(_user, _pid, prevMultiplier); user.rewardDebt = (((user.amount * _newMultiplier) / BOOST_PRECISION) * pool.accCandyPerShare) / ACC_CANDY_PRECISION; pool.totalBoostedShare = pool.totalBoostedShare + (user.amount * _newMultiplier) / BOOST_PRECISION - (user.amount * prevMultiplier) / BOOST_PRECISION; poolInfo[_pid] = pool; userInfo[_pid][_user].boostMultiplier = _newMultiplier; emit UpdateBoostMultiplier(_user, _pid, prevMultiplier, _newMultiplier); } /// @notice Get user boost multiplier for specific pool id. /// @param _user The user address. /// @param _pid The pool id. function getBoostMultiplier(address _user, uint256 _pid) public view returns (uint256) { uint256 multiplier = userInfo[_pid][_user].boostMultiplier; return multiplier > BOOST_PRECISION ? multiplier : BOOST_PRECISION; } /// @notice Settles, distribute the pending CANDY rewards for given user. /// @param _user The user address for settling rewards. /// @param _pid The pool id. /// @param _boostMultiplier The user boost multiplier in specific pool id. function safeRewardTransfer( address _user, uint256 _pid, uint256 _boostMultiplier ) internal { UserInfo memory user = userInfo[_pid][_user]; uint256 boostedAmount = (user.amount * _boostMultiplier) / BOOST_PRECISION; uint256 accCandy = (boostedAmount * poolInfo[_pid].accCandyPerShare) / ACC_CANDY_PRECISION; uint256 pending = accCandy - user.rewardDebt; // If masterchef does not have enough CANDY, mints deficient CANDY if (candyToken.balanceOf(address(this)) < pending + totalCandyStaked) candyToken.mint( pending + totalCandyStaked - candyToken.balanceOf(address(this)) ); if (pending > 0) { candyToken.safeTransfer(_user, pending); } // Referrer of this user will get commission fee address referrer = refContract.getReferrer(_user); if (referrer != address(0)) { uint256 feeAmount = (pending * refCommissionFee) / FEE_PRECISION; if (feeAmount > 0) { candyToken.mint(referrer, feeAmount); refContract.addReferralReward(_user, feeAmount); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ICandyReferral { /** * @dev Record referral. */ function recordReferrer(address _account, address _referrer) external; /** * @dev Record referral reward. */ function addReferralReward(address _referrer, uint256 _reward) external; /** * @dev Get the account that referred the user. */ function getReferrer(address _account) external view returns (address); /** * @dev Get the total earned of a referrer */ function getReferrerEarned(address _account) external view returns (uint256); /** * @notice Get referred users count by an account */ function getReferredUserCount(address _account) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface ICandy is IERC20 { function mint(uint256 _amount) external; function mint(address _account, uint256 _amount) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // 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 // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract ICandy","name":"_candyToken","type":"address"},{"internalType":"contract ICandyReferral","name":"_refContract","type":"address"},{"internalType":"address","name":"_devAccount","type":"address"},{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":true,"internalType":"contract IERC20","name":"lpToken","type":"address"},{"indexed":false,"internalType":"bool","name":"isRegular","type":"bool"}],"name":"AddPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","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":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"}],"name":"SetPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"boostContract","type":"address"}],"name":"UpdateBoostContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMultiplier","type":"uint256"}],"name":"UpdateBoostMultiplier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"regularFarmRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"specialFarmRate","type":"uint256"}],"name":"UpdateCandyRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAccount","type":"address"},{"indexed":false,"internalType":"address","name":"newAccount","type":"address"}],"name":"UpdateDevAccount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"UpdateEmissionRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accCandyPerShare","type":"uint256"}],"name":"UpdatePool","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"oldFee","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"newFee","type":"uint16"}],"name":"UpdateRefCommissionFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldContract","type":"address"},{"indexed":false,"internalType":"address","name":"newContract","type":"address"}],"name":"UpdateRefContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"isValid","type":"bool"}],"name":"UpdateWhiteList","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"ACC_CANDY_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BOOST_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CANDY_RATE_TOTAL_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_PRECISION","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_BOOST_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_REF_FEE","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_isRegular","type":"bool"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"boostContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_isRegular","type":"bool"}],"name":"candyPerBlock","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"candyRateToRegularFarm","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"candyRateToSpecialFarm","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"candyToken","outputs":[{"internalType":"contract ICandy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_referrer","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devAccount","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"getBoostMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lpToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingCandy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"uint256","name":"accCandyPerShare","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"totalBoostedShare","type":"uint256"},{"internalType":"bool","name":"isRegular","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"pools","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refCommissionFee","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refContract","outputs":[{"internalType":"contract ICandyReferral","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalCandyStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRegularAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSpecialAllocPoint","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":"address","name":"_newBoostContract","type":"address"}],"name":"updateBoostContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_newMultiplier","type":"uint256"}],"name":"updateBoostMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_regularFarmRate","type":"uint256"},{"internalType":"uint256","name":"_specialFarmRate","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"updateCandyRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devAccount","type":"address"}],"name":"updateDevAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"}],"name":"updateEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[{"components":[{"internalType":"uint256","name":"accCandyPerShare","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"totalBoostedShare","type":"uint256"},{"internalType":"bool","name":"isRegular","type":"bool"}],"internalType":"struct CandyMasterChef.PoolInfo","name":"pool","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_refFee","type":"uint16"}],"name":"updateRefCommissionFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ICandyReferral","name":"_refContract","type":"address"}],"name":"updateRefContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bool","name":"_isValid","type":"bool"}],"name":"updateWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"boostMultiplier","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whiteList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405261411a600d5562014586600e55600f805461ffff191660641790553480156200002c57600080fd5b50604051620030ab380380620030ab8339810160408190526200004f9162000152565b6200005a3362000102565b600180556001600160a01b038216620000b95760405162461bcd60e51b815260206004820152601360248201527f496e76616c696420646576206163636f756e7400000000000000000000000000604482015260640160405180910390fd5b60609390931b6001600160601b031916608052600280546001600160a01b03199081166001600160a01b03948516179091556004805490911691909216179055600c55620001c4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000806080858703121562000168578384fd5b84516200017581620001ab565b60208601519094506200018881620001ab565b60408601519093506200019b81620001ab565b6060959095015193969295505050565b6001600160a01b0381168114620001c157600080fd5b50565b60805160601c612e89620002226000396000818161057f01528181610dfd01528181611192015281816112010152818161146901528181611b610152818161236e0152818161240b0152818161251001526126160152612e896000f3fe608060405234801561001057600080fd5b50600436106102695760003560e01c806375267b3a116101515780639dd2fcc3116100c3578063c507aeaa11610087578063c507aeaa146105d0578063cc6db2da146105e3578063df97d31c146105ef578063dfcedeee14610602578063e63a391f14610615578063f2fde38b1461061e57600080fd5b80639dd2fcc314610567578063a63f5e2a1461057a578063a8d7c1d5146105a1578063ac1d0609146105b4578063c40d337b146105c757600080fd5b80638da5cb5b116101155780638da5cb5b146104c95780638dbdbe6d146104da5780638f040a21146104ed57806393f1a40b146104f6578063955c0e561461054b57806399d7e84a1461055e57600080fd5b806375267b3a1461048857806378ed5d1f146104915780637ba20694146104a45780638ae39cac146104ad5780638c9452bf146104b657600080fd5b80633fc06d55116101ea5780635c3c6b8e116101ae5780635c3c6b8e1461040c578063630b5ba11461042d57806364482f7914610435578063691edfda1461044857806369b0212814610473578063715018a61461048057600080fd5b80633fc06d5514610373578063441a3e701461037c578063483c35a21461038f57806351eb05a6146103a25780635312ea8e146103f957600080fd5b80630e467282116102315780630e467282146102ce5780631526fe27146102e1578063266af8401461031e578063372c12b1146103315780633f4857901461036457600080fd5b8063033186e81461026e578063041a84c914610294578063081e3eda146102a95780630ad83f35146102b15780630ba84cd2146102bb575b600080fd5b61028161027c366004612afa565b610631565b6040519081526020015b60405180910390f35b6102a76102a2366004612b25565b610678565b005b600554610281565b610281620186a081565b6102a76102c9366004612bb3565b610a18565b6102a76102dc366004612cb2565b610a66565b6102f46102ef366004612bb3565b610b27565b6040805195865260208601949094529284019190915260608301521515608082015260a00161028b565b61028161032c366004612be3565b610b6b565b61035461033f366004612a8a565b60086020526000908152604090205460ff1681565b604051901515815260200161028b565b610281670de0b6b3a764000081565b61028160095481565b6102a761038a366004612c59565b610d27565b6102a761039d366004612a8a565b610fa2565b6103b56103b0366004612bb3565b611050565b60405161028b9190600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b6102a7610407366004612bb3565b611392565b600f5461041a9061ffff1681565b60405161ffff909116815260200161028b565b6102a761153f565b6102a7610443366004612cb2565b6115e9565b60045461045b906001600160a01b031681565b6040516001600160a01b03909116815260200161028b565b6102816501d1a94a200081565b6102a761175e565b610281600e5481565b61045b61049f366004612bb3565b611772565b61041a6103e881565b610281600c5481565b6102a76104c4366004612a8a565b61179c565b6000546001600160a01b031661045b565b6102a76104e8366004612c7a565b611856565b610281600d5481565b610530610504366004612be3565b600760209081526000928352604080842090915290825290208054600182015460029092015490919083565b6040805193845260208401929092529082015260600161028b565b610281610559366004612b59565b611d05565b610281600b5481565b6102a7610575366004612a8a565b611d45565b61045b7f000000000000000000000000000000000000000000000000000000000000000081565b6102a76105af366004612b91565b611dfc565b6102a76105c2366004612ac2565b611ea3565b610281600a5481565b6102a76105de366004612c07565b611f4f565b61028164e8d4a5100081565b60025461045b906001600160a01b031681565b60035461045b906001600160a01b031681565b61041a61271081565b6102a761062c366004612a8a565b612201565b60008181526007602090815260408083206001600160a01b038616845290915281206002015464e8d4a51000811161066e5764e8d4a51000610670565b805b949350505050565b6003546001600160a01b031633146106e95760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f73746044820152680818dbdb9d1c9858dd60ba1b60648201526084015b60405180910390fd5b6002600154141561070c5760405162461bcd60e51b81526004016106e090612d2e565b60026001556001600160a01b0383166107565760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103ab9b2b960a11b60448201526064016106e0565b6005828154811061077757634e487b7160e01b600052603260045260246000fd5b600091825260209091206004600590920201015460ff166107e55760405162461bcd60e51b815260206004820152602260248201527f4f6e6c7920726567756c6172206661726d20636f756c6420626520626f6f7374604482015261195960f21b60648201526084016106e0565b64e8d4a51000811015801561080057506501d1a94a20008111155b61084c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420626f6f7374206d756c7469706c696572000000000000000060448201526064016106e0565b600061085783611050565b60008481526007602090815260408083206001600160a01b038916845290915281209192506108868686610631565b905061089386868361227a565b82518254670de0b6b3a7640000919064e8d4a51000906108b4908890612d9d565b6108be9190612d7d565b6108c89190612d9d565b6108d29190612d7d565b6001830155815464e8d4a51000906108eb908390612d9d565b6108f59190612d7d565b825464e8d4a5100090610909908790612d9d565b6109139190612d7d565b84606001516109229190612d65565b61092c9190612dbc565b6060840152600580548491908790811061095657634e487b7160e01b600052603260045260246000fd5b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608087015160038601556080909601516004909401805460ff191694151594909417909355898452600782528084206001600160a01b038c1680865290835293819020909201889055815189815290810185905290810187905290917f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba910160405180910390a250506001805550505050565b610a206126e5565b600c80549082905560408051828152602081018490527f16b9091836a63537907593ebc3a80f3528891f3575b10f58ad7dd9c29fd0d44f91015b60405180910390a15050565b610a6e6126e5565b600083118015610a7e5750600082115b8015610a955750620186a0610a938385612d65565b145b610ad15760405162461bcd60e51b815260206004820152600d60248201526c496e76616c696420726174657360981b60448201526064016106e0565b8015610adf57610adf61153f565b600d839055600e82905560408051848152602081018490527fcf8b0b725fc94c51f7a409f0cf061a6e2e94f24c02cd9d5210f25851205f8018910160405180910390a1505050565b60058181548110610b3757600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b60008060058481548110610b8f57634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160a081018252600590940290910180548452600180820154858501908152600280840154878601526003840154606080890191825260049095015460ff16151560808901528c8952600787528589206001600160a01b038d168a528752978590208551948501865280548552928301549584019590955293015491810191909152825193519151929450929143118015610c3657508015155b15610cc4576000846020015143610c4d9190612dbc565b905060008560800151610c6257600b54610c66565b600a545b8660400151610c788860800151611d05565b610c829085612d9d565b610c8c9190612d9d565b610c969190612d7d565b905082610cab670de0b6b3a764000083612d9d565b610cb59190612d7d565b610cbf9085612d65565b935050505b600064e8d4a51000610cd6888a610631565b8551610ce29190612d9d565b610cec9190612d7d565b6020850151909150670de0b6b3a7640000610d078584612d9d565b610d119190612d7d565b610d1b9190612dbc565b98975050505050505050565b60026001541415610d4a5760405162461bcd60e51b81526004016106e090612d2e565b60026001556000610d5a83611050565b60008481526007602090815260408083203384529091529020805491925090831115610dc15760405162461bcd60e51b81526020600482015260166024820152751dda5d1a191c985dce88125b9cdd59999a58da595b9d60521b60448201526064016106e0565b6000610dcd3386610631565b9050610dda33868361227a565b8315610ebb5783826000016000828254610df49190612dbc565b925050819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031660068681548110610e4657634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610e79578360096000828254610e739190612dbc565b90915550505b610ebb338560068881548110610e9f57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316919061273f565b82518254670de0b6b3a7640000919064e8d4a5100090610edc908590612d9d565b610ee69190612d7d565b610ef09190612d9d565b610efa9190612d7d565b600183015564e8d4a51000610f0f8286612d9d565b610f199190612d7d565b60058681548110610f3a57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016003016000828254610f5a9190612dbc565b9091555050604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020015b60405180910390a3505060018055505050565b610faa6126e5565b6001600160a01b038116610ff65760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a590819195d881858d8dbdd5b9d606a1b60448201526064016106e0565b600480546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f9a5d366468a1a31e1bb00d0b902e99244f7f05d635aa42f621df8fc94c11e72b9101610a5a565b6110846040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b600582815481106110a557634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff1615156080820152915043111561138d576060810151608082015160009061111757600b5461111b565b600a545b905060008211801561112d5750600081115b156112c95760008360200151436111449190612dbc565b9050600082856040015161115b8760800151611d05565b6111659085612d9d565b61116f9190612d9d565b6111799190612d7d565b60405163140e25ad60e31b8152600481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a0712d6890602401600060405180830381600087803b1580156111de57600080fd5b505af11580156111f2573d6000803e3d6000fd5b50506004546001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811693506340c10f19925016611237600a85612d7d565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561127d57600080fd5b505af1158015611291573d6000803e3d6000fd5b5050505083670de0b6b3a7640000826112aa9190612d9d565b6112b49190612d7d565b855186906112c3908390612d65565b90525050505b43602084015260058054849190869081106112f457634e487b7160e01b600052603260045260246000fd5b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608085015160038401556080909401516004909201805460ff19169215159290921790915585820151865182519182529281018690529081019190915285917f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46910160405180910390a250505b919050565b600260015414156113b55760405162461bcd60e51b81526004016106e090612d2e565b60026001819055506000600582815481106113e057634e487b7160e01b600052603260045260246000fd5b60009182526020808320858452600782526040808520338087529352842080548582556001820186905560059094029091019450929064e8d4a51000906114279087610631565b6114319084612d9d565b61143b9190612d7d565b90508084600301541161144f57600061145f565b80846003015461145f9190612dbc565b84600301819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600686815481106114b257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031614156114e55781600960008282546114df9190612dbc565b90915550505b61150b338360068881548110610e9f57634e487b7160e01b600052603260045260246000fd5b604051828152859033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059590602001610f8f565b60055460005b818110156115e55760006005828154811061157057634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff16151560808201529150156115d4576115d282611050565b505b506115de81612dff565b9050611545565b5050565b6115f16126e5565b6115fa83611050565b5080156116095761160961153f565b6005838154811061162a57634e487b7160e01b600052603260045260246000fd5b600091825260209091206004600590920201015460ff1615611699576005838154811061166757634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016002015482600a546116879190612d65565b6116919190612dbc565b600a556116e8565b600583815481106116ba57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016002015482600b546116da9190612d65565b6116e49190612dbc565b600b555b816005848154811061170a57634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f88360405161175191815260200190565b60405180910390a2505050565b6117666126e5565b61177060006127a7565b565b6006818154811061178257600080fd5b6000918252602090912001546001600160a01b0316905081565b6117a46126e5565b6001600160a01b0381166117ed5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a590818dbdb9d1c9858dd60821b60448201526064016106e0565b600254604080516001600160a01b03928316815291831660208301527fc5fedeac3ec8504f13b417db560c742ef0f140a992cb6fc5831109a02850a254910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b600260015414156118795760405162461bcd60e51b81526004016106e090612d2e565b6002600155600061188984611050565b60008581526007602090815260408083203384529091529020600254919250906001600160a01b031663a77b9c206118be3390565b6040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529086166024820152604401600060405180830381600087803b15801561190757600080fd5b505af115801561191b573d6000803e3d6000fd5b5050505081608001518061193e57503360009081526008602052604090205460ff165b61197e5760405162461bcd60e51b8152602060048201526011602482015270155b98589b19481d1bc819195c1bdcda5d607a1b60448201526064016106e0565b600061198a3387610631565b82549091501561199f5761199f33878361227a565b8415611c0d576000600687815481106119c857634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611a1457600080fd5b505afa158015611a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a4c9190612bcb565b9050611a9233308860068b81548110611a7557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03169291906127f7565b8060068881548110611ab457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611b0057600080fd5b505afa158015611b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b389190612bcb565b611b429190612dbc565b955085836000016000828254611b589190612d65565b925050819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031660068881548110611baa57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415611bdd578560096000828254611bd79190612d65565b90915550505b64e8d4a51000611bed8388612d9d565b611bf79190612d7d565b84606001818151611c089190612d65565b905250505b82518254670de0b6b3a7640000919064e8d4a5100090611c2e908590612d9d565b611c389190612d7d565b611c429190612d9d565b611c4c9190612d7d565b82600101819055508260058781548110611c7657634e487b7160e01b600052603260045260246000fd5b60009182526020918290208351600592909202019081558282015160018201556040808401516002830155606084015160038301556080909301516004909101805460ff19169115159190911790559051868152879133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a350506001805550505050565b60008115611d3157620186a0600d54600c54611d219190612d9d565b611d2b9190612d7d565b92915050565b620186a0600e54600c54611d219190612d9d565b611d4d6126e5565b6001600160a01b03811615801590611d7357506003546001600160a01b03828116911614155b611db25760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a590818dbdb9d1c9858dd60821b60448201526064016106e0565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b611e046126e5565b6103e861ffff82161115611e495760405162461bcd60e51b815260206004820152600c60248201526b546f6f206d7563682066656560a01b60448201526064016106e0565b600f546040805161ffff928316815291831660208301527faa93efc265d57d12921d0ff827c5c7498fe0db75e9f8b1e0d6723d582c2faecb910160405180910390a1600f805461ffff191661ffff92909216919091179055565b611eab6126e5565b6001600160a01b038216611ef05760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103ab9b2b960a11b60448201526064016106e0565b6001600160a01b038216600081815260086020908152604091829020805460ff191685151590811790915591519182527fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d51910160405180910390a25050565b611f576126e5565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a082319060240160206040518083038186803b158015611f9957600080fd5b505afa158015611fad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd19190612bcb565b10156120135760405162461bcd60e51b81526020600482015260116024820152704e6f6e6520455243323020746f6b656e7360781b60448201526064016106e0565b80156120215761202161153f565b81156120445783600a60008282546120399190612d65565b9091555061205c9050565b83600b60008282546120569190612d65565b90915550505b60068054600180820183557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b0319166001600160a01b0387169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260058054808a0182559481905294517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0949095029384019490945593517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1830155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db282015591517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db3830155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db4909101805460ff191691151591909117905591546121c19190612dbc565b6040805187815285151560208201527f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa910160405180910390a350505050565b6122096126e5565b6001600160a01b03811661226e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106e0565b612277816127a7565b50565b60008281526007602090815260408083206001600160a01b038716845282528083208151606081018352815480825260018301549482019490945260029091015491810191909152919064e8d4a51000906122d6908590612d9d565b6122e09190612d7d565b90506000670de0b6b3a76400006005868154811061230e57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600001548361232b9190612d9d565b6123359190612d7d565b905060008360200151826123499190612dbc565b9050600954816123599190612d65565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156123b857600080fd5b505afa1580156123cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f09190612bcb565b10156124fd576040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a0712d689082906370a082319060240160206040518083038186803b15801561245d57600080fd5b505afa158015612471573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124959190612bcb565b6009546124a29085612d65565b6124ac9190612dbc565b6040518263ffffffff1660e01b81526004016124ca91815260200190565b600060405180830381600087803b1580156124e457600080fd5b505af11580156124f8573d6000803e3d6000fd5b505050505b8015612537576125376001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016888361273f565b600254604051634a9fefc760e01b81526001600160a01b0389811660048301526000921690634a9fefc79060240160206040518083038186803b15801561257d57600080fd5b505afa158015612591573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125b59190612aa6565b90506001600160a01b038116156126db57600f54600090612710906125de9061ffff1685612d9d565b6125e89190612d7d565b905080156126d9576040516340c10f1960e01b81526001600160a01b038381166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b15801561265a57600080fd5b505af115801561266e573d6000803e3d6000fd5b5050600254604051632c83e50360e21b81526001600160a01b038d8116600483015260248201869052909116925063b20f940c9150604401600060405180830381600087803b1580156126c057600080fd5b505af11580156126d4573d6000803e3d6000fd5b505050505b505b5050505050505050565b6000546001600160a01b031633146117705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e0565b6040516001600160a01b0383166024820152604481018290526127a290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612835565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b038085166024830152831660448201526064810182905261282f9085906323b872dd60e01b9060840161276b565b50505050565b600061288a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129079092919063ffffffff16565b8051909150156127a257808060200190518101906128a89190612b75565b6127a25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106e0565b60606129168484600085612920565b90505b9392505050565b6060824710156129815760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106e0565b6001600160a01b0385163b6129d85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106e0565b600080866001600160a01b031685876040516129f49190612cdf565b60006040518083038185875af1925050503d8060008114612a31576040519150601f19603f3d011682016040523d82523d6000602084013e612a36565b606091505b5091509150612a46828286612a51565b979650505050505050565b60608315612a60575081612919565b825115612a705782518084602001fd5b8160405162461bcd60e51b81526004016106e09190612cfb565b600060208284031215612a9b578081fd5b813561066e81612e30565b600060208284031215612ab7578081fd5b815161066e81612e30565b60008060408385031215612ad4578081fd5b8235612adf81612e30565b91506020830135612aef81612e45565b809150509250929050565b60008060408385031215612b0c578182fd5b8235612b1781612e30565b946020939093013593505050565b600080600060608486031215612b39578081fd5b8335612b4481612e30565b95602085013595506040909401359392505050565b600060208284031215612b6a578081fd5b813561066e81612e45565b600060208284031215612b86578081fd5b815161066e81612e45565b600060208284031215612ba2578081fd5b813561ffff8116811461066e578182fd5b600060208284031215612bc4578081fd5b5035919050565b600060208284031215612bdc578081fd5b5051919050565b60008060408385031215612bf5578182fd5b823591506020830135612aef81612e30565b60008060008060808587031215612c1c578081fd5b843593506020850135612c2e81612e30565b92506040850135612c3e81612e45565b91506060850135612c4e81612e45565b939692955090935050565b60008060408385031215612c6b578182fd5b50508035926020909101359150565b600080600060608486031215612c8e578283fd5b83359250602084013591506040840135612ca781612e30565b809150509250925092565b600080600060608486031215612cc6578081fd5b83359250602084013591506040840135612ca781612e45565b60008251612cf1818460208701612dd3565b9190910192915050565b6020815260008251806020840152612d1a816040850160208701612dd3565b601f01601f19169190910160400192915050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115612d7857612d78612e1a565b500190565b600082612d9857634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612db757612db7612e1a565b500290565b600082821015612dce57612dce612e1a565b500390565b60005b83811015612dee578181015183820152602001612dd6565b8381111561282f5750506000910152565b6000600019821415612e1357612e13612e1a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461227757600080fd5b801515811461227757600080fdfea26469706673582212200b994abab0a1162786da48b52b80f2e3b67b6353d32930e8e70dd0ec5b86b7d064736f6c6343000804003300000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c79770000000000000000000000009bd34a0ed30d4b4ab5eb5d73051d8c6deb28008f00000000000000000000000016eda43b0a8007f7a40afe5df20c8a2948f1339b00000000000000000000000000000000000000000000000029a2241af62c0000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102695760003560e01c806375267b3a116101515780639dd2fcc3116100c3578063c507aeaa11610087578063c507aeaa146105d0578063cc6db2da146105e3578063df97d31c146105ef578063dfcedeee14610602578063e63a391f14610615578063f2fde38b1461061e57600080fd5b80639dd2fcc314610567578063a63f5e2a1461057a578063a8d7c1d5146105a1578063ac1d0609146105b4578063c40d337b146105c757600080fd5b80638da5cb5b116101155780638da5cb5b146104c95780638dbdbe6d146104da5780638f040a21146104ed57806393f1a40b146104f6578063955c0e561461054b57806399d7e84a1461055e57600080fd5b806375267b3a1461048857806378ed5d1f146104915780637ba20694146104a45780638ae39cac146104ad5780638c9452bf146104b657600080fd5b80633fc06d55116101ea5780635c3c6b8e116101ae5780635c3c6b8e1461040c578063630b5ba11461042d57806364482f7914610435578063691edfda1461044857806369b0212814610473578063715018a61461048057600080fd5b80633fc06d5514610373578063441a3e701461037c578063483c35a21461038f57806351eb05a6146103a25780635312ea8e146103f957600080fd5b80630e467282116102315780630e467282146102ce5780631526fe27146102e1578063266af8401461031e578063372c12b1146103315780633f4857901461036457600080fd5b8063033186e81461026e578063041a84c914610294578063081e3eda146102a95780630ad83f35146102b15780630ba84cd2146102bb575b600080fd5b61028161027c366004612afa565b610631565b6040519081526020015b60405180910390f35b6102a76102a2366004612b25565b610678565b005b600554610281565b610281620186a081565b6102a76102c9366004612bb3565b610a18565b6102a76102dc366004612cb2565b610a66565b6102f46102ef366004612bb3565b610b27565b6040805195865260208601949094529284019190915260608301521515608082015260a00161028b565b61028161032c366004612be3565b610b6b565b61035461033f366004612a8a565b60086020526000908152604090205460ff1681565b604051901515815260200161028b565b610281670de0b6b3a764000081565b61028160095481565b6102a761038a366004612c59565b610d27565b6102a761039d366004612a8a565b610fa2565b6103b56103b0366004612bb3565b611050565b60405161028b9190600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b6102a7610407366004612bb3565b611392565b600f5461041a9061ffff1681565b60405161ffff909116815260200161028b565b6102a761153f565b6102a7610443366004612cb2565b6115e9565b60045461045b906001600160a01b031681565b6040516001600160a01b03909116815260200161028b565b6102816501d1a94a200081565b6102a761175e565b610281600e5481565b61045b61049f366004612bb3565b611772565b61041a6103e881565b610281600c5481565b6102a76104c4366004612a8a565b61179c565b6000546001600160a01b031661045b565b6102a76104e8366004612c7a565b611856565b610281600d5481565b610530610504366004612be3565b600760209081526000928352604080842090915290825290208054600182015460029092015490919083565b6040805193845260208401929092529082015260600161028b565b610281610559366004612b59565b611d05565b610281600b5481565b6102a7610575366004612a8a565b611d45565b61045b7f00000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c797781565b6102a76105af366004612b91565b611dfc565b6102a76105c2366004612ac2565b611ea3565b610281600a5481565b6102a76105de366004612c07565b611f4f565b61028164e8d4a5100081565b60025461045b906001600160a01b031681565b60035461045b906001600160a01b031681565b61041a61271081565b6102a761062c366004612a8a565b612201565b60008181526007602090815260408083206001600160a01b038616845290915281206002015464e8d4a51000811161066e5764e8d4a51000610670565b805b949350505050565b6003546001600160a01b031633146106e95760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f73746044820152680818dbdb9d1c9858dd60ba1b60648201526084015b60405180910390fd5b6002600154141561070c5760405162461bcd60e51b81526004016106e090612d2e565b60026001556001600160a01b0383166107565760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103ab9b2b960a11b60448201526064016106e0565b6005828154811061077757634e487b7160e01b600052603260045260246000fd5b600091825260209091206004600590920201015460ff166107e55760405162461bcd60e51b815260206004820152602260248201527f4f6e6c7920726567756c6172206661726d20636f756c6420626520626f6f7374604482015261195960f21b60648201526084016106e0565b64e8d4a51000811015801561080057506501d1a94a20008111155b61084c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420626f6f7374206d756c7469706c696572000000000000000060448201526064016106e0565b600061085783611050565b60008481526007602090815260408083206001600160a01b038916845290915281209192506108868686610631565b905061089386868361227a565b82518254670de0b6b3a7640000919064e8d4a51000906108b4908890612d9d565b6108be9190612d7d565b6108c89190612d9d565b6108d29190612d7d565b6001830155815464e8d4a51000906108eb908390612d9d565b6108f59190612d7d565b825464e8d4a5100090610909908790612d9d565b6109139190612d7d565b84606001516109229190612d65565b61092c9190612dbc565b6060840152600580548491908790811061095657634e487b7160e01b600052603260045260246000fd5b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608087015160038601556080909601516004909401805460ff191694151594909417909355898452600782528084206001600160a01b038c1680865290835293819020909201889055815189815290810185905290810187905290917f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba910160405180910390a250506001805550505050565b610a206126e5565b600c80549082905560408051828152602081018490527f16b9091836a63537907593ebc3a80f3528891f3575b10f58ad7dd9c29fd0d44f91015b60405180910390a15050565b610a6e6126e5565b600083118015610a7e5750600082115b8015610a955750620186a0610a938385612d65565b145b610ad15760405162461bcd60e51b815260206004820152600d60248201526c496e76616c696420726174657360981b60448201526064016106e0565b8015610adf57610adf61153f565b600d839055600e82905560408051848152602081018490527fcf8b0b725fc94c51f7a409f0cf061a6e2e94f24c02cd9d5210f25851205f8018910160405180910390a1505050565b60058181548110610b3757600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b60008060058481548110610b8f57634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160a081018252600590940290910180548452600180820154858501908152600280840154878601526003840154606080890191825260049095015460ff16151560808901528c8952600787528589206001600160a01b038d168a528752978590208551948501865280548552928301549584019590955293015491810191909152825193519151929450929143118015610c3657508015155b15610cc4576000846020015143610c4d9190612dbc565b905060008560800151610c6257600b54610c66565b600a545b8660400151610c788860800151611d05565b610c829085612d9d565b610c8c9190612d9d565b610c969190612d7d565b905082610cab670de0b6b3a764000083612d9d565b610cb59190612d7d565b610cbf9085612d65565b935050505b600064e8d4a51000610cd6888a610631565b8551610ce29190612d9d565b610cec9190612d7d565b6020850151909150670de0b6b3a7640000610d078584612d9d565b610d119190612d7d565b610d1b9190612dbc565b98975050505050505050565b60026001541415610d4a5760405162461bcd60e51b81526004016106e090612d2e565b60026001556000610d5a83611050565b60008481526007602090815260408083203384529091529020805491925090831115610dc15760405162461bcd60e51b81526020600482015260166024820152751dda5d1a191c985dce88125b9cdd59999a58da595b9d60521b60448201526064016106e0565b6000610dcd3386610631565b9050610dda33868361227a565b8315610ebb5783826000016000828254610df49190612dbc565b925050819055507f00000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c79776001600160a01b031660068681548110610e4657634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610e79578360096000828254610e739190612dbc565b90915550505b610ebb338560068881548110610e9f57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316919061273f565b82518254670de0b6b3a7640000919064e8d4a5100090610edc908590612d9d565b610ee69190612d7d565b610ef09190612d9d565b610efa9190612d7d565b600183015564e8d4a51000610f0f8286612d9d565b610f199190612d7d565b60058681548110610f3a57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016003016000828254610f5a9190612dbc565b9091555050604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020015b60405180910390a3505060018055505050565b610faa6126e5565b6001600160a01b038116610ff65760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a590819195d881858d8dbdd5b9d606a1b60448201526064016106e0565b600480546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f9a5d366468a1a31e1bb00d0b902e99244f7f05d635aa42f621df8fc94c11e72b9101610a5a565b6110846040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b600582815481106110a557634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff1615156080820152915043111561138d576060810151608082015160009061111757600b5461111b565b600a545b905060008211801561112d5750600081115b156112c95760008360200151436111449190612dbc565b9050600082856040015161115b8760800151611d05565b6111659085612d9d565b61116f9190612d9d565b6111799190612d7d565b60405163140e25ad60e31b8152600481018290529091507f00000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c79776001600160a01b03169063a0712d6890602401600060405180830381600087803b1580156111de57600080fd5b505af11580156111f2573d6000803e3d6000fd5b50506004546001600160a01b037f00000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c7977811693506340c10f19925016611237600a85612d7d565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561127d57600080fd5b505af1158015611291573d6000803e3d6000fd5b5050505083670de0b6b3a7640000826112aa9190612d9d565b6112b49190612d7d565b855186906112c3908390612d65565b90525050505b43602084015260058054849190869081106112f457634e487b7160e01b600052603260045260246000fd5b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608085015160038401556080909401516004909201805460ff19169215159290921790915585820151865182519182529281018690529081019190915285917f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46910160405180910390a250505b919050565b600260015414156113b55760405162461bcd60e51b81526004016106e090612d2e565b60026001819055506000600582815481106113e057634e487b7160e01b600052603260045260246000fd5b60009182526020808320858452600782526040808520338087529352842080548582556001820186905560059094029091019450929064e8d4a51000906114279087610631565b6114319084612d9d565b61143b9190612d7d565b90508084600301541161144f57600061145f565b80846003015461145f9190612dbc565b84600301819055507f00000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c79776001600160a01b0316600686815481106114b257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031614156114e55781600960008282546114df9190612dbc565b90915550505b61150b338360068881548110610e9f57634e487b7160e01b600052603260045260246000fd5b604051828152859033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059590602001610f8f565b60055460005b818110156115e55760006005828154811061157057634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff16151560808201529150156115d4576115d282611050565b505b506115de81612dff565b9050611545565b5050565b6115f16126e5565b6115fa83611050565b5080156116095761160961153f565b6005838154811061162a57634e487b7160e01b600052603260045260246000fd5b600091825260209091206004600590920201015460ff1615611699576005838154811061166757634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016002015482600a546116879190612d65565b6116919190612dbc565b600a556116e8565b600583815481106116ba57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016002015482600b546116da9190612d65565b6116e49190612dbc565b600b555b816005848154811061170a57634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f88360405161175191815260200190565b60405180910390a2505050565b6117666126e5565b61177060006127a7565b565b6006818154811061178257600080fd5b6000918252602090912001546001600160a01b0316905081565b6117a46126e5565b6001600160a01b0381166117ed5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a590818dbdb9d1c9858dd60821b60448201526064016106e0565b600254604080516001600160a01b03928316815291831660208301527fc5fedeac3ec8504f13b417db560c742ef0f140a992cb6fc5831109a02850a254910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b600260015414156118795760405162461bcd60e51b81526004016106e090612d2e565b6002600155600061188984611050565b60008581526007602090815260408083203384529091529020600254919250906001600160a01b031663a77b9c206118be3390565b6040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529086166024820152604401600060405180830381600087803b15801561190757600080fd5b505af115801561191b573d6000803e3d6000fd5b5050505081608001518061193e57503360009081526008602052604090205460ff165b61197e5760405162461bcd60e51b8152602060048201526011602482015270155b98589b19481d1bc819195c1bdcda5d607a1b60448201526064016106e0565b600061198a3387610631565b82549091501561199f5761199f33878361227a565b8415611c0d576000600687815481106119c857634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611a1457600080fd5b505afa158015611a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a4c9190612bcb565b9050611a9233308860068b81548110611a7557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03169291906127f7565b8060068881548110611ab457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611b0057600080fd5b505afa158015611b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b389190612bcb565b611b429190612dbc565b955085836000016000828254611b589190612d65565b925050819055507f00000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c79776001600160a01b031660068881548110611baa57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415611bdd578560096000828254611bd79190612d65565b90915550505b64e8d4a51000611bed8388612d9d565b611bf79190612d7d565b84606001818151611c089190612d65565b905250505b82518254670de0b6b3a7640000919064e8d4a5100090611c2e908590612d9d565b611c389190612d7d565b611c429190612d9d565b611c4c9190612d7d565b82600101819055508260058781548110611c7657634e487b7160e01b600052603260045260246000fd5b60009182526020918290208351600592909202019081558282015160018201556040808401516002830155606084015160038301556080909301516004909101805460ff19169115159190911790559051868152879133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a350506001805550505050565b60008115611d3157620186a0600d54600c54611d219190612d9d565b611d2b9190612d7d565b92915050565b620186a0600e54600c54611d219190612d9d565b611d4d6126e5565b6001600160a01b03811615801590611d7357506003546001600160a01b03828116911614155b611db25760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a590818dbdb9d1c9858dd60821b60448201526064016106e0565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b611e046126e5565b6103e861ffff82161115611e495760405162461bcd60e51b815260206004820152600c60248201526b546f6f206d7563682066656560a01b60448201526064016106e0565b600f546040805161ffff928316815291831660208301527faa93efc265d57d12921d0ff827c5c7498fe0db75e9f8b1e0d6723d582c2faecb910160405180910390a1600f805461ffff191661ffff92909216919091179055565b611eab6126e5565b6001600160a01b038216611ef05760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103ab9b2b960a11b60448201526064016106e0565b6001600160a01b038216600081815260086020908152604091829020805460ff191685151590811790915591519182527fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d51910160405180910390a25050565b611f576126e5565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a082319060240160206040518083038186803b158015611f9957600080fd5b505afa158015611fad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd19190612bcb565b10156120135760405162461bcd60e51b81526020600482015260116024820152704e6f6e6520455243323020746f6b656e7360781b60448201526064016106e0565b80156120215761202161153f565b81156120445783600a60008282546120399190612d65565b9091555061205c9050565b83600b60008282546120569190612d65565b90915550505b60068054600180820183557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b0319166001600160a01b0387169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260058054808a0182559481905294517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0949095029384019490945593517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1830155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db282015591517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db3830155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db4909101805460ff191691151591909117905591546121c19190612dbc565b6040805187815285151560208201527f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa910160405180910390a350505050565b6122096126e5565b6001600160a01b03811661226e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106e0565b612277816127a7565b50565b60008281526007602090815260408083206001600160a01b038716845282528083208151606081018352815480825260018301549482019490945260029091015491810191909152919064e8d4a51000906122d6908590612d9d565b6122e09190612d7d565b90506000670de0b6b3a76400006005868154811061230e57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600001548361232b9190612d9d565b6123359190612d7d565b905060008360200151826123499190612dbc565b9050600954816123599190612d65565b6040516370a0823160e01b81523060048201527f00000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c79776001600160a01b0316906370a082319060240160206040518083038186803b1580156123b857600080fd5b505afa1580156123cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f09190612bcb565b10156124fd576040516370a0823160e01b81523060048201527f00000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c79776001600160a01b03169063a0712d689082906370a082319060240160206040518083038186803b15801561245d57600080fd5b505afa158015612471573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124959190612bcb565b6009546124a29085612d65565b6124ac9190612dbc565b6040518263ffffffff1660e01b81526004016124ca91815260200190565b600060405180830381600087803b1580156124e457600080fd5b505af11580156124f8573d6000803e3d6000fd5b505050505b8015612537576125376001600160a01b037f00000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c797716888361273f565b600254604051634a9fefc760e01b81526001600160a01b0389811660048301526000921690634a9fefc79060240160206040518083038186803b15801561257d57600080fd5b505afa158015612591573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125b59190612aa6565b90506001600160a01b038116156126db57600f54600090612710906125de9061ffff1685612d9d565b6125e89190612d7d565b905080156126d9576040516340c10f1960e01b81526001600160a01b038381166004830152602482018390527f00000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c797716906340c10f1990604401600060405180830381600087803b15801561265a57600080fd5b505af115801561266e573d6000803e3d6000fd5b5050600254604051632c83e50360e21b81526001600160a01b038d8116600483015260248201869052909116925063b20f940c9150604401600060405180830381600087803b1580156126c057600080fd5b505af11580156126d4573d6000803e3d6000fd5b505050505b505b5050505050505050565b6000546001600160a01b031633146117705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e0565b6040516001600160a01b0383166024820152604481018290526127a290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612835565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b038085166024830152831660448201526064810182905261282f9085906323b872dd60e01b9060840161276b565b50505050565b600061288a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129079092919063ffffffff16565b8051909150156127a257808060200190518101906128a89190612b75565b6127a25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106e0565b60606129168484600085612920565b90505b9392505050565b6060824710156129815760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106e0565b6001600160a01b0385163b6129d85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106e0565b600080866001600160a01b031685876040516129f49190612cdf565b60006040518083038185875af1925050503d8060008114612a31576040519150601f19603f3d011682016040523d82523d6000602084013e612a36565b606091505b5091509150612a46828286612a51565b979650505050505050565b60608315612a60575081612919565b825115612a705782518084602001fd5b8160405162461bcd60e51b81526004016106e09190612cfb565b600060208284031215612a9b578081fd5b813561066e81612e30565b600060208284031215612ab7578081fd5b815161066e81612e30565b60008060408385031215612ad4578081fd5b8235612adf81612e30565b91506020830135612aef81612e45565b809150509250929050565b60008060408385031215612b0c578182fd5b8235612b1781612e30565b946020939093013593505050565b600080600060608486031215612b39578081fd5b8335612b4481612e30565b95602085013595506040909401359392505050565b600060208284031215612b6a578081fd5b813561066e81612e45565b600060208284031215612b86578081fd5b815161066e81612e45565b600060208284031215612ba2578081fd5b813561ffff8116811461066e578182fd5b600060208284031215612bc4578081fd5b5035919050565b600060208284031215612bdc578081fd5b5051919050565b60008060408385031215612bf5578182fd5b823591506020830135612aef81612e30565b60008060008060808587031215612c1c578081fd5b843593506020850135612c2e81612e30565b92506040850135612c3e81612e45565b91506060850135612c4e81612e45565b939692955090935050565b60008060408385031215612c6b578182fd5b50508035926020909101359150565b600080600060608486031215612c8e578283fd5b83359250602084013591506040840135612ca781612e30565b809150509250925092565b600080600060608486031215612cc6578081fd5b83359250602084013591506040840135612ca781612e45565b60008251612cf1818460208701612dd3565b9190910192915050565b6020815260008251806020840152612d1a816040850160208701612dd3565b601f01601f19169190910160400192915050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115612d7857612d78612e1a565b500190565b600082612d9857634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612db757612db7612e1a565b500290565b600082821015612dce57612dce612e1a565b500390565b60005b83811015612dee578181015183820152602001612dd6565b8381111561282f5750506000910152565b6000600019821415612e1357612e13612e1a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461227757600080fd5b801515811461227757600080fdfea26469706673582212200b994abab0a1162786da48b52b80f2e3b67b6353d32930e8e70dd0ec5b86b7d064736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c79770000000000000000000000009bd34a0ed30d4b4ab5eb5d73051d8c6deb28008f00000000000000000000000016eda43b0a8007f7a40afe5df20c8a2948f1339b00000000000000000000000000000000000000000000000029a2241af62c0000
-----Decoded View---------------
Arg [0] : _candyToken (address): 0x06C04B0AD236e7Ca3B3189b1d049FE80109C7977
Arg [1] : _refContract (address): 0x9bd34a0eD30d4b4aB5eb5D73051D8c6DeB28008F
Arg [2] : _devAccount (address): 0x16eDA43B0a8007F7A40aFe5DF20c8a2948F1339b
Arg [3] : _rewardPerBlock (uint256): 3000000000000000000
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c7977
Arg [1] : 0000000000000000000000009bd34a0ed30d4b4ab5eb5d73051d8c6deb28008f
Arg [2] : 00000000000000000000000016eda43b0a8007f7a40afe5df20c8a2948f1339b
Arg [3] : 00000000000000000000000000000000000000000000000029a2241af62c0000
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.