More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 2,557 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 19589699 | 277 days ago | IN | 0 ETH | 0.00223667 | ||||
Withdraw | 17859777 | 520 days ago | IN | 0 ETH | 0.0012487 | ||||
Withdraw | 16810932 | 668 days ago | IN | 0 ETH | 0.00147925 | ||||
Withdraw | 16651763 | 690 days ago | IN | 0 ETH | 0.00203294 | ||||
Withdraw | 16651754 | 690 days ago | IN | 0 ETH | 0.00240085 | ||||
Withdraw | 16463806 | 716 days ago | IN | 0 ETH | 0.00123227 | ||||
Withdraw | 15946181 | 788 days ago | IN | 0 ETH | 0.00105933 | ||||
Withdraw | 15946174 | 788 days ago | IN | 0 ETH | 0.00104889 | ||||
Withdraw | 15946171 | 788 days ago | IN | 0 ETH | 0.00134895 | ||||
Withdraw | 15341817 | 877 days ago | IN | 0 ETH | 0.00119129 | ||||
Withdraw | 15024448 | 927 days ago | IN | 0 ETH | 0.00303987 | ||||
Withdraw | 14945121 | 941 days ago | IN | 0 ETH | 0.00554323 | ||||
Withdraw | 14945110 | 941 days ago | IN | 0 ETH | 0.00636062 | ||||
Withdraw | 14880891 | 952 days ago | IN | 0 ETH | 0.0030091 | ||||
Withdraw | 14731529 | 976 days ago | IN | 0 ETH | 0.00297482 | ||||
Withdraw | 14397944 | 1028 days ago | IN | 0 ETH | 0.00250317 | ||||
Withdraw | 14390633 | 1029 days ago | IN | 0 ETH | 0.0014873 | ||||
Withdraw | 14306464 | 1043 days ago | IN | 0 ETH | 0.00279253 | ||||
Withdraw | 14284877 | 1046 days ago | IN | 0 ETH | 0.00273749 | ||||
Withdraw | 14188389 | 1061 days ago | IN | 0 ETH | 0.0038499 | ||||
Withdraw | 14175634 | 1063 days ago | IN | 0 ETH | 0.00431551 | ||||
Withdraw | 14165887 | 1064 days ago | IN | 0 ETH | 0.00574543 | ||||
Withdraw | 14127082 | 1070 days ago | IN | 0 ETH | 0.0071294 | ||||
Withdraw | 14126958 | 1070 days ago | IN | 0 ETH | 0.00355308 | ||||
Withdraw | 14041308 | 1084 days ago | IN | 0 ETH | 0.00622064 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
StakingPool
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-05-07 */ // File: SafeMath.sol pragma solidity >=0.4.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, 'SafeMath: addition overflow'); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, 'SafeMath: subtraction overflow'); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, 'SafeMath: multiplication overflow'); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, 'SafeMath: division by zero'); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, 'SafeMath: modulo by zero'); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } function min(uint256 x, uint256 y) internal pure returns (uint256 z) { z = x < y ? x : y; } // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) function sqrt(uint256 y) internal pure returns (uint256 z) { if (y > 3) { z = y; uint256 x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } } } // File: IBEP20.sol pragma solidity >=0.4.0; interface IBEP20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the token name. */ function name() external view returns (string memory); /** * @dev Returns the bep token owner. */ function getOwner() external view returns (address); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address _owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File: Address.sol pragma solidity ^0.6.2; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, 'Address: insufficient balance'); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{value: amount}(''); require(success, 'Address: unable to send value, recipient may have reverted'); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, 'Address: low-level call failed'); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, 'Address: low-level call with value failed'); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, 'Address: insufficient balance for call'); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue( address target, bytes memory data, uint256 weiValue, string memory errorMessage ) private returns (bytes memory) { require(isContract(target), 'Address: call to non-contract'); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{value: weiValue}(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File: SafeBEP20.sol pragma solidity ^0.6.0; /** * @title SafeBEP20 * @dev Wrappers around BEP20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeBEP20 for IBEP20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeBEP20 { using SafeMath for uint256; using Address for address; function safeTransfer( IBEP20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IBEP20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IBEP20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IBEP20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require( (value == 0) || (token.allowance(address(this), spender) == 0), 'SafeBEP20: approve from non-zero to non-zero allowance' ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IBEP20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IBEP20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).sub( value, 'SafeBEP20: decreased allowance below zero' ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IBEP20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, 'SafeBEP20: low-level call failed'); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), 'SafeBEP20: BEP20 operation did not succeed'); } } } // File: Context.sol pragma solidity >=0.4.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 GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor() internal {} function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: Ownable.sol pragma solidity >=0.4.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), 'Ownable: caller is not the owner'); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), 'Ownable: new owner is the zero address'); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: contracts/StakingPool.sol pragma solidity 0.6.12; // import "@nomiclabs/buidler/console.sol"; contract StakingPool is Ownable { using SafeMath for uint256; using SafeBEP20 for IBEP20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. } // Info of each pool. struct PoolInfo { IBEP20 lpToken; // Address of LP token contract. uint256 allocPoint; // How many allocation points assigned to this pool. CAKEs to distribute per block. uint256 lastRewardBlock; // Last block number that CAKEs distribution occurs. uint256 accCakePerShare; // Accumulated CAKEs per share, times 1e12. See below. } // The CAKE TOKEN! IBEP20 public syrup; IBEP20 public rewardToken; // uint256 public maxStaking; // CAKE tokens created per block. uint256 public rewardPerBlock; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping (address => UserInfo) public userInfo; // Total allocation poitns. Must be the sum of all allocation points in all pools. uint256 private totalAllocPoint = 0; // The block number when CAKE mining starts. uint256 public startBlock; // The block number when CAKE mining ends. uint256 public bonusEndBlock; //Total lpTokens staked uint256 public totalStaked = 0; event Deposit(address indexed user, uint256 amount); event Withdraw(address indexed user, uint256 amount); event EmergencyWithdraw(address indexed user, uint256 amount); constructor( IBEP20 _syrup, IBEP20 _rewardToken, uint256 _rewardPerBlock, uint256 _startBlock, uint256 _bonusEndBlock ) public { syrup = _syrup; rewardToken = _rewardToken; rewardPerBlock = _rewardPerBlock; startBlock = _startBlock; bonusEndBlock = _bonusEndBlock; // staking pool poolInfo.push(PoolInfo({ lpToken: _syrup, allocPoint: 1000, lastRewardBlock: startBlock, accCakePerShare: 0 })); totalAllocPoint = 1000; // maxStaking = 50000000000000000000; } function stopReward() public onlyOwner { bonusEndBlock = block.number; } // Return reward multiplier over the given _from to _to block. function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) { if (_to <= bonusEndBlock) { return _to.sub(_from); } else if (_from >= bonusEndBlock) { return 0; } else { return bonusEndBlock.sub(_from); } } // View function to see pending Reward on frontend. function pendingReward(address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[0]; UserInfo storage user = userInfo[_user]; uint256 accCakePerShare = pool.accCakePerShare; uint256 lpSupply = totalStaked; if (block.number > pool.lastRewardBlock && lpSupply != 0) { uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number); uint256 cakeReward = multiplier.mul(rewardPerBlock).mul(pool.allocPoint).div(totalAllocPoint); accCakePerShare = accCakePerShare.add(cakeReward.mul(1e12).div(lpSupply)); } return user.amount.mul(accCakePerShare).div(1e12).sub(user.rewardDebt); } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; if (block.number <= pool.lastRewardBlock) { return; } uint256 lpSupply = totalStaked; if (lpSupply == 0) { pool.lastRewardBlock = block.number; return; } uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number); uint256 cakeReward = multiplier.mul(rewardPerBlock).mul(pool.allocPoint).div(totalAllocPoint); pool.accCakePerShare = pool.accCakePerShare.add(cakeReward.mul(1e12).div(lpSupply)); pool.lastRewardBlock = block.number; } // Update reward variables for all pools. Be careful of gas spending! function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } } // Stake SYRUP tokens to StakingPool function deposit(uint256 _amount) public { PoolInfo storage pool = poolInfo[0]; UserInfo storage user = userInfo[msg.sender]; // require (_amount.add(user.amount) <= maxStaking, 'exceed max stake'); updatePool(0); if (user.amount > 0) { uint256 pending = user.amount.mul(pool.accCakePerShare).div(1e12).sub(user.rewardDebt); if(pending > 0) { rewardToken.safeTransfer(address(msg.sender), pending); } } if(_amount > 0) { pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount); user.amount = user.amount.add(_amount); totalStaked = totalStaked.add(_amount); } user.rewardDebt = user.amount.mul(pool.accCakePerShare).div(1e12); emit Deposit(msg.sender, _amount); } // Withdraw SYRUP tokens from STAKING. function withdraw(uint256 _amount) public { PoolInfo storage pool = poolInfo[0]; UserInfo storage user = userInfo[msg.sender]; require(user.amount >= _amount, "withdraw: not good"); updatePool(0); uint256 pending = user.amount.mul(pool.accCakePerShare).div(1e12).sub(user.rewardDebt); if(pending > 0) { rewardToken.safeTransfer(address(msg.sender), pending); } if(_amount > 0) { user.amount = user.amount.sub(_amount); pool.lpToken.safeTransfer(address(msg.sender), _amount); totalStaked = totalStaked.sub(_amount); } user.rewardDebt = user.amount.mul(pool.accCakePerShare).div(1e12); emit Withdraw(msg.sender, _amount); } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw() public { PoolInfo storage pool = poolInfo[0]; UserInfo storage user = userInfo[msg.sender]; pool.lpToken.safeTransfer(address(msg.sender), user.amount); totalStaked = totalStaked.sub(user.amount); user.amount = 0; user.rewardDebt = 0; emit EmergencyWithdraw(msg.sender, user.amount); } // Withdraw reward. EMERGENCY ONLY. function emergencyRewardWithdraw(uint256 _amount) public onlyOwner { uint256 totalBalance = rewardToken.balanceOf(address(this)); uint256 availableRewards = totalBalance.sub(totalStaked); require(_amount < availableRewards, 'not enough rewards'); rewardToken.safeTransfer(address(msg.sender), _amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IBEP20","name":"_syrup","type":"address"},{"internalType":"contract IBEP20","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_bonusEndBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"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":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"bonusEndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyRewardWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"address","name":"_user","type":"address"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IBEP20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accCakePerShare","type":"uint256"}],"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":[],"name":"rewardToken","outputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stopReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"syrup","outputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000600655600060095534801561001a57600080fd5b50604051611468380380611468833981810160405260a081101561003d57600080fd5b5080516020820151604083015160608401516080909401519293919290919060006100666101d6565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039687166001600160a01b03199182168117835560028054978916978316979097179096556003949094556007839055600891909155604080516080810182529485526103e86020860181815291860193845260006060870181815260048054958601815591829052965193027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b8101805494909816939095169290921790955593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015590517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e909101556006556101da565b3390565b61127f806101e96000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c8063817b1cd2116100ad578063b6b55f2511610071578063b6b55f25146102af578063db2e21bc146102cc578063f2fde38b146102d4578063f40f0f52146102fa578063f7c618c1146103205761012c565b8063817b1cd21461025057806386a952c4146102585780638ae39cac1461027c5780638da5cb5b146102845780638dbb1e3a1461028c5761012c565b806348cd4cb1116100f457806348cd4cb11461021357806351eb05a61461021b578063630b5ba114610238578063715018a61461024057806380dc0672146102485761012c565b80631526fe27146101315780631959a0021461017e5780631aed6553146101bd5780632e1a7d4d146101d75780633279beab146101f6575b600080fd5b61014e6004803603602081101561014757600080fd5b5035610328565b604080516001600160a01b0390951685526020850193909352838301919091526060830152519081900360800190f35b6101a46004803603602081101561019457600080fd5b50356001600160a01b0316610369565b6040805192835260208301919091528051918290030190f35b6101c5610382565b60408051918252519081900360200190f35b6101f4600480360360208110156101ed57600080fd5b5035610388565b005b6101f46004803603602081101561020c57600080fd5b50356104fe565b6101c5610648565b6101f46004803603602081101561023157600080fd5b503561064e565b6101f4610709565b6101f461072c565b6101f46107ce565b6101c561082c565b610260610832565b604080516001600160a01b039092168252519081900360200190f35b6101c5610841565b610260610847565b6101c5600480360360408110156102a257600080fd5b5080359060200135610856565b6101f4600480360360208110156102c557600080fd5b5035610896565b6101f46109bb565b6101f4600480360360208110156102ea57600080fd5b50356001600160a01b0316610a5f565b6101c56004803603602081101561031057600080fd5b50356001600160a01b0316610ac0565b610260610bab565b6004818154811061033557fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6005602052600090815260409020805460019091015482565b60085481565b6000600460008154811061039857fe5b6000918252602080832033845260059091526040909220805460049092029092019250831115610404576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b61040e600061064e565b6000610448826001015461044264e8d4a5100061043c87600301548760000154610bba90919063ffffffff16565b90610c1a565b90610c5c565b9050801561046757600254610467906001600160a01b03163383610c9e565b83156104a25781546104799085610c5c565b82558254610491906001600160a01b03163386610c9e565b60095461049e9085610c5c565b6009555b600383015482546104bd9164e8d4a510009161043c91610bba565b600183015560408051858152905133917f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364919081900360200190a250505050565b610506610cf0565b6000546001600160a01b03908116911614610556576040805162461bcd60e51b8152602060048201819052602482015260008051602061122a833981519152604482015290519081900360640190fd5b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156105a157600080fd5b505afa1580156105b5573d6000803e3d6000fd5b505050506040513d60208110156105cb57600080fd5b50516009549091506000906105e1908390610c5c565b905080831061062c576040805162461bcd60e51b81526020600482015260126024820152716e6f7420656e6f756768207265776172647360701b604482015290519081900360640190fd5b600254610643906001600160a01b03163385610c9e565b505050565b60075481565b60006004828154811061065d57fe5b906000526020600020906004020190508060020154431161067e5750610706565b60095480610693575043600290910155610706565b60006106a3836002015443610856565b905060006106d060065461043c86600101546106ca60035487610bba90919063ffffffff16565b90610bba565b90506106f36106e88461043c8464e8d4a51000610bba565b600386015490610cf4565b6003850155505043600290920191909155505b50565b60045460005b81811015610728576107208161064e565b60010161070f565b5050565b610734610cf0565b6000546001600160a01b03908116911614610784576040805162461bcd60e51b8152602060048201819052602482015260008051602061122a833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6107d6610cf0565b6000546001600160a01b03908116911614610826576040805162461bcd60e51b8152602060048201819052602482015260008051602061122a833981519152604482015290519081900360640190fd5b43600855565b60095481565b6001546001600160a01b031681565b60035481565b6000546001600160a01b031690565b600060085482116108725761086b8284610c5c565b9050610890565b600854831061088357506000610890565b60085461086b9084610c5c565b92915050565b600060046000815481106108a657fe5b600091825260208083203384526005909152604083206004909202019250906108ce9061064e565b805415610924576000610903826001015461044264e8d4a5100061043c87600301548760000154610bba90919063ffffffff16565b9050801561092257600254610922906001600160a01b03163383610c9e565b505b8215610960578154610941906001600160a01b0316333086610d4e565b805461094d9084610cf4565b815560095461095c9084610cf4565b6009555b6003820154815461097b9164e8d4a510009161043c91610bba565b600182015560408051848152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a2505050565b600060046000815481106109cb57fe5b600091825260208083203380855260059092526040909320805460049093029093018054909450610a09926001600160a01b03919091169190610c9e565b8054600954610a1791610c5c565b600955600080825560018201819055604080519182525133917f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695919081900360200190a25050565b610a67610cf0565b6000546001600160a01b03908116911614610ab7576040805162461bcd60e51b8152602060048201819052602482015260008051602061122a833981519152604482015290519081900360640190fd5b61070681610dae565b6000806004600081548110610ad157fe5b600091825260208083206001600160a01b03871684526005909152604090922060036004909202909201908101546009546002830154929450909143118015610b1957508015155b15610b79576000610b2e856002015443610856565b90506000610b5560065461043c88600101546106ca60035487610bba90919063ffffffff16565b9050610b74610b6d8461043c8464e8d4a51000610bba565b8590610cf4565b935050505b610ba1836001015461044264e8d4a5100061043c868860000154610bba90919063ffffffff16565b9695505050505050565b6002546001600160a01b031681565b600082610bc957506000610890565b82820282848281610bd657fe5b0414610c135760405162461bcd60e51b81526004018080602001828103825260218152602001806112096021913960400191505060405180910390fd5b9392505050565b6000610c1383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610e4e565b6000610c1383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ef0565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610643908490610f4a565b3390565b600082820183811015610c13576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610da8908590610f4a565b50505050565b6001600160a01b038116610df35760405162461bcd60e51b81526004018080602001828103825260268152602001806111e36026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008183610eda5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e9f578181015183820152602001610e87565b50505050905090810190601f168015610ecc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610ee657fe5b0495945050505050565b60008184841115610f425760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610e9f578181015183820152602001610e87565b505050900390565b6060610f9f826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610ffb9092919063ffffffff16565b80519091501561064357808060200190516020811015610fbe57600080fd5b50516106435760405162461bcd60e51b815260040180806020018281038252602a8152602001806111b9602a913960400191505060405180910390fd5b606061100a8484600085611012565b949350505050565b606061101d8561117f565b61106e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106110ad5780518252601f19909201916020918201910161108e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461110f576040519150601f19603f3d011682016040523d82523d6000602084013e611114565b606091505b5091509150811561112857915061100a9050565b8051156111385780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610e9f578181015183820152602001610e87565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061100a57505015159291505056fe5361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212201587632032104374d5b1b6ebf2a2584ea35f1291382bb83051989ae850cb979864736f6c634300060c0033000000000000000000000000ea1ea0972fa092dd463f2968f9bb51cc4c981d71000000000000000000000000ea1ea0972fa092dd463f2968f9bb51cc4c981d71000000000000000000000000000000000000000000000000028a2587c9e580000000000000000000000000000000000000000000000000000000000000bd036c0000000000000000000000000000000000000000000000000000000000c623f5
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c8063817b1cd2116100ad578063b6b55f2511610071578063b6b55f25146102af578063db2e21bc146102cc578063f2fde38b146102d4578063f40f0f52146102fa578063f7c618c1146103205761012c565b8063817b1cd21461025057806386a952c4146102585780638ae39cac1461027c5780638da5cb5b146102845780638dbb1e3a1461028c5761012c565b806348cd4cb1116100f457806348cd4cb11461021357806351eb05a61461021b578063630b5ba114610238578063715018a61461024057806380dc0672146102485761012c565b80631526fe27146101315780631959a0021461017e5780631aed6553146101bd5780632e1a7d4d146101d75780633279beab146101f6575b600080fd5b61014e6004803603602081101561014757600080fd5b5035610328565b604080516001600160a01b0390951685526020850193909352838301919091526060830152519081900360800190f35b6101a46004803603602081101561019457600080fd5b50356001600160a01b0316610369565b6040805192835260208301919091528051918290030190f35b6101c5610382565b60408051918252519081900360200190f35b6101f4600480360360208110156101ed57600080fd5b5035610388565b005b6101f46004803603602081101561020c57600080fd5b50356104fe565b6101c5610648565b6101f46004803603602081101561023157600080fd5b503561064e565b6101f4610709565b6101f461072c565b6101f46107ce565b6101c561082c565b610260610832565b604080516001600160a01b039092168252519081900360200190f35b6101c5610841565b610260610847565b6101c5600480360360408110156102a257600080fd5b5080359060200135610856565b6101f4600480360360208110156102c557600080fd5b5035610896565b6101f46109bb565b6101f4600480360360208110156102ea57600080fd5b50356001600160a01b0316610a5f565b6101c56004803603602081101561031057600080fd5b50356001600160a01b0316610ac0565b610260610bab565b6004818154811061033557fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6005602052600090815260409020805460019091015482565b60085481565b6000600460008154811061039857fe5b6000918252602080832033845260059091526040909220805460049092029092019250831115610404576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b61040e600061064e565b6000610448826001015461044264e8d4a5100061043c87600301548760000154610bba90919063ffffffff16565b90610c1a565b90610c5c565b9050801561046757600254610467906001600160a01b03163383610c9e565b83156104a25781546104799085610c5c565b82558254610491906001600160a01b03163386610c9e565b60095461049e9085610c5c565b6009555b600383015482546104bd9164e8d4a510009161043c91610bba565b600183015560408051858152905133917f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364919081900360200190a250505050565b610506610cf0565b6000546001600160a01b03908116911614610556576040805162461bcd60e51b8152602060048201819052602482015260008051602061122a833981519152604482015290519081900360640190fd5b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156105a157600080fd5b505afa1580156105b5573d6000803e3d6000fd5b505050506040513d60208110156105cb57600080fd5b50516009549091506000906105e1908390610c5c565b905080831061062c576040805162461bcd60e51b81526020600482015260126024820152716e6f7420656e6f756768207265776172647360701b604482015290519081900360640190fd5b600254610643906001600160a01b03163385610c9e565b505050565b60075481565b60006004828154811061065d57fe5b906000526020600020906004020190508060020154431161067e5750610706565b60095480610693575043600290910155610706565b60006106a3836002015443610856565b905060006106d060065461043c86600101546106ca60035487610bba90919063ffffffff16565b90610bba565b90506106f36106e88461043c8464e8d4a51000610bba565b600386015490610cf4565b6003850155505043600290920191909155505b50565b60045460005b81811015610728576107208161064e565b60010161070f565b5050565b610734610cf0565b6000546001600160a01b03908116911614610784576040805162461bcd60e51b8152602060048201819052602482015260008051602061122a833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6107d6610cf0565b6000546001600160a01b03908116911614610826576040805162461bcd60e51b8152602060048201819052602482015260008051602061122a833981519152604482015290519081900360640190fd5b43600855565b60095481565b6001546001600160a01b031681565b60035481565b6000546001600160a01b031690565b600060085482116108725761086b8284610c5c565b9050610890565b600854831061088357506000610890565b60085461086b9084610c5c565b92915050565b600060046000815481106108a657fe5b600091825260208083203384526005909152604083206004909202019250906108ce9061064e565b805415610924576000610903826001015461044264e8d4a5100061043c87600301548760000154610bba90919063ffffffff16565b9050801561092257600254610922906001600160a01b03163383610c9e565b505b8215610960578154610941906001600160a01b0316333086610d4e565b805461094d9084610cf4565b815560095461095c9084610cf4565b6009555b6003820154815461097b9164e8d4a510009161043c91610bba565b600182015560408051848152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a2505050565b600060046000815481106109cb57fe5b600091825260208083203380855260059092526040909320805460049093029093018054909450610a09926001600160a01b03919091169190610c9e565b8054600954610a1791610c5c565b600955600080825560018201819055604080519182525133917f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695919081900360200190a25050565b610a67610cf0565b6000546001600160a01b03908116911614610ab7576040805162461bcd60e51b8152602060048201819052602482015260008051602061122a833981519152604482015290519081900360640190fd5b61070681610dae565b6000806004600081548110610ad157fe5b600091825260208083206001600160a01b03871684526005909152604090922060036004909202909201908101546009546002830154929450909143118015610b1957508015155b15610b79576000610b2e856002015443610856565b90506000610b5560065461043c88600101546106ca60035487610bba90919063ffffffff16565b9050610b74610b6d8461043c8464e8d4a51000610bba565b8590610cf4565b935050505b610ba1836001015461044264e8d4a5100061043c868860000154610bba90919063ffffffff16565b9695505050505050565b6002546001600160a01b031681565b600082610bc957506000610890565b82820282848281610bd657fe5b0414610c135760405162461bcd60e51b81526004018080602001828103825260218152602001806112096021913960400191505060405180910390fd5b9392505050565b6000610c1383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610e4e565b6000610c1383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ef0565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610643908490610f4a565b3390565b600082820183811015610c13576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610da8908590610f4a565b50505050565b6001600160a01b038116610df35760405162461bcd60e51b81526004018080602001828103825260268152602001806111e36026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008183610eda5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e9f578181015183820152602001610e87565b50505050905090810190601f168015610ecc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610ee657fe5b0495945050505050565b60008184841115610f425760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610e9f578181015183820152602001610e87565b505050900390565b6060610f9f826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610ffb9092919063ffffffff16565b80519091501561064357808060200190516020811015610fbe57600080fd5b50516106435760405162461bcd60e51b815260040180806020018281038252602a8152602001806111b9602a913960400191505060405180910390fd5b606061100a8484600085611012565b949350505050565b606061101d8561117f565b61106e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106110ad5780518252601f19909201916020918201910161108e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461110f576040519150601f19603f3d011682016040523d82523d6000602084013e611114565b606091505b5091509150811561112857915061100a9050565b8051156111385780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610e9f578181015183820152602001610e87565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061100a57505015159291505056fe5361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212201587632032104374d5b1b6ebf2a2584ea35f1291382bb83051989ae850cb979864736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ea1ea0972fa092dd463f2968f9bb51cc4c981d71000000000000000000000000ea1ea0972fa092dd463f2968f9bb51cc4c981d71000000000000000000000000000000000000000000000000028a2587c9e580000000000000000000000000000000000000000000000000000000000000bd036c0000000000000000000000000000000000000000000000000000000000c623f5
-----Decoded View---------------
Arg [0] : _syrup (address): 0xEA1ea0972fa092dd463f2968F9bB51Cc4c981D71
Arg [1] : _rewardToken (address): 0xEA1ea0972fa092dd463f2968F9bB51Cc4c981D71
Arg [2] : _rewardPerBlock (uint256): 183000000000000000
Arg [3] : _startBlock (uint256): 12387180
Arg [4] : _bonusEndBlock (uint256): 12985333
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000ea1ea0972fa092dd463f2968f9bb51cc4c981d71
Arg [1] : 000000000000000000000000ea1ea0972fa092dd463f2968f9bb51cc4c981d71
Arg [2] : 000000000000000000000000000000000000000000000000028a2587c9e58000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000bd036c
Arg [4] : 0000000000000000000000000000000000000000000000000000000000c623f5
Deployed Bytecode Sourcemap
23212:7184:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24168:26;;;;;;;;;;;;;;;;-1:-1:-1;24168:26:0;;:::i;:::-;;;;-1:-1:-1;;;;;24168:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24250:45;;;;;;;;;;;;;;;;-1:-1:-1;24250:45:0;-1:-1:-1;;;;;24250:45:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;24562:28;;;:::i;:::-;;;;;;;;;;;;;;;;28753:780;;;;;;;;;;;;;;;;-1:-1:-1;28753:780:0;;:::i;:::-;;30035:356;;;;;;;;;;;;;;;;-1:-1:-1;30035:356:0;;:::i;24482:25::-;;;:::i;26847:661::-;;;;;;;;;;;;;;;;-1:-1:-1;26847:661:0;;:::i;27591:180::-;;;:::i;22344:140::-;;;:::i;25522:86::-;;;:::i;24628:30::-;;;:::i;23967:19::-;;;:::i;:::-;;;;-1:-1:-1;;;;;23967:19:0;;;;;;;;;;;;;;24103:29;;;:::i;21702:79::-;;;:::i;25686:306::-;;;;;;;;;;;;;;;;-1:-1:-1;25686:306:0;;;;;;;:::i;27823:878::-;;;;;;;;;;;;;;;;-1:-1:-1;27823:878:0;;:::i;29604:382::-;;;:::i;22639:109::-;;;;;;;;;;;;;;;;-1:-1:-1;22639:109:0;-1:-1:-1;;;;;22639:109:0;;:::i;26057:714::-;;;;;;;;;;;;;;;;-1:-1:-1;26057:714:0;-1:-1:-1;;;;;26057:714:0;;:::i;23993:25::-;;;:::i;24168:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;24168:26:0;;;;-1:-1:-1;24168:26:0;;;:::o;24250:45::-;;;;;;;;;;;;;;;;;;;:::o;24562:28::-;;;;:::o;28753:780::-;28806:21;28830:8;28839:1;28830:11;;;;;;;;;;;;;;;;28885:10;28876:20;;:8;:20;;;;;;;28915:11;;28830;;;;;;;;-1:-1:-1;28915:22:0;-1:-1:-1;28915:22:0;28907:53;;;;;-1:-1:-1;;;28907:53:0;;;;;;;;;;;;-1:-1:-1;;;28907:53:0;;;;;;;;;;;;;;;28971:13;28982:1;28971:10;:13::i;:::-;28995:15;29013:68;29065:4;:15;;;29013:47;29055:4;29013:37;29029:4;:20;;;29013:4;:11;;;:15;;:37;;;;:::i;:::-;:41;;:47::i;:::-;:51;;:68::i;:::-;28995:86;-1:-1:-1;29095:11:0;;29092:97;;29123:11;;:54;;-1:-1:-1;;;;;29123:11:0;29156:10;29169:7;29123:24;:54::i;:::-;29202:11;;29199:204;;29244:11;;:24;;29260:7;29244:15;:24::i;:::-;29230:38;;29283:12;;:55;;-1:-1:-1;;;;;29283:12:0;29317:10;29330:7;29283:25;:55::i;:::-;29367:11;;:24;;29383:7;29367:15;:24::i;:::-;29353:11;:38;29199:204;29447:20;;;;29431:11;;:47;;29473:4;;29431:37;;:15;:37::i;:47::-;29413:15;;;:65;29496:29;;;;;;;;29505:10;;29496:29;;;;;;;;;;28753:780;;;;:::o;30035:356::-;21924:12;:10;:12::i;:::-;21914:6;;-1:-1:-1;;;;;21914:6:0;;;:22;;;21906:67;;;;;-1:-1:-1;;;21906:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21906:67:0;;;;;;;;;;;;;;;30136:11:::1;::::0;:36:::1;::::0;;-1:-1:-1;;;30136:36:0;;30166:4:::1;30136:36;::::0;::::1;::::0;;;30113:20:::1;::::0;-1:-1:-1;;;;;30136:11:0::1;::::0;:21:::1;::::0;:36;;;;;::::1;::::0;;;;;;;;:11;:36;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;30136:36:0;30227:11:::1;::::0;30136:36;;-1:-1:-1;30183:24:0::1;::::0;30210:29:::1;::::0;30136:36;;30210:16:::1;:29::i;:::-;30183:56;;30279:16;30269:7;:26;30261:57;;;::::0;;-1:-1:-1;;;30261:57:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;30261:57:0;;;;;;;;;;;;;::::1;;30329:11;::::0;:54:::1;::::0;-1:-1:-1;;;;;30329:11:0::1;30362:10;30375:7:::0;30329:24:::1;:54::i;:::-;21984:1;;30035:356:::0;:::o;24482:25::-;;;;:::o;26847:661::-;26899:21;26923:8;26932:4;26923:14;;;;;;;;;;;;;;;;;;26899:38;;26968:4;:20;;;26952:12;:36;26948:75;;27005:7;;;26948:75;27052:11;;27078:13;27074:102;;-1:-1:-1;27131:12:0;27108:20;;;;:35;27158:7;;27074:102;27186:18;27207:49;27221:4;:20;;;27243:12;27207:13;:49::i;:::-;27186:70;;27267:18;27288:72;27344:15;;27288:51;27323:4;:15;;;27288:30;27303:14;;27288:10;:14;;:30;;;;:::i;:::-;:34;;:51::i;:72::-;27267:93;-1:-1:-1;27394:60:0;27419:34;27444:8;27419:20;27267:93;27434:4;27419:14;:20::i;:34::-;27394:20;;;;;:24;:60::i;:::-;27371:20;;;:83;-1:-1:-1;;27488:12:0;27465:20;;;;:35;;;;-1:-1:-1;26847:661:0;;:::o;27591:180::-;27653:8;:15;27636:14;27679:85;27707:6;27701:3;:12;27679:85;;;27737:15;27748:3;27737:10;:15::i;:::-;27715:5;;27679:85;;;;27591:180;:::o;22344:140::-;21924:12;:10;:12::i;:::-;21914:6;;-1:-1:-1;;;;;21914:6:0;;;:22;;;21906:67;;;;;-1:-1:-1;;;21906:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21906:67:0;;;;;;;;;;;;;;;22443:1:::1;22427:6:::0;;22406:40:::1;::::0;-1:-1:-1;;;;;22427:6:0;;::::1;::::0;22406:40:::1;::::0;22443:1;;22406:40:::1;22474:1;22457:19:::0;;-1:-1:-1;;;;;;22457:19:0::1;::::0;;22344:140::o;25522:86::-;21924:12;:10;:12::i;:::-;21914:6;;-1:-1:-1;;;;;21914:6:0;;;:22;;;21906:67;;;;;-1:-1:-1;;;21906:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21906:67:0;;;;;;;;;;;;;;;25588:12:::1;25572:13;:28:::0;25522:86::o;24628:30::-;;;;:::o;23967:19::-;;;-1:-1:-1;;;;;23967:19:0;;:::o;24103:29::-;;;;:::o;21702:79::-;21740:7;21767:6;-1:-1:-1;;;;;21767:6:0;21702:79;:::o;25686:306::-;25758:7;25789:13;;25782:3;:20;25778:207;;25826:14;:3;25834:5;25826:7;:14::i;:::-;25819:21;;;;25778:207;25871:13;;25862:5;:22;25858:127;;-1:-1:-1;25908:1:0;25901:8;;25858:127;25949:13;;:24;;25967:5;25949:17;:24::i;25858:127::-;25686:306;;;;:::o;27823:878::-;27875:21;27899:8;27908:1;27899:11;;;;;;;;;;;;;;;;27954:10;27945:20;;:8;:20;;;;;;27899:11;;;;;;-1:-1:-1;27945:20:0;28062:13;;:10;:13::i;:::-;28090:11;;:15;28086:253;;28122:15;28140:68;28192:4;:15;;;28140:47;28182:4;28140:37;28156:4;:20;;;28140:4;:11;;;:15;;:37;;;;:::i;:68::-;28122:86;-1:-1:-1;28226:11:0;;28223:105;;28258:11;;:54;;-1:-1:-1;;;;;28258:11:0;28291:10;28304:7;28258:24;:54::i;:::-;28086:253;;28352:11;;28349:223;;28380:12;;:74;;-1:-1:-1;;;;;28380:12:0;28418:10;28439:4;28446:7;28380:29;:74::i;:::-;28483:11;;:24;;28499:7;28483:15;:24::i;:::-;28469:38;;28536:11;;:24;;28552:7;28536:15;:24::i;:::-;28522:11;:38;28349:223;28616:20;;;;28600:11;;:47;;28642:4;;28600:37;;:15;:37::i;:47::-;28582:15;;;:65;28665:28;;;;;;;;28673:10;;28665:28;;;;;;;;;;27823:878;;;:::o;29604:382::-;29651:21;29675:8;29684:1;29675:11;;;;;;;;;;;;;;;;29730:10;29721:20;;;:8;:20;;;;;;;29799:11;;29675;;;;;;;29752:12;;29675:11;;-1:-1:-1;29752:59:0;;-1:-1:-1;;;;;29752:12:0;;;;;29730:10;29752:25;:59::i;:::-;29852:11;;29836;;:28;;:15;:28::i;:::-;29822:11;:42;29889:1;29875:15;;;29901;;;:19;;;29936:42;;;;;;;29954:10;;29936:42;;;;;;;;;;29604:382;;:::o;22639:109::-;21924:12;:10;:12::i;:::-;21914:6;;-1:-1:-1;;;;;21914:6:0;;;:22;;;21906:67;;;;;-1:-1:-1;;;21906:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21906:67:0;;;;;;;;;;;;;;;22712:28:::1;22731:8;22712:18;:28::i;26057:714::-:0;26118:7;26138:21;26162:8;26171:1;26162:11;;;;;;;;;;;;;;;;-1:-1:-1;;;;;26208:15:0;;;;:8;:15;;;;;;;26260:20;26162:11;;;;;;;26260:20;;;;26310:11;;26351:20;;;;26162:11;;-1:-1:-1;26260:20:0;;26336:12;:35;:52;;;;-1:-1:-1;26375:13:0;;;26336:52;26332:351;;;26405:18;26426:49;26440:4;:20;;;26462:12;26426:13;:49::i;:::-;26405:70;;26490:18;26511:72;26567:15;;26511:51;26546:4;:15;;;26511:30;26526:14;;26511:10;:14;;:30;;;;:::i;:72::-;26490:93;-1:-1:-1;26616:55:0;26636:34;26661:8;26636:20;26490:93;26651:4;26636:14;:20::i;:34::-;26616:15;;:19;:55::i;:::-;26598:73;;26332:351;;;26700:63;26747:4;:15;;;26700:42;26737:4;26700:32;26716:15;26700:4;:11;;;:15;;:32;;;;:::i;:63::-;26693:70;26057:714;-1:-1:-1;;;;;;26057:714:0:o;23993:25::-;;;-1:-1:-1;;;;;23993:25:0;;:::o;2283:471::-;2341:7;2586:6;2582:47;;-1:-1:-1;2616:1:0;2609:8;;2582:47;2653:5;;;2657:1;2653;:5;:1;2677:5;;;;;:10;2669:56;;;;-1:-1:-1;;;2669:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2745:1;2283:471;-1:-1:-1;;;2283:471:0:o;3230:132::-;3288:7;3315:39;3319:1;3322;3315:39;;;;;;;;;;;;;;;;;:3;:39::i;1359:136::-;1417:7;1444:43;1448:1;1451;1444:43;;;;;;;;;;;;;;;;;:3;:43::i;16208:211::-;16352:58;;;-1:-1:-1;;;;;16352:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16352:58:0;-1:-1:-1;;;16352:58:0;;;16325:86;;16345:5;;16325:19;:86::i;20301:98::-;20381:10;20301:98;:::o;895:181::-;953:7;985:5;;;1009:6;;;;1001:46;;;;;-1:-1:-1;;;1001:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;16427:248;16598:68;;;-1:-1:-1;;;;;16598:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16598:68:0;-1:-1:-1;;;16598:68:0;;;16571:96;;16591:5;;16571:19;:96::i;:::-;16427:248;;;;:::o;22854:229::-;-1:-1:-1;;;;;22928:22:0;;22920:73;;;;-1:-1:-1;;;22920:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23030:6;;;23009:38;;-1:-1:-1;;;;;23009:38:0;;;;23030:6;;;23009:38;;;23058:6;:17;;-1:-1:-1;;;;;;23058:17:0;-1:-1:-1;;;;;23058:17:0;;;;;;;;;;22854:229::o;3858:312::-;3978:7;4013:12;4006:5;3998:28;;;;-1:-1:-1;;;3998:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4037:9;4053:1;4049;:5;;;;;;;3858:312;-1:-1:-1;;;;;3858:312:0:o;1798:226::-;1918:7;1954:12;1946:6;;;;1938:29;;;;-1:-1:-1;;;1938:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1990:5:0;;;1798:226::o;18743:774::-;19167:23;19193:69;19221:4;19193:69;;;;;;;;;;;;;;;;;19201:5;-1:-1:-1;;;;;19193:27:0;;;:69;;;;;:::i;:::-;19277:17;;19167:95;;-1:-1:-1;19277:21:0;19273:237;;19432:10;19421:30;;;;;;;;;;;;;;;-1:-1:-1;19421:30:0;19413:85;;;;-1:-1:-1;;;19413:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13073:230;13210:12;13242:53;13265:6;13273:4;13279:1;13282:12;13242:22;:53::i;:::-;13235:60;13073:230;-1:-1:-1;;;;13073:230:0:o;14561:1020::-;14734:12;14767:18;14778:6;14767:10;:18::i;:::-;14759:60;;;;;-1:-1:-1;;;14759:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;14893:12;14907:23;14934:6;-1:-1:-1;;;;;14934:11:0;14953:8;14963:4;14934:34;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;14934:34:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14892:76;;;;14983:7;14979:595;;;15014:10;-1:-1:-1;15007:17:0;;-1:-1:-1;15007:17:0;14979:595;15128:17;;:21;15124:439;;15391:10;15385:17;15452:15;15439:10;15435:2;15431:19;15424:44;15339:148;15527:20;;-1:-1:-1;;;15527:20:0;;;;;;;;;;;;;;;;;15534:12;;15527:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9936:641;9996:4;10477:20;;10307:66;10526:23;;;;;;:42;;-1:-1:-1;;10553:15:0;;;10518:51;-1:-1:-1;;9936:641:0:o
Swarm Source
ipfs://1587632032104374d5b1b6ebf2a2584ea35f1291382bb83051989ae850cb9798
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.003901 | 97,362.2224 | $379.79 |
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.