More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 2,370 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit | 10138591 | 20 secs ago | IN | 0 S | 0.0063822 | ||||
Deposit | 10138516 | 47 secs ago | IN | 0 S | 0.00671496 | ||||
Deposit | 10138484 | 1 mins ago | IN | 0 S | 0.00769455 | ||||
Deposit | 10138479 | 1 min ago | IN | 0 S | 0.0042235 | ||||
Deposit | 10138470 | 1 min ago | IN | 0 S | 0.00512968 | ||||
Deposit | 10138450 | 1 min ago | IN | 0 S | 0.00649445 | ||||
Deposit | 10138447 | 1 min ago | IN | 0 S | 0.00701908 | ||||
Deposit | 10138416 | 1 min ago | IN | 0 S | 0.00687138 | ||||
Withdraw | 10138357 | 1 min ago | IN | 0 S | 0.01836444 | ||||
Deposit | 10138344 | 1 min ago | IN | 0 S | 0.00809389 | ||||
Deposit | 10138336 | 1 min ago | IN | 0 S | 0.00489263 | ||||
Deposit | 10138327 | 1 min ago | IN | 0 S | 0.00678771 | ||||
Deposit | 10138299 | 2 mins ago | IN | 0 S | 0.00733529 | ||||
Deposit | 10138283 | 2 mins ago | IN | 0 S | 0.0054313 | ||||
Deposit | 10138216 | 2 mins ago | IN | 0 S | 0.00597606 | ||||
Deposit | 10138196 | 2 mins ago | IN | 0 S | 0.00512968 | ||||
Deposit | 10138163 | 2 mins ago | IN | 0 S | 0.00514129 | ||||
Withdraw | 10138079 | 3 mins ago | IN | 0 S | 0.00332233 | ||||
Deposit | 10138048 | 3 mins ago | IN | 0 S | 0.0071415 | ||||
Deposit | 10138005 | 3 mins ago | IN | 0 S | 0.00567589 | ||||
Deposit | 10137971 | 3 mins ago | IN | 0 S | 0.00540027 | ||||
Deposit | 10137937 | 4 mins ago | IN | 0 S | 0.0044486 | ||||
Withdraw | 10137884 | 4 mins ago | IN | 0 S | 0.00504001 | ||||
Deposit | 10137795 | 4 mins ago | IN | 0 S | 0.00515663 | ||||
Deposit | 10137789 | 4 mins ago | IN | 0 S | 0.00540125 |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
HogGenesisRewardPool
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 /* @@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@JG@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@# &@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@& ^@5J@@@@@@@@&5G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@J #G J&@@&B?^7&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@&BGPPY^ 5@ 7#@&@@@@@@@@@@@&P5&@@@@@P5&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@P^~@@@@@@@@@@@@@@@@@@@P~::Y@@@@@@@@B5JJYG&@@@@@@@@@@@@@@@@@@@@&^^#@ @&#GY??JPG5?~...~&@G. .~5GJ7B@@@@@@@@@@@@G 5@@@@B Y@@@&###&@@@@&&&@&##@@@@@@@&##@? &@@@@@@@@&###@@@@@J JP&@@@@@&! :~!~. Y@@@@&###&@@@@@@&##&G G@ @@@@@@#J. :7#@@@@@@@@@P: .@@@@@@@@@@@@@@B 7BGGBJ 5@@!.^^: .G@@~ ... ^@@@7 .:. &@@@@@@P: .:. :G@~ ::#@@@@@. .&@@@@@&@@@P: .:. :P@@Y. .:.. G@ @@@@@@@@@Y .@@@@@@@@G .&@@@@@@@@@@@@@B .::::. 5@@#5YYY. @@~ #@@B J@! #@@@~ &@@@@@G 5@@@5 G@? &@@@@@@& 7@@@@@5.~@G 5@@@5 BG P@@@Y G@ @@@@@@@@@P !&@@@@@@@@@P~. ^P&@@@@@@@@@@B 5@@@@B Y@5 YBG. @@~ .@@@& ?@J P@@&: &@@@@@B ?@@@7 #@? &@@@@@@@7 ?#@@@^ @B ?@@@7 #B ?@@&7 G@ @@@@@@@&57PG?: ~@@P...:!YPG5J?J5B&@@@@@@B P@@@@# P@&^.:~!^ .@@! :@@@&. Y@@P: ..:: .&@@@@@@#!.....!#@@Y .&@@@@@@@@#!. ....^Y@@#!.....!#@@B^ ...^. B@ @@@@@@&&&P: !@. 75PGG#@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&@@@@@@@@@@@@@@@@@@@@@&@@@@@@@@@@@@@@@@&@@@@@@@@@@@@@@@@@@@@@@&&@@@@@@@@@@&@@@@@@@@@@&@@@@@@ @@@@@@@G^~P&@@@#: @~ &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@&PG@@@@@@@@@^@# ^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@#@@J.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@7&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ To bootstrap the initial supply of $HOG, we are running a Genesis pool for 7 days starting at 25/02/2025, 23:00 GMT+0000. */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "../interfaces/IBasisAsset.sol"; contract HogGenesisRewardPool is ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; // governance address public operator; // 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 { IERC20 token; // Address of LP token contract. uint256 depFee; // deposit fee that is applied to created pool. uint256 allocPoint; // How many allocation points assigned to this pool. HOGs to distribute per block. uint256 lastRewardTime; // Last time that HOGs distribution occurs. uint256 accHogPerShare; // Accumulated HOGs per share, times 1e18. See below. bool isStarted; // if lastRewardTime has passed uint256 poolHogPerSec; // rewards per second for pool (acts as allocPoint) } IERC20 public hog; address public devFund; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The time when HOG mining starts. uint256 public poolStartTime; // The time when HOG mining ends. uint256 public poolEndTime; uint256 public hogPerSecond = 0 ether; uint256 public runningTime = 7 days; event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount); event RewardPaid(address indexed user, uint256 amount); constructor( address _hog, address _devFund, uint256 _poolStartTime ) { require(block.timestamp < _poolStartTime, "pool cant be started in the past"); if (_hog != address(0)) hog = IERC20(_hog); if(_devFund != address(0)) devFund = _devFund; poolStartTime = _poolStartTime; poolEndTime = _poolStartTime + runningTime; operator = msg.sender; devFund = _devFund; // create all the pools (daily rewards divided by 86400 seconds) add(0.318750000 ether, 0, IERC20(0x784DD93F3c42DCbF88D45E6ad6D3CC20dA169a60), false, 0); // Hog-OS 27% (27540/86400) add(0.224305556 ether, 100, IERC20(0xb1e25689D55734FD3ffFc939c4C3Eb52DFf8A794), false, 0); // OS 19% (19380/86400) add(0.118055556 ether, 100, IERC20(0x79bbF4508B1391af3A0F4B30bb5FC4aa9ab0E07C), false, 0); // Anon 10% (10200/86400) add(0.106250000 ether, 100, IERC20(0x44E23B1F3f4511b3a7e81077Fd9F2858dF1B7579), false, 0); // Mclb 9% (9180/86400) add(0.129861111 ether, 100, IERC20(0xA04BC7140c26fc9BB1F36B1A604C7A5a88fb0E70), false, 0); // SWPx 11% (11220/86400) add(0.082638889 ether, 100, IERC20(0xE5DA20F15420aD15DE0fa650600aFc998bbE3955), false, 0); // stS 7% (7140/86400) add(0.082638889 ether, 100, IERC20(0xd3DCe716f3eF535C5Ff8d041c1A41C3bd89b97aE), false, 0); // scUSD 7% (7140/86400) add(0.047222222 ether, 100, IERC20(0x4EEC869d847A6d13b0F6D1733C5DEC0d1E741B4f), false, 0); // Indi 4% (4080/86400) add(0.047222222 ether, 100, IERC20(0x9fDbC3f8Abc05Fa8f3Ad3C17D2F806c1230c4564), false, 0); // Goglz 4% (4080/86400) add(0.023611111 ether, 100, IERC20(0x2D0E0814E62D80056181F5cd932274405966e4f0), false, 0); // Beets 2% (2040/86400) } modifier onlyOperator() { require(operator == msg.sender, "HogGenesisRewardPool: caller is not the operator"); _; } function poolLength() external view returns (uint256) { return poolInfo.length; } function checkPoolDuplicate(IERC20 _token) internal view { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { require(poolInfo[pid].token != _token, "HogGenesisRewardPool: existing pool?"); } } // bulk add pools function addBulk(uint256[] calldata _allocPoints, uint256[] calldata _depFees, IERC20[] calldata _tokens, bool _withUpdate, uint256 _lastRewardTime) external onlyOperator { require(_allocPoints.length == _depFees.length && _allocPoints.length == _tokens.length, "HogGenesisRewardPool: invalid length"); for (uint256 i = 0; i < _allocPoints.length; i++) { add(_allocPoints[i], _depFees[i], _tokens[i], _withUpdate, _lastRewardTime); } } // Add new lp to the pool. Can only be called by operator. function add( uint256 _allocPoint, uint256 _depFee, IERC20 _token, bool _withUpdate, uint256 _lastRewardTime ) public onlyOperator { checkPoolDuplicate(_token); if (_withUpdate) { massUpdatePools(); } if (block.timestamp < poolStartTime) { // chef is sleeping if (_lastRewardTime == 0) { _lastRewardTime = poolStartTime; } else { if (_lastRewardTime < poolStartTime) { _lastRewardTime = poolStartTime; } } } else { // chef is cooking if (_lastRewardTime == 0 || _lastRewardTime < block.timestamp) { _lastRewardTime = block.timestamp; } } bool _isStarted = (_lastRewardTime <= poolStartTime) || (_lastRewardTime <= block.timestamp); poolInfo.push(PoolInfo({ token: _token, depFee: _depFee, allocPoint: _allocPoint, poolHogPerSec: _allocPoint, lastRewardTime: _lastRewardTime, accHogPerShare: 0, isStarted: _isStarted })); if (_isStarted) { totalAllocPoint = totalAllocPoint.add(_allocPoint); hogPerSecond = hogPerSecond.add(_allocPoint); } } // Update the given pool's HOG allocation point. Can only be called by the operator. function set(uint256 _pid, uint256 _allocPoint, uint256 _depFee) public onlyOperator { massUpdatePools(); PoolInfo storage pool = poolInfo[_pid]; require(_depFee < 200); // deposit fee cant be more than 2%; pool.depFee = _depFee; if (pool.isStarted) { totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add(_allocPoint); hogPerSecond = hogPerSecond.sub(pool.poolHogPerSec).add(_allocPoint); } pool.allocPoint = _allocPoint; pool.poolHogPerSec = _allocPoint; } function bulkSet(uint256[] calldata _pids, uint256[] calldata _allocPoints, uint256[] calldata _depFees) external onlyOperator { require(_pids.length == _allocPoints.length && _pids.length == _depFees.length, "HogGenesisRewardPool: invalid length"); for (uint256 i = 0; i < _pids.length; i++) { set(_pids[i], _allocPoints[i], _depFees[i]); } } // Return accumulate rewards over the given _from to _to block. function getGeneratedReward(uint256 _fromTime, uint256 _toTime) public view returns (uint256) { if (_fromTime >= _toTime) return 0; if (_toTime >= poolEndTime) { if (_fromTime >= poolEndTime) return 0; if (_fromTime <= poolStartTime) return poolEndTime.sub(poolStartTime).mul(hogPerSecond); return poolEndTime.sub(_fromTime).mul(hogPerSecond); } else { if (_toTime <= poolStartTime) return 0; if (_fromTime <= poolStartTime) return _toTime.sub(poolStartTime).mul(hogPerSecond); return _toTime.sub(_fromTime).mul(hogPerSecond); } } // View function to see pending HOGs on frontend. function pendingHOG(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accHogPerShare = pool.accHogPerShare; uint256 tokenSupply = pool.token.balanceOf(address(this)); if (block.timestamp > pool.lastRewardTime && tokenSupply != 0) { uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp); uint256 _hogReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint); accHogPerShare = accHogPerShare.add(_hogReward.mul(1e18).div(tokenSupply)); } return user.amount.mul(accHogPerShare).div(1e18).sub(user.rewardDebt); } function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } } // massUpdatePoolsInRange function massUpdatePoolsInRange(uint256 _fromPid, uint256 _toPid) public { require(_fromPid <= _toPid, "HogGenesisRewardPool: invalid range"); for (uint256 pid = _fromPid; pid <= _toPid; ++pid) { updatePool(pid); } } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) private { PoolInfo storage pool = poolInfo[_pid]; if (block.timestamp <= pool.lastRewardTime) { return; } uint256 tokenSupply = pool.token.balanceOf(address(this)); if (tokenSupply == 0) { pool.lastRewardTime = block.timestamp; return; } if (!pool.isStarted) { pool.isStarted = true; totalAllocPoint = totalAllocPoint.add(pool.allocPoint); hogPerSecond = hogPerSecond.add(pool.poolHogPerSec); } if (totalAllocPoint > 0) { uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp); uint256 _hogReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint); pool.accHogPerShare = pool.accHogPerShare.add(_hogReward.mul(1e18).div(tokenSupply)); } pool.lastRewardTime = block.timestamp; } function setDevFund(address _devFund) public onlyOperator { devFund = _devFund; } // Deposit LP tokens. function deposit(uint256 _pid, uint256 _amount) public nonReentrant { address _sender = msg.sender; PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_sender]; updatePool(_pid); if (user.amount > 0) { uint256 _pending = user.amount.mul(pool.accHogPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeHogTransfer(_sender, _pending); emit RewardPaid(_sender, _pending); } } if (_amount > 0 ) { pool.token.safeTransferFrom(_sender, address(this), _amount); uint256 depositDebt = _amount.mul(pool.depFee).div(10000); user.amount = user.amount.add(_amount.sub(depositDebt)); pool.token.safeTransfer(devFund, depositDebt); } user.rewardDebt = user.amount.mul(pool.accHogPerShare).div(1e18); emit Deposit(_sender, _pid, _amount); } // Withdraw LP tokens. function withdraw(uint256 _pid, uint256 _amount) public nonReentrant { address _sender = msg.sender; PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_sender]; require(user.amount >= _amount, "withdraw: not good"); updatePool(_pid); uint256 _pending = user.amount.mul(pool.accHogPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeHogTransfer(_sender, _pending); emit RewardPaid(_sender, _pending); } if (_amount > 0) { user.amount = user.amount.sub(_amount); pool.token.safeTransfer(_sender, _amount); } user.rewardDebt = user.amount.mul(pool.accHogPerShare).div(1e18); emit Withdraw(_sender, _pid, _amount); } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public nonReentrant { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; uint256 _amount = user.amount; user.amount = 0; user.rewardDebt = 0; pool.token.safeTransfer(msg.sender, _amount); emit EmergencyWithdraw(msg.sender, _pid, _amount); } // Safe hog transfer function, just in case if rounding error causes pool to not have enough HOGs. function safeHogTransfer(address _to, uint256 _amount) internal { uint256 _hogBal = hog.balanceOf(address(this)); if (_hogBal > 0) { if (_amount > _hogBal) { hog.safeTransfer(_to, _hogBal); } else { hog.safeTransfer(_to, _amount); } } } function setOperator(address _operator) external onlyOperator { operator = _operator; } function governanceRecoverUnsupported( IERC20 _token, uint256 amount, address to ) external onlyOperator { if (block.timestamp < poolEndTime + 7 days) { // do not allow to drain tokens if less than 7 days after pool ends uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { PoolInfo storage pool = poolInfo[pid]; require(_token != pool.token, "token cannot be pool token"); } } _token.safeTransfer(to, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ 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)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ 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"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // 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 cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @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) { return a + b; } /** * @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 a - b; } /** * @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) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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 a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting 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) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * 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) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IBasisAsset { function mint(address recipient, uint256 amount) external returns (bool); function burn(uint256 amount) external; function burnFrom(address from, uint256 amount) external; function isOperator() external returns (bool); function operator() external view returns (address); function transferOperator(address newOperator_) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_hog","type":"address"},{"internalType":"address","name":"_devFund","type":"address"},{"internalType":"uint256","name":"_poolStartTime","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":"user","type":"address"},{"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":"uint256","name":"_depFee","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_lastRewardTime","type":"uint256"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_allocPoints","type":"uint256[]"},{"internalType":"uint256[]","name":"_depFees","type":"uint256[]"},{"internalType":"contract IERC20[]","name":"_tokens","type":"address[]"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_lastRewardTime","type":"uint256"}],"name":"addBulk","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_pids","type":"uint256[]"},{"internalType":"uint256[]","name":"_allocPoints","type":"uint256[]"},{"internalType":"uint256[]","name":"_depFees","type":"uint256[]"}],"name":"bulkSet","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":[],"name":"devFund","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromTime","type":"uint256"},{"internalType":"uint256","name":"_toTime","type":"uint256"}],"name":"getGeneratedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hog","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hogPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromPid","type":"uint256"},{"internalType":"uint256","name":"_toPid","type":"uint256"}],"name":"massUpdatePoolsInRange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingHOG","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"depFee","type":"uint256"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accHogPerShare","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"},{"internalType":"uint256","name":"poolHogPerSec","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"runningTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_depFee","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devFund","type":"address"}],"name":"setDevFund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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
60806040526000600655600060095562093a80600a5534801561002157600080fd5b5060405161255838038061255883398101604081905261004091610824565b60016000554281116100995760405162461bcd60e51b815260206004820181905260248201527f706f6f6c2063616e74206265207374617274656420696e20746865207061737460448201526064015b60405180910390fd5b6001600160a01b038316156100c457600280546001600160a01b0319166001600160a01b0385161790555b6001600160a01b038216156100ef57600380546001600160a01b0319166001600160a01b0384161790555b6007819055600a546101019082610879565b60085560018054336001600160a01b031991821617909155600380549091166001600160a01b03841617905561015767046c6d6faa27e000600073784dd93f3c42dcbf88d45e6ad6d3cc20da169a6081806102df565b61018267031ce4b6fa86c800606473b1e25689d55734fd3fffc939c4c3eb52dff8a7946000806102df565b6101ad6701a36ae71724280060647379bbf4508b1391af3a0f4b30bb5fc4aa9ab0e07c6000806102df565b6101d867017979cfe362a00060647344e23b1f3f4511b3a7e81077fd9f2858df1b75796000806102df565b6102036701cd5bfe0f4ae600606473a04bc7140c26fc9bb1f36b1a604c7a5a88fb0e706000806102df565b61022e67012597a1b77a5a00606473e5da20f15420ad15de0fa650600afc998bbe39556000806102df565b61025967012597a1b77a5a00606473d3dce716f3ef535c5ff8d041c1a41c3bd89b97ae6000806102df565b61028366a7c45c57d08c006064734eec869d847a6d13b0f6d1733c5dec0d1e741b4f6000806102df565b6102ad66a7c45c57d08c006064739fdbc3f8abc05fa8f3ad3c17d2f806c1230c45646000806102df565b6102d76653e22e2be846006064732d0e0814e62d80056181f5cd932274405966e4f06000806102df565b505050610907565b6001546001600160a01b031633146103525760405162461bcd60e51b815260206004820152603060248201527f486f6747656e65736973526577617264506f6f6c3a2063616c6c65722069732060448201526f3737ba103a34329037b832b930ba37b960811b6064820152608401610090565b61035b836104db565b811561036957610369610586565b600754421015610398578060000361038457506007546103ac565b60075481101561039357506007545b6103ac565b8015806103a457504281105b156103ac5750425b6000600754821115806103bf5750428211155b905060046040518060e00160405280866001600160a01b0316815260200187815260200188815260200184815260200160008152602001831515815260200188815250908060018154018082558091505060019003906000526020600020906007020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548160ff02191690831515021790555060c08201518160060155505080156104d3576006546104bf90876105a9565b6006556009546104cf90876105a9565b6009555b505050505050565b60045460005b8181101561058157826001600160a01b0316600482815481106105065761050661088c565b60009182526020909120600790910201546001600160a01b0316036105795760405162461bcd60e51b8152602060048201526024808201527f486f6747656e65736973526577617264506f6f6c3a206578697374696e6720706044820152636f6f6c3f60e01b6064820152608401610090565b6001016104e1565b505050565b60045460005b818110156105a55761059d816105be565b60010161058c565b5050565b60006105b58284610879565b90505b92915050565b6000600482815481106105d3576105d361088c565b90600052602060002090600702019050806003015442116105f2575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561063a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065e91906108a2565b90508060000361067357504260039091015550565b600582015460ff166106b75760058201805460ff19166001179055600282015460065461069f916105a9565b60069081558201546009546106b3916105a9565b6009555b6006541561072a5760006106d583600301544261073560201b60201c565b905060006106fc6006546106f68660020154856107e460201b90919060201c565b906107f0565b9050610722610717846106f684670de0b6b3a76400006107e4565b6004860154906105a9565b600485015550505b504260039091015550565b6000818310610746575060006105b8565b60085482106107a3576008548310610760575060006105b8565b600754831161078e57600954600754600854610787929161078191906107fc565b906107e4565b90506105b8565b600954600854610787919061078190866107fc565b60075482116107b4575060006105b8565b60075483116107d35760095460075461078791906107819085906107fc565b6009546107879061078184866107fc565b60006105b582846108bb565b60006105b582846108d2565b60006105b582846108f4565b80516001600160a01b038116811461081f57600080fd5b919050565b60008060006060848603121561083957600080fd5b61084284610808565b925061085060208501610808565b6040949094015192959394509192915050565b634e487b7160e01b600052601160045260246000fd5b808201808211156105b8576105b8610863565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156108b457600080fd5b5051919050565b80820281158282048414176105b8576105b8610863565b6000826108ef57634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156105b8576105b8610863565b611c42806109166000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c8063630b5ba1116100de5780639a9bea4e11610097578063b3ab15fb11610071578063b3ab15fb1461035d578063b947a88d14610370578063e2bbb15814610383578063fddc298c1461039657600080fd5b80639a9bea4e1461032e578063a4bb3f4314610341578063ae4db9191461034a57600080fd5b8063630b5ba1146102a757806369638af8146102af5780636e271dd5146102c257806390c5ed6a146102cb57806393f1a40b146102de578063943f013d1461032557600080fd5b8063441a3e7011610130578063441a3e701461023f5780635312ea8e1461025257806354575af414610265578063570ca735146102785780635f96dc111461028b57806362d303681461029457600080fd5b8063081e3eda146101785780631526fe271461018f57806317caf6f1146101e3578063231f0c6a146101ec5780634390d2a8146101ff57806343b0e8df1461022a575b600080fd5b6004545b6040519081526020015b60405180910390f35b6101a261019d36600461170b565b6103a9565b604080516001600160a01b03909816885260208801969096529486019390935260608501919091526080840152151560a083015260c082015260e001610186565b61017c60065481565b61017c6101fa366004611724565b610405565b600354610212906001600160a01b031681565b6040516001600160a01b039091168152602001610186565b61023d610238366004611746565b6104ca565b005b61023d61024d366004611724565b61059e565b61023d61026036600461170b565b610772565b61023d610273366004611787565b610826565b600154610212906001600160a01b031681565b61017c60075481565b61023d6102a2366004611823565b61091f565b61023d6109f4565b600254610212906001600160a01b031681565b61017c60085481565b61023d6102d93660046118e6565b610a13565b6103106102ec366004611938565b60056020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610186565b61017c600a5481565b61017c61033c366004611938565b610bc6565b61017c60095481565b61023d610358366004611968565b610d25565b61023d61036b366004611968565b610d71565b61023d61037e366004611724565b610dbd565b61023d610391366004611724565b610e3b565b61023d6103a4366004611985565b61100a565b600481815481106103b957600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b0390951696509294919390929160ff169087565b6000818310610416575060006104c4565b600854821061047e576008548310610430575060006104c4565b60075483116104635761045c6009546104566007546008546110cd90919063ffffffff16565b906110e0565b90506104c4565b61045c600954610456856008546110cd90919063ffffffff16565b600754821161048f575060006104c4565b60075483116104b35761045c600954610456600754856110cd90919063ffffffff16565b60095461045c9061045684866110cd565b92915050565b6001546001600160a01b031633146104fd5760405162461bcd60e51b81526004016104f490611a2b565b60405180910390fd5b6105056109f4565b60006004848154811061051a5761051a611a7b565b9060005260206000209060070201905060c8821061053757600080fd5b60018101829055600581015460ff161561058c5761056e8361056883600201546006546110cd90919063ffffffff16565b906110ec565b6006908155810154600954610588918591610568916110cd565b6009555b60028101839055600601919091555050565b6105a66110f8565b60003390506000600484815481106105c0576105c0611a7b565b600091825260208083208784526005825260408085206001600160a01b038816865290925292208054600790920290920192508411156106375760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b60448201526064016104f4565b61064085611151565b600061067d8260010154610677670de0b6b3a7640000610671876004015487600001546110e090919063ffffffff16565b906112bc565b906110cd565b905080156106d35761068f84826112c8565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486826040516106ca91815260200190565b60405180910390a25b84156106fd5781546106e590866110cd565b825582546106fd906001600160a01b0316858761136f565b6004830154825461071b91670de0b6b3a764000091610671916110e0565b600183015560405185815286906001600160a01b038616907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a35050505061076e6001600055565b5050565b61077a6110f8565b60006004828154811061078f5761078f611a7b565b6000918252602080832085845260058252604080852033808752935284208054858255600182019590955560079093020180549094509192916107df916001600160a01b0391909116908361136f565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a35050506108236001600055565b50565b6001546001600160a01b031633146108505760405162461bcd60e51b81526004016104f490611a2b565b6008546108609062093a80611aa7565b4210156109065760045460005b818110156109035760006004828154811061088a5761088a611a7b565b6000918252602090912060079091020180549091506001600160a01b03908116908716036108fa5760405162461bcd60e51b815260206004820152601a60248201527f746f6b656e2063616e6e6f7420626520706f6f6c20746f6b656e00000000000060448201526064016104f4565b5060010161086d565b50505b61091a6001600160a01b038416828461136f565b505050565b6001546001600160a01b031633146109495760405162461bcd60e51b81526004016104f490611a2b565b868514801561095757508683145b6109735760405162461bcd60e51b81526004016104f490611aba565b60005b878110156109e9576109e189898381811061099357610993611a7b565b905060200201358888848181106109ac576109ac611a7b565b905060200201358787858181106109c5576109c5611a7b565b90506020020160208101906109da9190611968565b8686610a13565b600101610976565b505050505050505050565b60045460005b8181101561076e57610a0b81611151565b6001016109fa565b6001546001600160a01b03163314610a3d5760405162461bcd60e51b81526004016104f490611a2b565b610a46836113d2565b8115610a5457610a546109f4565b600754421015610a835780600003610a6f5750600754610a97565b600754811015610a7e57506007545b610a97565b801580610a8f57504281105b15610a975750425b600060075482111580610aaa5750428211155b905060046040518060e00160405280866001600160a01b0316815260200187815260200188815260200184815260200160008152602001831515815260200188815250908060018154018082558091505060019003906000526020600020906007020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548160ff02191690831515021790555060c0820151816006015550508015610bbe57600654610baa90876110ec565b600655600954610bba90876110ec565b6009555b505050505050565b60008060048481548110610bdc57610bdc611a7b565b600091825260208083208784526005825260408085206001600160a01b0389811687529352808520600460079590950290920184810154815492516370a0823160e01b8152309681019690965290965091949193919216906370a0823190602401602060405180830381865afa158015610c5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7e9190611afe565b9050836003015442118015610c9257508015155b15610cef576000610ca7856003015442610405565b90506000610cc86006546106718860020154856110e090919063ffffffff16565b9050610cea610ce38461067184670de0b6b3a76400006110e0565b85906110ec565b935050505b610d1a8360010154610677670de0b6b3a76400006106718688600001546110e090919063ffffffff16565b979650505050505050565b6001546001600160a01b03163314610d4f5760405162461bcd60e51b81526004016104f490611a2b565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610d9b5760405162461bcd60e51b81526004016104f490611a2b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b80821115610e195760405162461bcd60e51b815260206004820152602360248201527f486f6747656e65736973526577617264506f6f6c3a20696e76616c69642072616044820152626e676560e81b60648201526084016104f4565b815b81811161091a57610e2b81611151565b610e3481611b17565b9050610e1b565b610e436110f8565b6000339050600060048481548110610e5d57610e5d611a7b565b600091825260208083208784526005825260408085206001600160a01b0388168652909252922060079091029091019150610e9785611151565b805415610f27576000610ecf8260010154610677670de0b6b3a7640000610671876004015487600001546110e090919063ffffffff16565b90508015610f2557610ee184826112c8565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048682604051610f1c91815260200190565b60405180910390a25b505b8315610f9a578154610f44906001600160a01b0316843087611478565b6000610f636127106106718560010154886110e090919063ffffffff16565b9050610f7a610f7286836110cd565b8354906110ec565b82556003548354610f98916001600160a01b0391821691168361136f565b505b60048201548154610fb891670de0b6b3a764000091610671916110e0565b600182015560405184815285906001600160a01b038516907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a350505061076e6001600055565b6001546001600160a01b031633146110345760405162461bcd60e51b81526004016104f490611a2b565b848314801561104257508481145b61105e5760405162461bcd60e51b81526004016104f490611aba565b60005b858110156110c4576110bc87878381811061107e5761107e611a7b565b9050602002013586868481811061109757611097611a7b565b905060200201358585858181106110b0576110b0611a7b565b905060200201356104ca565b600101611061565b50505050505050565b60006110d98284611b30565b9392505050565b60006110d98284611b43565b60006110d98284611aa7565b60026000540361114a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104f4565b6002600055565b60006004828154811061116657611166611a7b565b9060005260206000209060070201905080600301544211611185575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156111cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f19190611afe565b90508060000361120657504260039091015550565b600582015460ff1661124a5760058201805460ff191660011790556002820154600654611232916110ec565b6006908155820154600954611246916110ec565b6009555b600654156112b1576000611262836003015442610405565b905060006112836006546106718660020154856110e090919063ffffffff16565b90506112a961129e8461067184670de0b6b3a76400006110e0565b6004860154906110ec565b600485015550505b504260039091015550565b60006110d98284611b5a565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611311573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113359190611afe565b9050801561091a578082111561135c5760025461091a906001600160a01b0316848361136f565b60025461091a906001600160a01b031684845b6040516001600160a01b03831660248201526044810182905261091a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526114b6565b60045460005b8181101561091a57826001600160a01b0316600482815481106113fd576113fd611a7b565b60009182526020909120600790910201546001600160a01b0316036114705760405162461bcd60e51b8152602060048201526024808201527f486f6747656e65736973526577617264506f6f6c3a206578697374696e6720706044820152636f6f6c3f60e01b60648201526084016104f4565b6001016113d8565b6040516001600160a01b03808516602483015283166044820152606481018290526114b09085906323b872dd60e01b9060840161139b565b50505050565b600061150b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661158b9092919063ffffffff16565b905080516000148061152c57508080602001905181019061152c9190611b7c565b61091a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104f4565b606061159a84846000856115a2565b949350505050565b6060824710156116035760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104f4565b600080866001600160a01b0316858760405161161f9190611bbd565b60006040518083038185875af1925050503d806000811461165c576040519150601f19603f3d011682016040523d82523d6000602084013e611661565b606091505b5091509150610d1a87838387606083156116dc5782516000036116d5576001600160a01b0385163b6116d55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104f4565b508161159a565b61159a83838151156116f15781518083602001fd5b8060405162461bcd60e51b81526004016104f49190611bd9565b60006020828403121561171d57600080fd5b5035919050565b6000806040838503121561173757600080fd5b50508035926020909101359150565b60008060006060848603121561175b57600080fd5b505081359360208301359350604090920135919050565b6001600160a01b038116811461082357600080fd5b60008060006060848603121561179c57600080fd5b83356117a781611772565b92506020840135915060408401356117be81611772565b809150509250925092565b60008083601f8401126117db57600080fd5b50813567ffffffffffffffff8111156117f357600080fd5b6020830191508360208260051b850101111561180e57600080fd5b9250929050565b801515811461082357600080fd5b60008060008060008060008060a0898b03121561183f57600080fd5b883567ffffffffffffffff81111561185657600080fd5b6118628b828c016117c9565b909950975050602089013567ffffffffffffffff81111561188257600080fd5b61188e8b828c016117c9565b909750955050604089013567ffffffffffffffff8111156118ae57600080fd5b6118ba8b828c016117c9565b90955093505060608901356118ce81611815565b979a9699509497939692959194509192608001359150565b600080600080600060a086880312156118fe57600080fd5b8535945060208601359350604086013561191781611772565b9250606086013561192781611815565b949793965091946080013592915050565b6000806040838503121561194b57600080fd5b82359150602083013561195d81611772565b809150509250929050565b60006020828403121561197a57600080fd5b81356110d981611772565b6000806000806000806060878903121561199e57600080fd5b863567ffffffffffffffff8111156119b557600080fd5b6119c189828a016117c9565b909750955050602087013567ffffffffffffffff8111156119e157600080fd5b6119ed89828a016117c9565b909550935050604087013567ffffffffffffffff811115611a0d57600080fd5b611a1989828a016117c9565b979a9699509497509295939492505050565b60208082526030908201527f486f6747656e65736973526577617264506f6f6c3a2063616c6c65722069732060408201526f3737ba103a34329037b832b930ba37b960811b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156104c4576104c4611a91565b60208082526024908201527f486f6747656e65736973526577617264506f6f6c3a20696e76616c6964206c656040820152630dccee8d60e31b606082015260800190565b600060208284031215611b1057600080fd5b5051919050565b600060018201611b2957611b29611a91565b5060010190565b818103818111156104c4576104c4611a91565b80820281158282048414176104c4576104c4611a91565b600082611b7757634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611b8e57600080fd5b81516110d981611815565b60005b83811015611bb4578181015183820152602001611b9c565b50506000910152565b60008251611bcf818460208701611b99565b9190910192915050565b6020815260008251806020840152611bf8816040850160208701611b99565b601f01601f1916919091016040019291505056fea2646970667358221220481af9b6adc0fac3e793cce8f7a3045596fad3032dbdec867b6bd7282e39a3b464736f6c634300081a0033000000000000000000000000b3804bf38bd170ef65b4de8536d19a8e3600c0a9000000000000000000000000efb4da71d2fc85ceced7ad15f71e723ccd25f9980000000000000000000000000000000000000000000000000000000067be4b70
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101735760003560e01c8063630b5ba1116100de5780639a9bea4e11610097578063b3ab15fb11610071578063b3ab15fb1461035d578063b947a88d14610370578063e2bbb15814610383578063fddc298c1461039657600080fd5b80639a9bea4e1461032e578063a4bb3f4314610341578063ae4db9191461034a57600080fd5b8063630b5ba1146102a757806369638af8146102af5780636e271dd5146102c257806390c5ed6a146102cb57806393f1a40b146102de578063943f013d1461032557600080fd5b8063441a3e7011610130578063441a3e701461023f5780635312ea8e1461025257806354575af414610265578063570ca735146102785780635f96dc111461028b57806362d303681461029457600080fd5b8063081e3eda146101785780631526fe271461018f57806317caf6f1146101e3578063231f0c6a146101ec5780634390d2a8146101ff57806343b0e8df1461022a575b600080fd5b6004545b6040519081526020015b60405180910390f35b6101a261019d36600461170b565b6103a9565b604080516001600160a01b03909816885260208801969096529486019390935260608501919091526080840152151560a083015260c082015260e001610186565b61017c60065481565b61017c6101fa366004611724565b610405565b600354610212906001600160a01b031681565b6040516001600160a01b039091168152602001610186565b61023d610238366004611746565b6104ca565b005b61023d61024d366004611724565b61059e565b61023d61026036600461170b565b610772565b61023d610273366004611787565b610826565b600154610212906001600160a01b031681565b61017c60075481565b61023d6102a2366004611823565b61091f565b61023d6109f4565b600254610212906001600160a01b031681565b61017c60085481565b61023d6102d93660046118e6565b610a13565b6103106102ec366004611938565b60056020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610186565b61017c600a5481565b61017c61033c366004611938565b610bc6565b61017c60095481565b61023d610358366004611968565b610d25565b61023d61036b366004611968565b610d71565b61023d61037e366004611724565b610dbd565b61023d610391366004611724565b610e3b565b61023d6103a4366004611985565b61100a565b600481815481106103b957600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b0390951696509294919390929160ff169087565b6000818310610416575060006104c4565b600854821061047e576008548310610430575060006104c4565b60075483116104635761045c6009546104566007546008546110cd90919063ffffffff16565b906110e0565b90506104c4565b61045c600954610456856008546110cd90919063ffffffff16565b600754821161048f575060006104c4565b60075483116104b35761045c600954610456600754856110cd90919063ffffffff16565b60095461045c9061045684866110cd565b92915050565b6001546001600160a01b031633146104fd5760405162461bcd60e51b81526004016104f490611a2b565b60405180910390fd5b6105056109f4565b60006004848154811061051a5761051a611a7b565b9060005260206000209060070201905060c8821061053757600080fd5b60018101829055600581015460ff161561058c5761056e8361056883600201546006546110cd90919063ffffffff16565b906110ec565b6006908155810154600954610588918591610568916110cd565b6009555b60028101839055600601919091555050565b6105a66110f8565b60003390506000600484815481106105c0576105c0611a7b565b600091825260208083208784526005825260408085206001600160a01b038816865290925292208054600790920290920192508411156106375760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b60448201526064016104f4565b61064085611151565b600061067d8260010154610677670de0b6b3a7640000610671876004015487600001546110e090919063ffffffff16565b906112bc565b906110cd565b905080156106d35761068f84826112c8565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486826040516106ca91815260200190565b60405180910390a25b84156106fd5781546106e590866110cd565b825582546106fd906001600160a01b0316858761136f565b6004830154825461071b91670de0b6b3a764000091610671916110e0565b600183015560405185815286906001600160a01b038616907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a35050505061076e6001600055565b5050565b61077a6110f8565b60006004828154811061078f5761078f611a7b565b6000918252602080832085845260058252604080852033808752935284208054858255600182019590955560079093020180549094509192916107df916001600160a01b0391909116908361136f565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a35050506108236001600055565b50565b6001546001600160a01b031633146108505760405162461bcd60e51b81526004016104f490611a2b565b6008546108609062093a80611aa7565b4210156109065760045460005b818110156109035760006004828154811061088a5761088a611a7b565b6000918252602090912060079091020180549091506001600160a01b03908116908716036108fa5760405162461bcd60e51b815260206004820152601a60248201527f746f6b656e2063616e6e6f7420626520706f6f6c20746f6b656e00000000000060448201526064016104f4565b5060010161086d565b50505b61091a6001600160a01b038416828461136f565b505050565b6001546001600160a01b031633146109495760405162461bcd60e51b81526004016104f490611a2b565b868514801561095757508683145b6109735760405162461bcd60e51b81526004016104f490611aba565b60005b878110156109e9576109e189898381811061099357610993611a7b565b905060200201358888848181106109ac576109ac611a7b565b905060200201358787858181106109c5576109c5611a7b565b90506020020160208101906109da9190611968565b8686610a13565b600101610976565b505050505050505050565b60045460005b8181101561076e57610a0b81611151565b6001016109fa565b6001546001600160a01b03163314610a3d5760405162461bcd60e51b81526004016104f490611a2b565b610a46836113d2565b8115610a5457610a546109f4565b600754421015610a835780600003610a6f5750600754610a97565b600754811015610a7e57506007545b610a97565b801580610a8f57504281105b15610a975750425b600060075482111580610aaa5750428211155b905060046040518060e00160405280866001600160a01b0316815260200187815260200188815260200184815260200160008152602001831515815260200188815250908060018154018082558091505060019003906000526020600020906007020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548160ff02191690831515021790555060c0820151816006015550508015610bbe57600654610baa90876110ec565b600655600954610bba90876110ec565b6009555b505050505050565b60008060048481548110610bdc57610bdc611a7b565b600091825260208083208784526005825260408085206001600160a01b0389811687529352808520600460079590950290920184810154815492516370a0823160e01b8152309681019690965290965091949193919216906370a0823190602401602060405180830381865afa158015610c5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7e9190611afe565b9050836003015442118015610c9257508015155b15610cef576000610ca7856003015442610405565b90506000610cc86006546106718860020154856110e090919063ffffffff16565b9050610cea610ce38461067184670de0b6b3a76400006110e0565b85906110ec565b935050505b610d1a8360010154610677670de0b6b3a76400006106718688600001546110e090919063ffffffff16565b979650505050505050565b6001546001600160a01b03163314610d4f5760405162461bcd60e51b81526004016104f490611a2b565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610d9b5760405162461bcd60e51b81526004016104f490611a2b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b80821115610e195760405162461bcd60e51b815260206004820152602360248201527f486f6747656e65736973526577617264506f6f6c3a20696e76616c69642072616044820152626e676560e81b60648201526084016104f4565b815b81811161091a57610e2b81611151565b610e3481611b17565b9050610e1b565b610e436110f8565b6000339050600060048481548110610e5d57610e5d611a7b565b600091825260208083208784526005825260408085206001600160a01b0388168652909252922060079091029091019150610e9785611151565b805415610f27576000610ecf8260010154610677670de0b6b3a7640000610671876004015487600001546110e090919063ffffffff16565b90508015610f2557610ee184826112c8565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048682604051610f1c91815260200190565b60405180910390a25b505b8315610f9a578154610f44906001600160a01b0316843087611478565b6000610f636127106106718560010154886110e090919063ffffffff16565b9050610f7a610f7286836110cd565b8354906110ec565b82556003548354610f98916001600160a01b0391821691168361136f565b505b60048201548154610fb891670de0b6b3a764000091610671916110e0565b600182015560405184815285906001600160a01b038516907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a350505061076e6001600055565b6001546001600160a01b031633146110345760405162461bcd60e51b81526004016104f490611a2b565b848314801561104257508481145b61105e5760405162461bcd60e51b81526004016104f490611aba565b60005b858110156110c4576110bc87878381811061107e5761107e611a7b565b9050602002013586868481811061109757611097611a7b565b905060200201358585858181106110b0576110b0611a7b565b905060200201356104ca565b600101611061565b50505050505050565b60006110d98284611b30565b9392505050565b60006110d98284611b43565b60006110d98284611aa7565b60026000540361114a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104f4565b6002600055565b60006004828154811061116657611166611a7b565b9060005260206000209060070201905080600301544211611185575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156111cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f19190611afe565b90508060000361120657504260039091015550565b600582015460ff1661124a5760058201805460ff191660011790556002820154600654611232916110ec565b6006908155820154600954611246916110ec565b6009555b600654156112b1576000611262836003015442610405565b905060006112836006546106718660020154856110e090919063ffffffff16565b90506112a961129e8461067184670de0b6b3a76400006110e0565b6004860154906110ec565b600485015550505b504260039091015550565b60006110d98284611b5a565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611311573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113359190611afe565b9050801561091a578082111561135c5760025461091a906001600160a01b0316848361136f565b60025461091a906001600160a01b031684845b6040516001600160a01b03831660248201526044810182905261091a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526114b6565b60045460005b8181101561091a57826001600160a01b0316600482815481106113fd576113fd611a7b565b60009182526020909120600790910201546001600160a01b0316036114705760405162461bcd60e51b8152602060048201526024808201527f486f6747656e65736973526577617264506f6f6c3a206578697374696e6720706044820152636f6f6c3f60e01b60648201526084016104f4565b6001016113d8565b6040516001600160a01b03808516602483015283166044820152606481018290526114b09085906323b872dd60e01b9060840161139b565b50505050565b600061150b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661158b9092919063ffffffff16565b905080516000148061152c57508080602001905181019061152c9190611b7c565b61091a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104f4565b606061159a84846000856115a2565b949350505050565b6060824710156116035760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104f4565b600080866001600160a01b0316858760405161161f9190611bbd565b60006040518083038185875af1925050503d806000811461165c576040519150601f19603f3d011682016040523d82523d6000602084013e611661565b606091505b5091509150610d1a87838387606083156116dc5782516000036116d5576001600160a01b0385163b6116d55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104f4565b508161159a565b61159a83838151156116f15781518083602001fd5b8060405162461bcd60e51b81526004016104f49190611bd9565b60006020828403121561171d57600080fd5b5035919050565b6000806040838503121561173757600080fd5b50508035926020909101359150565b60008060006060848603121561175b57600080fd5b505081359360208301359350604090920135919050565b6001600160a01b038116811461082357600080fd5b60008060006060848603121561179c57600080fd5b83356117a781611772565b92506020840135915060408401356117be81611772565b809150509250925092565b60008083601f8401126117db57600080fd5b50813567ffffffffffffffff8111156117f357600080fd5b6020830191508360208260051b850101111561180e57600080fd5b9250929050565b801515811461082357600080fd5b60008060008060008060008060a0898b03121561183f57600080fd5b883567ffffffffffffffff81111561185657600080fd5b6118628b828c016117c9565b909950975050602089013567ffffffffffffffff81111561188257600080fd5b61188e8b828c016117c9565b909750955050604089013567ffffffffffffffff8111156118ae57600080fd5b6118ba8b828c016117c9565b90955093505060608901356118ce81611815565b979a9699509497939692959194509192608001359150565b600080600080600060a086880312156118fe57600080fd5b8535945060208601359350604086013561191781611772565b9250606086013561192781611815565b949793965091946080013592915050565b6000806040838503121561194b57600080fd5b82359150602083013561195d81611772565b809150509250929050565b60006020828403121561197a57600080fd5b81356110d981611772565b6000806000806000806060878903121561199e57600080fd5b863567ffffffffffffffff8111156119b557600080fd5b6119c189828a016117c9565b909750955050602087013567ffffffffffffffff8111156119e157600080fd5b6119ed89828a016117c9565b909550935050604087013567ffffffffffffffff811115611a0d57600080fd5b611a1989828a016117c9565b979a9699509497509295939492505050565b60208082526030908201527f486f6747656e65736973526577617264506f6f6c3a2063616c6c65722069732060408201526f3737ba103a34329037b832b930ba37b960811b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156104c4576104c4611a91565b60208082526024908201527f486f6747656e65736973526577617264506f6f6c3a20696e76616c6964206c656040820152630dccee8d60e31b606082015260800190565b600060208284031215611b1057600080fd5b5051919050565b600060018201611b2957611b29611a91565b5060010190565b818103818111156104c4576104c4611a91565b80820281158282048414176104c4576104c4611a91565b600082611b7757634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611b8e57600080fd5b81516110d981611815565b60005b83811015611bb4578181015183820152602001611b9c565b50506000910152565b60008251611bcf818460208701611b99565b9190910192915050565b6020815260008251806020840152611bf8816040850160208701611b99565b601f01601f1916919091016040019291505056fea2646970667358221220481af9b6adc0fac3e793cce8f7a3045596fad3032dbdec867b6bd7282e39a3b464736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b3804bf38bd170ef65b4de8536d19a8e3600c0a9000000000000000000000000efb4da71d2fc85ceced7ad15f71e723ccd25f9980000000000000000000000000000000000000000000000000000000067be4b70
-----Decoded View---------------
Arg [0] : _hog (address): 0xB3804bF38bD170ef65b4De8536d19a8e3600C0A9
Arg [1] : _devFund (address): 0xeFb4DA71d2Fc85cECED7aD15F71E723CCD25F998
Arg [2] : _poolStartTime (uint256): 1740524400
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000b3804bf38bd170ef65b4de8536d19a8e3600c0a9
Arg [1] : 000000000000000000000000efb4da71d2fc85ceced7ad15f71e723ccd25f998
Arg [2] : 0000000000000000000000000000000000000000000000000000000067be4b70
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.