More Info
Private Name Tags
ContractCreator
Multi Chain
Multichain Addresses
3 addresses found via
Latest 25 from a total of 111 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Claim | 18552427 | 19 days 19 hrs ago | IN | 0 ETH | 0.0022498 | ||||
Claim | 18269839 | 59 days 8 hrs ago | IN | 0 ETH | 0.00069302 | ||||
Claim | 18238743 | 63 days 16 hrs ago | IN | 0 ETH | 0.00066877 | ||||
Claim | 18238170 | 63 days 18 hrs ago | IN | 0 ETH | 0.00064368 | ||||
Withdraw | 18166345 | 73 days 19 hrs ago | IN | 0 ETH | 0.00106751 | ||||
Withdraw | 18156482 | 75 days 5 hrs ago | IN | 0 ETH | 0.00112778 | ||||
Withdraw | 18152143 | 75 days 20 hrs ago | IN | 0 ETH | 0.0009258 | ||||
Claim | 17275349 | 198 days 21 hrs ago | IN | 0 ETH | 0.00509729 | ||||
Deposit | 17063965 | 228 days 16 hrs ago | IN | 0 ETH | 0.00250401 | ||||
Claim | 17063546 | 228 days 17 hrs ago | IN | 0 ETH | 0.00196133 | ||||
Claim | 17045553 | 231 days 7 hrs ago | IN | 0 ETH | 0.00268732 | ||||
Withdraw | 17045542 | 231 days 7 hrs ago | IN | 0 ETH | 0.00278688 | ||||
Claim | 17026233 | 234 days 3 hrs ago | IN | 0 ETH | 0.00275084 | ||||
Claim | 17017779 | 235 days 7 hrs ago | IN | 0 ETH | 0.00152426 | ||||
Claim | 16992512 | 238 days 21 hrs ago | IN | 0 ETH | 0.00219705 | ||||
Withdraw | 16980554 | 240 days 14 hrs ago | IN | 0 ETH | 0.00301949 | ||||
Deposit | 16979884 | 240 days 16 hrs ago | IN | 0 ETH | 0.00481241 | ||||
Claim | 16979858 | 240 days 17 hrs ago | IN | 0 ETH | 0.00411721 | ||||
Deposit | 16896195 | 252 days 11 hrs ago | IN | 0 ETH | 0.00165671 | ||||
Claim | 16896183 | 252 days 11 hrs ago | IN | 0 ETH | 0.00187995 | ||||
Deposit | 16857878 | 257 days 20 hrs ago | IN | 0 ETH | 0.00129456 | ||||
Claim | 16857844 | 257 days 21 hrs ago | IN | 0 ETH | 0.00133568 | ||||
Deposit | 16828396 | 262 days 22 mins ago | IN | 0 ETH | 0.00356569 | ||||
Claim | 16828381 | 262 days 25 mins ago | IN | 0 ETH | 0.00345006 | ||||
Claim | 16808406 | 264 days 19 hrs ago | IN | 0 ETH | 0.00182659 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
BentMasterChefV2
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../libraries/Errors.sol"; contract BentMasterChefV2 is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; using Address for address; struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens: // 1. The pool's `accRewardPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives the pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } struct PoolInfo { IERC20 lpToken; // Address of LP token contract. uint256 allocPoint; // How many allocation points assigned to this pool. Rewards to distribute per block. uint256 lastRewardBlock; // Last block number that Rewards distribution occurs. uint256 accRewardPerShare; // Accumulated Rewards per share, times 1e36. See below. } // BENT IERC20 public bent; // BENT tokens reward per block. uint256 public rewardPerBlock; // max BENT tokens reward per block. 20M / 4 years uint256 public maxRewardPerBlock; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // user's withdrawable rewards mapping(uint256 => mapping(address => uint256)) private userRewards; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The block number when BENT mining starts. uint256 public startBlock; // Events event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event RewardPaid(address indexed user, uint256 indexed pid, uint256 amount); event EmergencyWithdraw( address indexed user, uint256 indexed pid, uint256 amount ); constructor( IERC20 _bent, uint256 _rewardPerBlock, uint256 _maxRewardPerBlock, uint256 _startBlock ) Ownable() ReentrancyGuard() { bent = _bent; // rewardPerBlock at deployment will be max reward per block maxRewardPerBlock = _maxRewardPerBlock; rewardPerBlock = _rewardPerBlock; startBlock = _startBlock; } function poolLength() external view returns (uint256) { return poolInfo.length; } function updateRewardPerBlock(uint256 _rewardPerBlock) external onlyOwner { require( _rewardPerBlock <= maxRewardPerBlock, Errors.INVALID_REWARD_PER_BLOCK ); massUpdatePools(); rewardPerBlock = _rewardPerBlock; } // Add a new lp to the pool. Can only be called by the owner. // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. function add( uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate ) external onlyOwner { if (_withUpdate) { massUpdatePools(); } uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock; totalAllocPoint = totalAllocPoint + _allocPoint; poolInfo.push( PoolInfo({ lpToken: _lpToken, allocPoint: _allocPoint, lastRewardBlock: lastRewardBlock, accRewardPerShare: 0 }) ); } // Update the given pool's BENT allocation point. Can only be called by the owner. function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) external onlyOwner { if (_withUpdate) { massUpdatePools(); } totalAllocPoint = totalAllocPoint - poolInfo[_pid].allocPoint + _allocPoint; poolInfo[_pid].allocPoint = _allocPoint; } // View function to see pending BENT on frontend. function pendingReward(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accRewardPerShare = pool.accRewardPerShare; uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (block.number > pool.lastRewardBlock && lpSupply != 0) { uint256 bentReward = ((block.number - pool.lastRewardBlock) * rewardPerBlock * pool.allocPoint) / totalAllocPoint; accRewardPerShare += (bentReward * 1e36) / lpSupply; } return userRewards[_pid][_user] + (user.amount * accRewardPerShare) / 1e36 - user.rewardDebt; } // Update reward vairables for all pools. Be careful of gas spending! function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } } // 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 = pool.lpToken.balanceOf(address(this)); if (lpSupply == 0) { pool.lastRewardBlock = block.number; return; } uint256 bentReward = ((block.number - pool.lastRewardBlock) * rewardPerBlock * pool.allocPoint) / totalAllocPoint; pool.accRewardPerShare += (bentReward * 1e36) / lpSupply; pool.lastRewardBlock = block.number; } // Deposit LP tokens to MasterChef for BENT allocation. function deposit(uint256 _pid, uint256 _amount) external nonReentrant { require(_amount > 0, Errors.INVALID_AMOUNT); PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; updatePool(_pid); queueRewards(_pid, msg.sender); pool.lpToken.safeTransferFrom( address(msg.sender), address(this), _amount ); user.amount += _amount; user.rewardDebt = (user.amount * pool.accRewardPerShare) / 1e36; emit Deposit(msg.sender, _pid, _amount); } // Withdraw LP tokens from MasterChef. function withdraw(uint256 _pid, uint256 _amount) external nonReentrant { require(_amount > 0, Errors.INVALID_AMOUNT); PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; require(user.amount >= _amount, Errors.INVALID_AMOUNT); updatePool(_pid); queueRewards(_pid, msg.sender); user.amount -= _amount; user.rewardDebt = (user.amount * pool.accRewardPerShare) / 1e36; pool.lpToken.safeTransfer(address(msg.sender), _amount); emit Withdraw(msg.sender, _pid, _amount); } // Claim Bent from MasterChef function claim(uint256 _pid, address _account) external nonReentrant { updatePool(_pid); queueRewards(_pid, _account); uint256 pending = userRewards[_pid][_account]; require(pending > 0, Errors.NO_PENDING_REWARD); userRewards[_pid][_account] = 0; userInfo[_pid][_account].rewardDebt = (userInfo[_pid][_account].amount * poolInfo[_pid].accRewardPerShare) / (1e36); bent.safeTransfer(_account, pending); emit RewardPaid(_account, _pid, pending); } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) external nonReentrant { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; pool.lpToken.safeTransfer(address(msg.sender), user.amount); user.amount = 0; user.rewardDebt = 0; userRewards[_pid][msg.sender] = 0; emit EmergencyWithdraw(msg.sender, _pid, user.amount); } // Queue rewards - increase pending rewards function queueRewards(uint256 _pid, address _account) internal { UserInfo memory user = userInfo[_pid][_account]; uint256 pending = (user.amount * poolInfo[_pid].accRewardPerShare) / (1e36) - user.rewardDebt; if (pending > 0) { userRewards[_pid][_account] += pending; } } // owner can force withdraw bent tokens function forceWithdrawBent(uint256 _amount) external onlyOwner nonReentrant { bent.safeTransfer(msg.sender, _amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.4; library Errors { string public constant ZERO_ADDRESS = "100"; string public constant ZERO_AMOUNT = "101"; string public constant INVALID_ADDRESS = "102"; string public constant INVALID_AMOUNT = "103"; string public constant NO_PENDING_REWARD = "104"; string public constant INVALID_PID = "105"; string public constant INVALID_POOL_ADDRESS = "106"; string public constant UNAUTHORIZED = "107"; string public constant ALREADY_EXISTS = "108"; string public constant SAME_ALLOCPOINT = "109"; string public constant INVALID_REWARD_PER_BLOCK = "110"; string public constant INSUFFICIENT_REWARDS = "111"; string public constant EXCEED_MAX_HARVESTER_FEE = "112"; string public constant EXCEED_MAX_FEE = "113"; string public constant INVALID_INDEX = "114"; string public constant INVALID_REQUEST = "115"; }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_bent","type":"address"},{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"},{"internalType":"uint256","name":"_maxRewardPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPaid","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":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bent","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_account","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"forceWithdrawBent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxRewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accRewardPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","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":[{"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":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","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":"uint256","name":"_rewardPerBlock","type":"uint256"}],"name":"updateRewardPerBlock","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"}],"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
6080604052600060085534801561001557600080fd5b5060405162001b2638038062001b26833981016040819052610036916100c2565b61003f33610072565b60018055600280546001600160a01b0319166001600160a01b03959095169490941790935560045560035560095561010b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600080608085870312156100d7578384fd5b84516001600160a01b03811681146100ed578485fd5b60208601516040870151606090970151919890975090945092505050565b611a0b806200011b6000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806364482f79116100d857806398969e821161008c578063e2bbb15811610066578063e2bbb15814610332578063f2fde38b14610345578063ffd14bc21461035857600080fd5b806398969e82146102f9578063b3b7f9431461030c578063ddd5e1b21461031f57600080fd5b80638ae39cac116100bd5780638ae39cac146102845780638da5cb5b1461028d57806393f1a40b146102b257600080fd5b806364482f7914610269578063715018a61461027c57600080fd5b8063373302191161013a57806351eb05a61161011457806351eb05a61461023b5780635312ea8e1461024e578063630b5ba11461026157600080fd5b8063373302191461020c578063441a3e701461021f57806348cd4cb11461023257600080fd5b80631526fe271161016b5780631526fe27146101b357806317caf6f1146101f05780631eaaa045146101f957600080fd5b806301f8a97614610187578063081e3eda1461019c575b600080fd5b61019a6101953660046117aa565b610361565b005b6005545b6040519081526020015b60405180910390f35b6101c66101c13660046117aa565b610428565b604080516001600160a01b03909516855260208501939093529183015260608201526080016101aa565b6101a060085481565b61019a610207366004611809565b61046c565b61019a61021a3660046117aa565b6105f6565b61019a61022d36600461184a565b6106c6565b6101a060095481565b61019a6102493660046117aa565b610895565b61019a61025c3660046117aa565b6109ec565b61019a610b18565b61019a61027736600461186b565b610b43565b61019a610c38565b6101a060035481565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101aa565b6102e46102c03660046117da565b60066020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016101aa565b6101a06103073660046117da565b610c9e565b60025461029a906001600160a01b031681565b61019a61032d3660046117da565b610e68565b61019a61034036600461184a565b611060565b61019a610353366004611772565b6111e3565b6101a060045481565b6000546001600160a01b031633146103c05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6004548111156040518060400160405280600381526020017f31313000000000000000000000000000000000000000000000000000000000008152509061041a5760405162461bcd60e51b81526004016103b791906118b4565b50610423610b18565b600355565b6005818154811061043857600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6000546001600160a01b031633146104c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b80156104d4576104d4610b18565b600060095443116104e7576009546104e9565b435b9050836008546104f991906118e7565b600855604080516080810182526001600160a01b0394851681526020810195865290810191825260006060820181815260058054600181018255925291517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06004909202918201805473ffffffffffffffffffffffffffffffffffffffff1916919096161790945593517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1840155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db28301555090517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db390910155565b6000546001600160a01b031633146106505760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b600260015414156106a35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b60026001819055546106bf906001600160a01b031633836112c5565b5060018055565b600260015414156107195760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b600260015560408051808201909152600381526231303360e81b6020820152816107565760405162461bcd60e51b81526004016103b791906118b4565b5060006005838154811061077a57634e487b7160e01b600052603260045260246000fd5b6000918252602080832086845260068252604080852033865283529384902080548551808701909652600386526231303360e81b9386019390935260049093020193509091908411156107e05760405162461bcd60e51b81526004016103b791906118b4565b506107ea84610895565b6107f48433611373565b82816000016000828254610808919061193e565b9091555050600382015481546ec097ce7bc90715b34b9f10000000009161082e9161191f565b61083891906118ff565b60018201558154610853906001600160a01b031633856112c5565b604051838152849033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020015b60405180910390a35050600180555050565b6000600582815481106108b857634e487b7160e01b600052603260045260246000fd5b90600052602060002090600402019050806002015443116108d7575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561091a57600080fd5b505afa15801561092e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095291906117c2565b90508061096457504360029091015550565b60006008548360010154600354856002015443610981919061193e565b61098b919061191f565b610995919061191f565b61099f91906118ff565b9050816109bb826ec097ce7bc90715b34b9f100000000061191f565b6109c591906118ff565b8360030160008282546109d891906118e7565b909155505043600290930192909255505050565b60026001541415610a3f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b6002600181905550600060058281548110610a6a57634e487b7160e01b600052603260045260246000fd5b60009182526020808320858452600682526040808520338087529352909320805460049093029093018054909450610aaf926001600160a01b039190911691906112c5565b6000808255600182018190558381526007602090815260408083203380855292528083208390555185927fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059591610b0791815260200190565b60405180910390a350506001805550565b60055460005b81811015610b3f57610b2f81610895565b610b3881611981565b9050610b1e565b5050565b6000546001600160a01b03163314610b9d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b8015610bab57610bab610b18565b8160058481548110610bcd57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160010154600854610bec919061193e565b610bf691906118e7565b6008819055508160058481548110610c1e57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160010181905550505050565b6000546001600160a01b03163314610c925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b610c9c600061145e565b565b60008060058481548110610cc257634e487b7160e01b600052603260045260246000fd5b600091825260208083208784526006825260408085206001600160a01b038981168752935280852060049485029092016003810154815492516370a0823160e01b8152309681019690965290965091949193919216906370a082319060240160206040518083038186803b158015610d3957600080fd5b505afa158015610d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7191906117c2565b9050836002015443118015610d8557508015155b15610df95760006008548560010154600354876002015443610da7919061193e565b610db1919061191f565b610dbb919061191f565b610dc591906118ff565b905081610de1826ec097ce7bc90715b34b9f100000000061191f565b610deb91906118ff565b610df590846118e7565b9250505b600183015483546ec097ce7bc90715b34b9f100000000090610e1c90859061191f565b610e2691906118ff565b60008981526007602090815260408083206001600160a01b038c168452909152902054610e5391906118e7565b610e5d919061193e565b979650505050505050565b60026001541415610ebb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b6002600155610ec982610895565b610ed38282611373565b60008281526007602090815260408083206001600160a01b0385168452825291829020548251808401909352600383527f3130340000000000000000000000000000000000000000000000000000000000918301919091529081610f4a5760405162461bcd60e51b81526004016103b791906118b4565b5060008381526007602090815260408083206001600160a01b0386168452909152812055600580546ec097ce7bc90715b34b9f1000000000919085908110610fa257634e487b7160e01b600052603260045260246000fd5b60009182526020808320600360049093020191909101548683526006825260408084206001600160a01b0388168552909252912054610fe1919061191f565b610feb91906118ff565b60008481526006602090815260408083206001600160a01b038088168552925290912060010191909155600254611024911683836112c5565b82826001600160a01b03167fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f5183604051610b0791815260200190565b600260015414156110b35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b600260015560408051808201909152600381526231303360e81b6020820152816110f05760405162461bcd60e51b81526004016103b791906118b4565b5060006005838154811061111457634e487b7160e01b600052603260045260246000fd5b6000918252602080832086845260068252604080852033865290925292206004909102909101915061114584610895565b61114f8433611373565b8154611166906001600160a01b03163330866114bb565b8281600001600082825461117a91906118e7565b9091555050600382015481546ec097ce7bc90715b34b9f1000000000916111a09161191f565b6111aa91906118ff565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001610883565b6000546001600160a01b0316331461123d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b6001600160a01b0381166112b95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103b7565b6112c28161145e565b50565b6040516001600160a01b03831660248201526044810182905261136e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261150c565b505050565b60008281526006602090815260408083206001600160a01b038516845282528083208151808301909252805482526001015491810182905260058054919392916ec097ce7bc90715b34b9f10000000009190879081106113e357634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600301548460000151611404919061191f565b61140e91906118ff565b611418919061193e565b905080156114585760008481526007602090815260408083206001600160a01b0387168452909152812080548392906114529084906118e7565b90915550505b50505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526114589085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161130a565b6000611561826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115f19092919063ffffffff16565b80519091501561136e578080602001905181019061157f919061178e565b61136e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103b7565b6060611600848460008561160a565b90505b9392505050565b6060824710156116825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103b7565b843b6116d05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103b7565b600080866001600160a01b031685876040516116ec9190611898565b60006040518083038185875af1925050503d8060008114611729576040519150601f19603f3d011682016040523d82523d6000602084013e61172e565b606091505b5091509150610e5d82828660608315611748575081611603565b8251156117585782518084602001fd5b8160405162461bcd60e51b81526004016103b791906118b4565b600060208284031215611783578081fd5b8135611603816119b2565b60006020828403121561179f578081fd5b8151611603816119c7565b6000602082840312156117bb578081fd5b5035919050565b6000602082840312156117d3578081fd5b5051919050565b600080604083850312156117ec578081fd5b8235915060208301356117fe816119b2565b809150509250929050565b60008060006060848603121561181d578081fd5b83359250602084013561182f816119b2565b9150604084013561183f816119c7565b809150509250925092565b6000806040838503121561185c578182fd5b50508035926020909101359150565b60008060006060848603121561187f578283fd5b8335925060208401359150604084013561183f816119c7565b600082516118aa818460208701611955565b9190910192915050565b60208152600082518060208401526118d3816040850160208701611955565b601f01601f19169190910160400192915050565b600082198211156118fa576118fa61199c565b500190565b60008261191a57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156119395761193961199c565b500290565b6000828210156119505761195061199c565b500390565b60005b83811015611970578181015183820152602001611958565b838111156114585750506000910152565b60006000198214156119955761199561199c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146112c257600080fd5b80151581146112c257600080fdfea2646970667358221220bd28a400838e4035f3a6d622334b459a5878c74eb345e71a0fad06d22f1be67a64736f6c6343000804003300000000000000000000000001597e397605bf280674bf292623460b4204c3750000000000000000000000000000000000000000000000000474a3dd2fd327180000000000000000000000000000000000000000000000001db4446d3ed52a150000000000000000000000000000000000000000000000000000000000fa5dbb
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101825760003560e01c806364482f79116100d857806398969e821161008c578063e2bbb15811610066578063e2bbb15814610332578063f2fde38b14610345578063ffd14bc21461035857600080fd5b806398969e82146102f9578063b3b7f9431461030c578063ddd5e1b21461031f57600080fd5b80638ae39cac116100bd5780638ae39cac146102845780638da5cb5b1461028d57806393f1a40b146102b257600080fd5b806364482f7914610269578063715018a61461027c57600080fd5b8063373302191161013a57806351eb05a61161011457806351eb05a61461023b5780635312ea8e1461024e578063630b5ba11461026157600080fd5b8063373302191461020c578063441a3e701461021f57806348cd4cb11461023257600080fd5b80631526fe271161016b5780631526fe27146101b357806317caf6f1146101f05780631eaaa045146101f957600080fd5b806301f8a97614610187578063081e3eda1461019c575b600080fd5b61019a6101953660046117aa565b610361565b005b6005545b6040519081526020015b60405180910390f35b6101c66101c13660046117aa565b610428565b604080516001600160a01b03909516855260208501939093529183015260608201526080016101aa565b6101a060085481565b61019a610207366004611809565b61046c565b61019a61021a3660046117aa565b6105f6565b61019a61022d36600461184a565b6106c6565b6101a060095481565b61019a6102493660046117aa565b610895565b61019a61025c3660046117aa565b6109ec565b61019a610b18565b61019a61027736600461186b565b610b43565b61019a610c38565b6101a060035481565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101aa565b6102e46102c03660046117da565b60066020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016101aa565b6101a06103073660046117da565b610c9e565b60025461029a906001600160a01b031681565b61019a61032d3660046117da565b610e68565b61019a61034036600461184a565b611060565b61019a610353366004611772565b6111e3565b6101a060045481565b6000546001600160a01b031633146103c05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6004548111156040518060400160405280600381526020017f31313000000000000000000000000000000000000000000000000000000000008152509061041a5760405162461bcd60e51b81526004016103b791906118b4565b50610423610b18565b600355565b6005818154811061043857600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6000546001600160a01b031633146104c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b80156104d4576104d4610b18565b600060095443116104e7576009546104e9565b435b9050836008546104f991906118e7565b600855604080516080810182526001600160a01b0394851681526020810195865290810191825260006060820181815260058054600181018255925291517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06004909202918201805473ffffffffffffffffffffffffffffffffffffffff1916919096161790945593517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1840155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db28301555090517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db390910155565b6000546001600160a01b031633146106505760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b600260015414156106a35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b60026001819055546106bf906001600160a01b031633836112c5565b5060018055565b600260015414156107195760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b600260015560408051808201909152600381526231303360e81b6020820152816107565760405162461bcd60e51b81526004016103b791906118b4565b5060006005838154811061077a57634e487b7160e01b600052603260045260246000fd5b6000918252602080832086845260068252604080852033865283529384902080548551808701909652600386526231303360e81b9386019390935260049093020193509091908411156107e05760405162461bcd60e51b81526004016103b791906118b4565b506107ea84610895565b6107f48433611373565b82816000016000828254610808919061193e565b9091555050600382015481546ec097ce7bc90715b34b9f10000000009161082e9161191f565b61083891906118ff565b60018201558154610853906001600160a01b031633856112c5565b604051838152849033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020015b60405180910390a35050600180555050565b6000600582815481106108b857634e487b7160e01b600052603260045260246000fd5b90600052602060002090600402019050806002015443116108d7575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561091a57600080fd5b505afa15801561092e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095291906117c2565b90508061096457504360029091015550565b60006008548360010154600354856002015443610981919061193e565b61098b919061191f565b610995919061191f565b61099f91906118ff565b9050816109bb826ec097ce7bc90715b34b9f100000000061191f565b6109c591906118ff565b8360030160008282546109d891906118e7565b909155505043600290930192909255505050565b60026001541415610a3f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b6002600181905550600060058281548110610a6a57634e487b7160e01b600052603260045260246000fd5b60009182526020808320858452600682526040808520338087529352909320805460049093029093018054909450610aaf926001600160a01b039190911691906112c5565b6000808255600182018190558381526007602090815260408083203380855292528083208390555185927fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059591610b0791815260200190565b60405180910390a350506001805550565b60055460005b81811015610b3f57610b2f81610895565b610b3881611981565b9050610b1e565b5050565b6000546001600160a01b03163314610b9d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b8015610bab57610bab610b18565b8160058481548110610bcd57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160010154600854610bec919061193e565b610bf691906118e7565b6008819055508160058481548110610c1e57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160010181905550505050565b6000546001600160a01b03163314610c925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b610c9c600061145e565b565b60008060058481548110610cc257634e487b7160e01b600052603260045260246000fd5b600091825260208083208784526006825260408085206001600160a01b038981168752935280852060049485029092016003810154815492516370a0823160e01b8152309681019690965290965091949193919216906370a082319060240160206040518083038186803b158015610d3957600080fd5b505afa158015610d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7191906117c2565b9050836002015443118015610d8557508015155b15610df95760006008548560010154600354876002015443610da7919061193e565b610db1919061191f565b610dbb919061191f565b610dc591906118ff565b905081610de1826ec097ce7bc90715b34b9f100000000061191f565b610deb91906118ff565b610df590846118e7565b9250505b600183015483546ec097ce7bc90715b34b9f100000000090610e1c90859061191f565b610e2691906118ff565b60008981526007602090815260408083206001600160a01b038c168452909152902054610e5391906118e7565b610e5d919061193e565b979650505050505050565b60026001541415610ebb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b6002600155610ec982610895565b610ed38282611373565b60008281526007602090815260408083206001600160a01b0385168452825291829020548251808401909352600383527f3130340000000000000000000000000000000000000000000000000000000000918301919091529081610f4a5760405162461bcd60e51b81526004016103b791906118b4565b5060008381526007602090815260408083206001600160a01b0386168452909152812055600580546ec097ce7bc90715b34b9f1000000000919085908110610fa257634e487b7160e01b600052603260045260246000fd5b60009182526020808320600360049093020191909101548683526006825260408084206001600160a01b0388168552909252912054610fe1919061191f565b610feb91906118ff565b60008481526006602090815260408083206001600160a01b038088168552925290912060010191909155600254611024911683836112c5565b82826001600160a01b03167fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f5183604051610b0791815260200190565b600260015414156110b35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b600260015560408051808201909152600381526231303360e81b6020820152816110f05760405162461bcd60e51b81526004016103b791906118b4565b5060006005838154811061111457634e487b7160e01b600052603260045260246000fd5b6000918252602080832086845260068252604080852033865290925292206004909102909101915061114584610895565b61114f8433611373565b8154611166906001600160a01b03163330866114bb565b8281600001600082825461117a91906118e7565b9091555050600382015481546ec097ce7bc90715b34b9f1000000000916111a09161191f565b6111aa91906118ff565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001610883565b6000546001600160a01b0316331461123d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b6001600160a01b0381166112b95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103b7565b6112c28161145e565b50565b6040516001600160a01b03831660248201526044810182905261136e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261150c565b505050565b60008281526006602090815260408083206001600160a01b038516845282528083208151808301909252805482526001015491810182905260058054919392916ec097ce7bc90715b34b9f10000000009190879081106113e357634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600301548460000151611404919061191f565b61140e91906118ff565b611418919061193e565b905080156114585760008481526007602090815260408083206001600160a01b0387168452909152812080548392906114529084906118e7565b90915550505b50505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526114589085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161130a565b6000611561826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115f19092919063ffffffff16565b80519091501561136e578080602001905181019061157f919061178e565b61136e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103b7565b6060611600848460008561160a565b90505b9392505050565b6060824710156116825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103b7565b843b6116d05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103b7565b600080866001600160a01b031685876040516116ec9190611898565b60006040518083038185875af1925050503d8060008114611729576040519150601f19603f3d011682016040523d82523d6000602084013e61172e565b606091505b5091509150610e5d82828660608315611748575081611603565b8251156117585782518084602001fd5b8160405162461bcd60e51b81526004016103b791906118b4565b600060208284031215611783578081fd5b8135611603816119b2565b60006020828403121561179f578081fd5b8151611603816119c7565b6000602082840312156117bb578081fd5b5035919050565b6000602082840312156117d3578081fd5b5051919050565b600080604083850312156117ec578081fd5b8235915060208301356117fe816119b2565b809150509250929050565b60008060006060848603121561181d578081fd5b83359250602084013561182f816119b2565b9150604084013561183f816119c7565b809150509250925092565b6000806040838503121561185c578182fd5b50508035926020909101359150565b60008060006060848603121561187f578283fd5b8335925060208401359150604084013561183f816119c7565b600082516118aa818460208701611955565b9190910192915050565b60208152600082518060208401526118d3816040850160208701611955565b601f01601f19169190910160400192915050565b600082198211156118fa576118fa61199c565b500190565b60008261191a57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156119395761193961199c565b500290565b6000828210156119505761195061199c565b500390565b60005b83811015611970578181015183820152602001611958565b838111156114585750506000910152565b60006000198214156119955761199561199c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146112c257600080fd5b80151581146112c257600080fdfea2646970667358221220bd28a400838e4035f3a6d622334b459a5878c74eb345e71a0fad06d22f1be67a64736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000001597e397605bf280674bf292623460b4204c3750000000000000000000000000000000000000000000000000474a3dd2fd327180000000000000000000000000000000000000000000000001db4446d3ed52a150000000000000000000000000000000000000000000000000000000000fa5dbb
-----Decoded View---------------
Arg [0] : _bent (address): 0x01597E397605Bf280674Bf292623460b4204C375
Arg [1] : _rewardPerBlock (uint256): 321061643835615000
Arg [2] : _maxRewardPerBlock (uint256): 2140410958904109589
Arg [3] : _startBlock (uint256): 16407995
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000001597e397605bf280674bf292623460b4204c375
Arg [1] : 0000000000000000000000000000000000000000000000000474a3dd2fd32718
Arg [2] : 0000000000000000000000000000000000000000000000001db4446d3ed52a15
Arg [3] : 0000000000000000000000000000000000000000000000000000000000fa5dbb
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.
[ 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.