More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 39,276 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit | 17610202 | 6 secs ago | IN | 0 S | 0.00697395 | ||||
Withdraw | 17610190 | 10 secs ago | IN | 0 S | 0.00425255 | ||||
Withdraw | 17610176 | 14 secs ago | IN | 0 S | 0.0053587 | ||||
Withdraw | 17610172 | 15 secs ago | IN | 0 S | 0.0030828 | ||||
Withdraw | 17610157 | 20 secs ago | IN | 0 S | 0.00425525 | ||||
Withdraw | 17610143 | 25 secs ago | IN | 0 S | 0.00425565 | ||||
Withdraw | 17610112 | 34 secs ago | IN | 0 S | 0.00511065 | ||||
Deposit | 17610094 | 40 secs ago | IN | 0 S | 0.00783836 | ||||
Withdraw | 17610036 | 58 secs ago | IN | 0 S | 0.0059112 | ||||
Withdraw | 17609858 | 2 mins ago | IN | 0 S | 0.00425565 | ||||
Withdraw | 17609841 | 2 mins ago | IN | 0 S | 0.0042542 | ||||
Withdraw | 17609817 | 2 mins ago | IN | 0 S | 0.00425525 | ||||
Deposit | 17609792 | 2 mins ago | IN | 0 S | 0.00836929 | ||||
Withdraw | 17609531 | 4 mins ago | IN | 0 S | 0.00492464 | ||||
Withdraw | 17609467 | 5 mins ago | IN | 0 S | 0.00492481 | ||||
Withdraw | 17609459 | 5 mins ago | IN | 0 S | 0.00492794 | ||||
Withdraw | 17609454 | 5 mins ago | IN | 0 S | 0.00438925 | ||||
Deposit | 17609444 | 5 mins ago | IN | 0 S | 0.00862037 | ||||
Withdraw | 17609429 | 5 mins ago | IN | 0 S | 0.00507578 | ||||
Withdraw | 17609423 | 5 mins ago | IN | 0 S | 0.0059134 | ||||
Deposit | 17609412 | 5 mins ago | IN | 0 S | 0.00697395 | ||||
Withdraw | 17609390 | 5 mins ago | IN | 0 S | 0.00357164 | ||||
Withdraw | 17609375 | 5 mins ago | IN | 0 S | 0.00425525 | ||||
Withdraw | 17609367 | 6 mins ago | IN | 0 S | 0.00425565 | ||||
Deposit | 17609353 | 6 mins ago | IN | 0 S | 0.00821964 |
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 Name:
TheInception
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "./libraries/SafeMath.sol"; contract TheInception 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. address depFeeWallet; // address that receives the deposit fee uint256 allocPoint; // How many allocation points assigned to this pool. SHIELDs to distribute per block. uint256 lastRewardTime; // Last time that SHIELDs distribution occurs. uint256 accSHIELDPerShare; // Accumulated SHIELDs per share, times 1e18. See below. } IERC20 public SHIELD; // 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; // The time when SHIELD mining starts. uint256 public poolStartTime; // The time when SHIELD mining ends. uint256 public poolEndTime; 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 _SHIELD, uint256 _poolStartTime ) { require(block.timestamp < _poolStartTime, "The Inception: pool cant be started in the past"); if (_SHIELD != address(0)) SHIELD = IERC20(_SHIELD); poolStartTime = _poolStartTime; poolEndTime = _poolStartTime + runningTime; operator = msg.sender; } modifier onlyOperator() { require(operator == msg.sender, "The Inception: 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, "The Inception: existing pool?"); } } // bulk add pools function addBulk( uint256[] calldata _allocPoints, uint256[] calldata _depFees, address[] calldata _depFeeWallets, IERC20[] calldata _tokens, bool _withUpdate, uint256 _lastRewardTime ) external onlyOperator { require( _allocPoints.length == _depFees.length && _allocPoints.length == _depFeeWallets.length && _allocPoints.length == _tokens.length, "The Inception: invalid length" ); for (uint256 i = 0; i < _allocPoints.length; i++) { add(_allocPoints[i], _depFees[i], _depFeeWallets[i], _tokens[i], _withUpdate, _lastRewardTime); } } // Add new lp to the pool. Can only be called by operator. function add( uint256 _allocPoint, uint256 _depFee, address _depFeeWallet, IERC20 _token, bool _withUpdate, uint256 _lastRewardTime ) public onlyOperator { require(_depFee <= 100, "The Inception: deposit fee cant be more than 1%"); // deposit fee cant be more than 1%; checkPoolDuplicate(_token); if (_withUpdate) { massUpdatePools(); } if (block.timestamp < poolStartTime) { // chef is sleeping if (_lastRewardTime < poolStartTime) { _lastRewardTime = poolStartTime; } } else { // chef is cooking if (_lastRewardTime < block.timestamp) { _lastRewardTime = block.timestamp; } } poolInfo.push(PoolInfo({ token: _token, depFee: _depFee, depFeeWallet: _depFeeWallet, allocPoint: _allocPoint, lastRewardTime: _lastRewardTime, accSHIELDPerShare: 0 })); totalAllocPoint = totalAllocPoint.add(_allocPoint); } // Update the given pool's SHIELD allocation point. Can only be called by the operator. function set(uint256 _pid, uint256 _allocPoint, uint256 _depFee, address _depFeeWallet) public onlyOperator { massUpdatePools(); PoolInfo storage pool = poolInfo[_pid]; require(_depFee <= 100, "The Inception: deposit fee cant be more than 1%"); // deposit fee cant be more than 1%; pool.depFee = _depFee; pool.depFeeWallet = _depFeeWallet; totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add(_allocPoint); pool.allocPoint = _allocPoint; } // bulk set pools function bulkSet(uint256[] calldata _pids, uint256[] calldata _allocPoints, uint256[] calldata _depFees, address[] calldata _depFeeWallets) external onlyOperator { require( _pids.length == _allocPoints.length && _pids.length == _depFees.length && _pids.length == _depFeeWallets.length, "TheInception: invalid length"); for (uint256 i = 0; i < _pids.length; i++) { set(_pids[i], _allocPoints[i], _depFees[i], _depFeeWallets[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(totalAllocPoint); return poolEndTime.sub(_fromTime).mul(totalAllocPoint); } else { if (_toTime <= poolStartTime) return 0; if (_fromTime <= poolStartTime) return _toTime.sub(poolStartTime).mul(totalAllocPoint); return _toTime.sub(_fromTime).mul(totalAllocPoint); } } // View function to see pending SHIELDs on frontend. function pendingSHIELD(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accSHIELDPerShare = pool.accSHIELDPerShare; uint256 tokenSupply = pool.token.balanceOf(address(this)); if (block.timestamp > pool.lastRewardTime && tokenSupply != 0) { uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp); uint256 _SHIELDReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint); accSHIELDPerShare = accSHIELDPerShare.add(_SHIELDReward.mul(1e18).div(tokenSupply)); } return user.amount.mul(accSHIELDPerShare).div(1e18).sub(user.rewardDebt); } 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) 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 (totalAllocPoint > 0) { uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp); uint256 _SHIELDReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint); pool.accSHIELDPerShare = pool.accSHIELDPerShare.add(_SHIELDReward.mul(1e18).div(tokenSupply)); } pool.lastRewardTime = block.timestamp; } // 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.accSHIELDPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeSHIELDTransfer(_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(pool.depFeeWallet, depositDebt); } user.rewardDebt = user.amount.mul(pool.accSHIELDPerShare).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, "TheInception: user does not have enough balance deposited"); updatePool(_pid); uint256 _pending = user.amount.mul(pool.accSHIELDPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeSHIELDTransfer(_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.accSHIELDPerShare).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 SHIELD transfer function, just in case if rounding error causes pool to not have enough SHIELDs. function safeSHIELDTransfer(address _to, uint256 _amount) internal { uint256 _SHIELDBalance = SHIELD.balanceOf(address(this)); if (_SHIELDBalance > 0) { if (_amount > _SHIELDBalance) { SHIELD.safeTransfer(_to, _SHIELDBalance); } else { SHIELD.safeTransfer(_to, _amount); } } } function setOperator(address _operator) external onlyOperator { operator = _operator; } function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to) external onlyOperator { require(block.timestamp > poolEndTime + 15 days, "TheInception: cannot recover tokens till after 15 days have passed"); uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { PoolInfo storage pool = poolInfo[pid]; require(_token != pool.token, "TheInception: token cannot be pool token"); } _token.safeTransfer(to, amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC165} from "./IERC165.sol"; /** * @title IERC1363 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. * * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction. */ interface IERC1363 is IERC20, IERC165 { /* * Note: the ERC-165 identifier for this interface is 0xb0202a11. * 0xb0202a11 === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @param data Additional data with no specified format, sent in call to `spender`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ 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 value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC1363} from "../../../interfaces/IERC1363.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC-20 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 { /** * @dev An operation with an ERC-20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful. */ function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) { return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful. */ function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) { return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, 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. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @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. * * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being * set here. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { safeTransfer(token, to, value); } else if (!token.transferAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferFromAndCallRelaxed( IERC1363 token, address from, address to, uint256 value, bytes memory data ) internal { if (to.code.length == 0) { safeTransferFrom(token, from, to, value); } else if (!token.transferFromAndCall(from, to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}. * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall} * once without retrying, and relies on the returned value to be true. * * Reverts if the returned value is other than `true`. */ function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { forceApprove(token, to, value); } else if (!token.approveAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements. */ function _callOptionalReturn(IERC20 token, bytes memory data) private { uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) // bubble errors if iszero(success) { let ptr := mload(0x40) returndatacopy(ptr, 0, returndatasize()) revert(ptr, returndatasize()) } returnSize := returndatasize() returnValue := mload(0) } if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) { revert SafeERC20FailedOperation(address(token)); } } /** * @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 silently catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { bool success; uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) returnSize := returndatasize() returnValue := mload(0) } return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @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 EIP-1153 (transient storage) is available on the chain you're deploying at, * consider using {ReentrancyGuardTransient} instead. * * 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; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); 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 if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // 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 v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "viaIR": false, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "remappings": [ "@=node_modules/@" ], "evmVersion": "paris" }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_SHIELD","type":"address"},{"internalType":"uint256","name":"_poolStartTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"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":[],"name":"SHIELD","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_depFee","type":"uint256"},{"internalType":"address","name":"_depFeeWallet","type":"address"},{"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":"address[]","name":"_depFeeWallets","type":"address[]"},{"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[]"},{"internalType":"address[]","name":"_depFeeWallets","type":"address[]"}],"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":[{"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":"massUpdatePools","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":"pendingSHIELD","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":"address","name":"depFeeWallet","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accSHIELDPerShare","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"},{"internalType":"address","name":"_depFeeWallet","type":"address"}],"name":"set","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
608060405262093a806008553480156200001857600080fd5b5060405162001bca38038062001bca8339810160408190526200003b9162000109565b6001600055428111620000ac5760405162461bcd60e51b815260206004820152602f60248201527f54686520496e63657074696f6e3a20706f6f6c2063616e74206265207374617260448201526e1d1959081a5b881d1a19481c185cdd608a1b606482015260840160405180910390fd5b6001600160a01b03821615620000d857600280546001600160a01b0319166001600160a01b0384161790555b6006819055600854620000ec908262000145565b6007555050600180546001600160a01b031916331790556200016d565b600080604083850312156200011d57600080fd5b82516001600160a01b03811681146200013557600080fd5b6020939093015192949293505050565b808201808211156200016757634e487b7160e01b600052601160045260246000fd5b92915050565b611a4d806200017d6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c8063570ca735116100b857806393f1a40b1161007c57806393f1a40b1461028c578063943f013d146102d3578063b3ab15fb146102dc578063cae6de07146102ef578063e2bbb15814610302578063e83556dc1461031557600080fd5b8063570ca735146102345780635b2725ed1461025f5780635f96dc1114610272578063630b5ba11461027b5780636e271dd51461028357600080fd5b80632e1c3d95116100ff5780632e1c3d95146101d55780633692026d146101e8578063441a3e70146101fb5780635312ea8e1461020e57806354575af41461022157600080fd5b8063051ba3511461013c578063081e3eda146101515780631526fe271461016857806317caf6f1146101b9578063231f0c6a146101c2575b600080fd5b61014f61014a366004611551565b610328565b005b6003545b6040519081526020015b60405180910390f35b61017b610176366004611592565b6103f9565b604080516001600160a01b039788168152602081019690965293909516928401929092526060830152608082015260a081019190915260c00161015f565b61015560055481565b6101556101d03660046115ab565b61044d565b61014f6101e3366004611619565b610512565b61014f6101f63660046116f2565b61063e565b61014f6102093660046115ab565b610835565b61014f61021c366004611592565b610a3a565b61014f61022f366004611755565b610aee565b600154610247906001600160a01b031681565b6040516001600160a01b03909116815260200161015f565b600254610247906001600160a01b031681565b61015560065481565b61014f610c77565b61015560075481565b6102be61029a366004611797565b60046020908152600092835260408084209091529082529020805460019091015482565b6040805192835260208301919091520161015f565b61015560085481565b61014f6102ea3660046117c7565b610c9e565b61014f6102fd3660046117e4565b610cea565b61014f6103103660046115ab565b610e2d565b610155610323366004611797565b610ffe565b6001546001600160a01b0316331461035b5760405162461bcd60e51b8152600401610352906118c2565b60405180910390fd5b610363610c77565b6000600385815481106103785761037861190b565b9060005260206000209060060201905060648311156103a95760405162461bcd60e51b815260040161035290611921565b600181018390556002810180546001600160a01b0319166001600160a01b03841617905560038101546005546103ea9186916103e49161115d565b90611170565b60055560030192909255505050565b6003818154811061040957600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b039485169650929491909316929186565b600081831061045e5750600061050c565b60075482106104c65760075483106104785750600061050c565b60065483116104ab576104a460055461049e60065460075461115d90919063ffffffff16565b9061117c565b905061050c565b6104a460055461049e8560075461115d90919063ffffffff16565b60065482116104d75750600061050c565b60065483116104fb576104a460055461049e6006548561115d90919063ffffffff16565b6005546104a49061049e848661115d565b92915050565b6001546001600160a01b0316331461053c5760405162461bcd60e51b8152600401610352906118c2565b868514801561054a57508683145b801561055557508681145b6105a15760405162461bcd60e51b815260206004820152601c60248201527f546865496e63657074696f6e3a20696e76616c6964206c656e677468000000006044820152606401610352565b60005b87811015610633576106218989838181106105c1576105c161190b565b905060200201358888848181106105da576105da61190b565b905060200201358787858181106105f3576105f361190b565b9050602002013586868681811061060c5761060c61190b565b905060200201602081019061014a91906117c7565b8061062b81611986565b9150506105a4565b505050505050505050565b6001546001600160a01b031633146106685760405162461bcd60e51b8152600401610352906118c2565b60648511156106895760405162461bcd60e51b815260040161035290611921565b61069283611188565b81156106a0576106a0610c77565b6006544210156106be576006548110156106b957506006545b6106c9565b428110156106c95750425b6040805160c0810182526001600160a01b03808616825260208201888152878216938301938452606083018a815260808401868152600060a08601818152600380546001810182559252955160069091027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810180549287166001600160a01b031993841617905593517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c85015595517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d840180549190951696169590951790925590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e82015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85f830155517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f8609091015560055461082a9087611170565b600555505050505050565b61083d61122f565b60003390506000600384815481106108575761085761190b565b600091825260208083208784526004825260408085206001600160a01b038816865290925292208054600690920290920192508411156108ff5760405162461bcd60e51b815260206004820152603960248201527f546865496e63657074696f6e3a207573657220646f6573206e6f74206861766560448201527f20656e6f7567682062616c616e6365206465706f7369746564000000000000006064820152608401610352565b61090885611259565b6000610945826001015461093f670de0b6b3a76400006109398760050154876000015461117c90919063ffffffff16565b90611380565b9061115d565b9050801561099b57610957848261138c565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04868260405161099291815260200190565b60405180910390a25b84156109c55781546109ad908661115d565b825582546109c5906001600160a01b03168587611433565b600583015482546109e391670de0b6b3a7640000916109399161117c565b600183015560405185815286906001600160a01b038616907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a350505050610a366001600055565b5050565b610a4261122f565b600060038281548110610a5757610a5761190b565b600091825260208083208584526004825260408085203380875293528420805485825560018201959095556006909302018054909450919291610aa7916001600160a01b03919091169083611433565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a3505050610aeb6001600055565b50565b6001546001600160a01b03163314610b185760405162461bcd60e51b8152600401610352906118c2565b600754610b28906213c68061199f565b4211610ba75760405162461bcd60e51b815260206004820152604260248201527f546865496e63657074696f6e3a2063616e6e6f74207265636f76657220746f6b60448201527f656e732074696c6c206166746572203135206461797320686176652070617373606482015261195960f21b608482015260a401610352565b60035460005b81811015610c5c57600060038281548110610bca57610bca61190b565b6000918252602090912060069091020180549091506001600160a01b0390811690871603610c4b5760405162461bcd60e51b815260206004820152602860248201527f546865496e63657074696f6e3a20746f6b656e2063616e6e6f7420626520706f60448201526737b6103a37b5b2b760c11b6064820152608401610352565b50610c5581611986565b9050610bad565b50610c716001600160a01b0385168385611433565b50505050565b60035460005b81811015610a3657610c8e81611259565b610c9781611986565b9050610c7d565b6001546001600160a01b03163314610cc85760405162461bcd60e51b8152600401610352906118c2565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610d145760405162461bcd60e51b8152600401610352906118c2565b8887148015610d2257508885145b8015610d2d57508883145b610d795760405162461bcd60e51b815260206004820152601d60248201527f54686520496e63657074696f6e3a20696e76616c6964206c656e6774680000006044820152606401610352565b60005b89811015610e2057610e0e8b8b83818110610d9957610d9961190b565b905060200201358a8a84818110610db257610db261190b565b90506020020135898985818110610dcb57610dcb61190b565b9050602002016020810190610de091906117c7565b888886818110610df257610df261190b565b9050602002016020810190610e0791906117c7565b878761063e565b80610e1881611986565b915050610d7c565b5050505050505050505050565b610e3561122f565b6000339050600060038481548110610e4f57610e4f61190b565b600091825260208083208784526004825260408085206001600160a01b0388168652909252922060069091029091019150610e8985611259565b805415610f19576000610ec1826001015461093f670de0b6b3a76400006109398760050154876000015461117c90919063ffffffff16565b90508015610f1757610ed3848261138c565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048682604051610f0e91815260200190565b60405180910390a25b505b8315610f8e578154610f36906001600160a01b0316843087611492565b6000610f5561271061093985600101548861117c90919063ffffffff16565b9050610f6c610f64868361115d565b835490611170565b825560028301548354610f8c916001600160a01b03918216911683611433565b505b60058201548154610fac91670de0b6b3a7640000916109399161117c565b600182015560405184815285906001600160a01b038516907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a3505050610a366001600055565b600080600384815481106110145761101461190b565b60009182526020808320878452600480835260408086206001600160a01b038a8116885294528086206006959095029092016005810154815493516370a0823160e01b8152309381019390935290965093949291909116906370a0823190602401602060405180830381865afa158015611092573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b691906119b2565b90508360040154421180156110ca57508015155b156111275760006110df85600401544261044d565b9050600061110060055461093988600301548561117c90919063ffffffff16565b905061112261111b8461093984670de0b6b3a764000061117c565b8590611170565b935050505b611152836001015461093f670de0b6b3a764000061093986886000015461117c90919063ffffffff16565b979650505050505050565b600061116982846119cb565b9392505050565b6000611169828461199f565b600061116982846119de565b60035460005b8181101561122a57826001600160a01b0316600382815481106111b3576111b361190b565b60009182526020909120600690910201546001600160a01b03160361121a5760405162461bcd60e51b815260206004820152601d60248201527f54686520496e63657074696f6e3a206578697374696e6720706f6f6c3f0000006044820152606401610352565b61122381611986565b905061118e565b505050565b60026000540361125257604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b60006003828154811061126e5761126e61190b565b906000526020600020906006020190508060040154421161128d575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156112d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f991906119b2565b90508060000361130e57504260049091015550565b6005541561137557600061132683600401544261044d565b9050600061134760055461093986600301548561117c90919063ffffffff16565b905061136d6113628461093984670de0b6b3a764000061117c565b600586015490611170565b600585015550505b504260049091015550565b600061116982846119f5565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156113d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f991906119b2565b9050801561122a57808211156114205760025461122a906001600160a01b03168483611433565b60025461122a906001600160a01b031684845b6040516001600160a01b0383811660248301526044820183905261122a91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506114cb565b6040516001600160a01b038481166024830152838116604483015260648201839052610c719186918216906323b872dd90608401611460565b600080602060008451602086016000885af1806114ee576040513d6000823e3d81fd5b50506000513d91508115611506578060011415611513565b6001600160a01b0384163b155b15610c7157604051635274afe760e01b81526001600160a01b0385166004820152602401610352565b6001600160a01b0381168114610aeb57600080fd5b6000806000806080858703121561156757600080fd5b84359350602085013592506040850135915060608501356115878161153c565b939692955090935050565b6000602082840312156115a457600080fd5b5035919050565b600080604083850312156115be57600080fd5b50508035926020909101359150565b60008083601f8401126115df57600080fd5b50813567ffffffffffffffff8111156115f757600080fd5b6020830191508360208260051b850101111561161257600080fd5b9250929050565b6000806000806000806000806080898b03121561163557600080fd5b883567ffffffffffffffff8082111561164d57600080fd5b6116598c838d016115cd565b909a50985060208b013591508082111561167257600080fd5b61167e8c838d016115cd565b909850965060408b013591508082111561169757600080fd5b6116a38c838d016115cd565b909650945060608b01359150808211156116bc57600080fd5b506116c98b828c016115cd565b999c989b5096995094979396929594505050565b803580151581146116ed57600080fd5b919050565b60008060008060008060c0878903121561170b57600080fd5b863595506020870135945060408701356117248161153c565b935060608701356117348161153c565b9250611742608088016116dd565b915060a087013590509295509295509295565b60008060006060848603121561176a57600080fd5b83356117758161153c565b925060208401359150604084013561178c8161153c565b809150509250925092565b600080604083850312156117aa57600080fd5b8235915060208301356117bc8161153c565b809150509250929050565b6000602082840312156117d957600080fd5b81356111698161153c565b60008060008060008060008060008060c08b8d03121561180357600080fd5b8a3567ffffffffffffffff8082111561181b57600080fd5b6118278e838f016115cd565b909c509a5060208d013591508082111561184057600080fd5b61184c8e838f016115cd565b909a50985060408d013591508082111561186557600080fd5b6118718e838f016115cd565b909850965060608d013591508082111561188a57600080fd5b506118978d828e016115cd565b90955093506118aa905060808c016116dd565b915060a08b013590509295989b9194979a5092959850565b60208082526029908201527f54686520496e63657074696f6e3a2063616c6c6572206973206e6f74207468656040820152681037b832b930ba37b960b91b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6020808252602f908201527f54686520496e63657074696f6e3a206465706f736974206665652063616e742060408201526e6265206d6f7265207468616e20312560881b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60006001820161199857611998611970565b5060010190565b8082018082111561050c5761050c611970565b6000602082840312156119c457600080fd5b5051919050565b8181038181111561050c5761050c611970565b808202811582820484141761050c5761050c611970565b600082611a1257634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122002abc2c6063dff9bc9c4ae3764cc7f1421f4bf00a083f70462e2379dc9d7d09164736f6c634300081400330000000000000000000000006706adb93117c0a7235dcbe639e12ed13fa5752f0000000000000000000000000000000000000000000000000000000067e71be0
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101375760003560e01c8063570ca735116100b857806393f1a40b1161007c57806393f1a40b1461028c578063943f013d146102d3578063b3ab15fb146102dc578063cae6de07146102ef578063e2bbb15814610302578063e83556dc1461031557600080fd5b8063570ca735146102345780635b2725ed1461025f5780635f96dc1114610272578063630b5ba11461027b5780636e271dd51461028357600080fd5b80632e1c3d95116100ff5780632e1c3d95146101d55780633692026d146101e8578063441a3e70146101fb5780635312ea8e1461020e57806354575af41461022157600080fd5b8063051ba3511461013c578063081e3eda146101515780631526fe271461016857806317caf6f1146101b9578063231f0c6a146101c2575b600080fd5b61014f61014a366004611551565b610328565b005b6003545b6040519081526020015b60405180910390f35b61017b610176366004611592565b6103f9565b604080516001600160a01b039788168152602081019690965293909516928401929092526060830152608082015260a081019190915260c00161015f565b61015560055481565b6101556101d03660046115ab565b61044d565b61014f6101e3366004611619565b610512565b61014f6101f63660046116f2565b61063e565b61014f6102093660046115ab565b610835565b61014f61021c366004611592565b610a3a565b61014f61022f366004611755565b610aee565b600154610247906001600160a01b031681565b6040516001600160a01b03909116815260200161015f565b600254610247906001600160a01b031681565b61015560065481565b61014f610c77565b61015560075481565b6102be61029a366004611797565b60046020908152600092835260408084209091529082529020805460019091015482565b6040805192835260208301919091520161015f565b61015560085481565b61014f6102ea3660046117c7565b610c9e565b61014f6102fd3660046117e4565b610cea565b61014f6103103660046115ab565b610e2d565b610155610323366004611797565b610ffe565b6001546001600160a01b0316331461035b5760405162461bcd60e51b8152600401610352906118c2565b60405180910390fd5b610363610c77565b6000600385815481106103785761037861190b565b9060005260206000209060060201905060648311156103a95760405162461bcd60e51b815260040161035290611921565b600181018390556002810180546001600160a01b0319166001600160a01b03841617905560038101546005546103ea9186916103e49161115d565b90611170565b60055560030192909255505050565b6003818154811061040957600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b039485169650929491909316929186565b600081831061045e5750600061050c565b60075482106104c65760075483106104785750600061050c565b60065483116104ab576104a460055461049e60065460075461115d90919063ffffffff16565b9061117c565b905061050c565b6104a460055461049e8560075461115d90919063ffffffff16565b60065482116104d75750600061050c565b60065483116104fb576104a460055461049e6006548561115d90919063ffffffff16565b6005546104a49061049e848661115d565b92915050565b6001546001600160a01b0316331461053c5760405162461bcd60e51b8152600401610352906118c2565b868514801561054a57508683145b801561055557508681145b6105a15760405162461bcd60e51b815260206004820152601c60248201527f546865496e63657074696f6e3a20696e76616c6964206c656e677468000000006044820152606401610352565b60005b87811015610633576106218989838181106105c1576105c161190b565b905060200201358888848181106105da576105da61190b565b905060200201358787858181106105f3576105f361190b565b9050602002013586868681811061060c5761060c61190b565b905060200201602081019061014a91906117c7565b8061062b81611986565b9150506105a4565b505050505050505050565b6001546001600160a01b031633146106685760405162461bcd60e51b8152600401610352906118c2565b60648511156106895760405162461bcd60e51b815260040161035290611921565b61069283611188565b81156106a0576106a0610c77565b6006544210156106be576006548110156106b957506006545b6106c9565b428110156106c95750425b6040805160c0810182526001600160a01b03808616825260208201888152878216938301938452606083018a815260808401868152600060a08601818152600380546001810182559252955160069091027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810180549287166001600160a01b031993841617905593517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c85015595517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d840180549190951696169590951790925590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e82015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85f830155517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f8609091015560055461082a9087611170565b600555505050505050565b61083d61122f565b60003390506000600384815481106108575761085761190b565b600091825260208083208784526004825260408085206001600160a01b038816865290925292208054600690920290920192508411156108ff5760405162461bcd60e51b815260206004820152603960248201527f546865496e63657074696f6e3a207573657220646f6573206e6f74206861766560448201527f20656e6f7567682062616c616e6365206465706f7369746564000000000000006064820152608401610352565b61090885611259565b6000610945826001015461093f670de0b6b3a76400006109398760050154876000015461117c90919063ffffffff16565b90611380565b9061115d565b9050801561099b57610957848261138c565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04868260405161099291815260200190565b60405180910390a25b84156109c55781546109ad908661115d565b825582546109c5906001600160a01b03168587611433565b600583015482546109e391670de0b6b3a7640000916109399161117c565b600183015560405185815286906001600160a01b038616907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a350505050610a366001600055565b5050565b610a4261122f565b600060038281548110610a5757610a5761190b565b600091825260208083208584526004825260408085203380875293528420805485825560018201959095556006909302018054909450919291610aa7916001600160a01b03919091169083611433565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a3505050610aeb6001600055565b50565b6001546001600160a01b03163314610b185760405162461bcd60e51b8152600401610352906118c2565b600754610b28906213c68061199f565b4211610ba75760405162461bcd60e51b815260206004820152604260248201527f546865496e63657074696f6e3a2063616e6e6f74207265636f76657220746f6b60448201527f656e732074696c6c206166746572203135206461797320686176652070617373606482015261195960f21b608482015260a401610352565b60035460005b81811015610c5c57600060038281548110610bca57610bca61190b565b6000918252602090912060069091020180549091506001600160a01b0390811690871603610c4b5760405162461bcd60e51b815260206004820152602860248201527f546865496e63657074696f6e3a20746f6b656e2063616e6e6f7420626520706f60448201526737b6103a37b5b2b760c11b6064820152608401610352565b50610c5581611986565b9050610bad565b50610c716001600160a01b0385168385611433565b50505050565b60035460005b81811015610a3657610c8e81611259565b610c9781611986565b9050610c7d565b6001546001600160a01b03163314610cc85760405162461bcd60e51b8152600401610352906118c2565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610d145760405162461bcd60e51b8152600401610352906118c2565b8887148015610d2257508885145b8015610d2d57508883145b610d795760405162461bcd60e51b815260206004820152601d60248201527f54686520496e63657074696f6e3a20696e76616c6964206c656e6774680000006044820152606401610352565b60005b89811015610e2057610e0e8b8b83818110610d9957610d9961190b565b905060200201358a8a84818110610db257610db261190b565b90506020020135898985818110610dcb57610dcb61190b565b9050602002016020810190610de091906117c7565b888886818110610df257610df261190b565b9050602002016020810190610e0791906117c7565b878761063e565b80610e1881611986565b915050610d7c565b5050505050505050505050565b610e3561122f565b6000339050600060038481548110610e4f57610e4f61190b565b600091825260208083208784526004825260408085206001600160a01b0388168652909252922060069091029091019150610e8985611259565b805415610f19576000610ec1826001015461093f670de0b6b3a76400006109398760050154876000015461117c90919063ffffffff16565b90508015610f1757610ed3848261138c565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048682604051610f0e91815260200190565b60405180910390a25b505b8315610f8e578154610f36906001600160a01b0316843087611492565b6000610f5561271061093985600101548861117c90919063ffffffff16565b9050610f6c610f64868361115d565b835490611170565b825560028301548354610f8c916001600160a01b03918216911683611433565b505b60058201548154610fac91670de0b6b3a7640000916109399161117c565b600182015560405184815285906001600160a01b038516907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a3505050610a366001600055565b600080600384815481106110145761101461190b565b60009182526020808320878452600480835260408086206001600160a01b038a8116885294528086206006959095029092016005810154815493516370a0823160e01b8152309381019390935290965093949291909116906370a0823190602401602060405180830381865afa158015611092573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b691906119b2565b90508360040154421180156110ca57508015155b156111275760006110df85600401544261044d565b9050600061110060055461093988600301548561117c90919063ffffffff16565b905061112261111b8461093984670de0b6b3a764000061117c565b8590611170565b935050505b611152836001015461093f670de0b6b3a764000061093986886000015461117c90919063ffffffff16565b979650505050505050565b600061116982846119cb565b9392505050565b6000611169828461199f565b600061116982846119de565b60035460005b8181101561122a57826001600160a01b0316600382815481106111b3576111b361190b565b60009182526020909120600690910201546001600160a01b03160361121a5760405162461bcd60e51b815260206004820152601d60248201527f54686520496e63657074696f6e3a206578697374696e6720706f6f6c3f0000006044820152606401610352565b61122381611986565b905061118e565b505050565b60026000540361125257604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b60006003828154811061126e5761126e61190b565b906000526020600020906006020190508060040154421161128d575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156112d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f991906119b2565b90508060000361130e57504260049091015550565b6005541561137557600061132683600401544261044d565b9050600061134760055461093986600301548561117c90919063ffffffff16565b905061136d6113628461093984670de0b6b3a764000061117c565b600586015490611170565b600585015550505b504260049091015550565b600061116982846119f5565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156113d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f991906119b2565b9050801561122a57808211156114205760025461122a906001600160a01b03168483611433565b60025461122a906001600160a01b031684845b6040516001600160a01b0383811660248301526044820183905261122a91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506114cb565b6040516001600160a01b038481166024830152838116604483015260648201839052610c719186918216906323b872dd90608401611460565b600080602060008451602086016000885af1806114ee576040513d6000823e3d81fd5b50506000513d91508115611506578060011415611513565b6001600160a01b0384163b155b15610c7157604051635274afe760e01b81526001600160a01b0385166004820152602401610352565b6001600160a01b0381168114610aeb57600080fd5b6000806000806080858703121561156757600080fd5b84359350602085013592506040850135915060608501356115878161153c565b939692955090935050565b6000602082840312156115a457600080fd5b5035919050565b600080604083850312156115be57600080fd5b50508035926020909101359150565b60008083601f8401126115df57600080fd5b50813567ffffffffffffffff8111156115f757600080fd5b6020830191508360208260051b850101111561161257600080fd5b9250929050565b6000806000806000806000806080898b03121561163557600080fd5b883567ffffffffffffffff8082111561164d57600080fd5b6116598c838d016115cd565b909a50985060208b013591508082111561167257600080fd5b61167e8c838d016115cd565b909850965060408b013591508082111561169757600080fd5b6116a38c838d016115cd565b909650945060608b01359150808211156116bc57600080fd5b506116c98b828c016115cd565b999c989b5096995094979396929594505050565b803580151581146116ed57600080fd5b919050565b60008060008060008060c0878903121561170b57600080fd5b863595506020870135945060408701356117248161153c565b935060608701356117348161153c565b9250611742608088016116dd565b915060a087013590509295509295509295565b60008060006060848603121561176a57600080fd5b83356117758161153c565b925060208401359150604084013561178c8161153c565b809150509250925092565b600080604083850312156117aa57600080fd5b8235915060208301356117bc8161153c565b809150509250929050565b6000602082840312156117d957600080fd5b81356111698161153c565b60008060008060008060008060008060c08b8d03121561180357600080fd5b8a3567ffffffffffffffff8082111561181b57600080fd5b6118278e838f016115cd565b909c509a5060208d013591508082111561184057600080fd5b61184c8e838f016115cd565b909a50985060408d013591508082111561186557600080fd5b6118718e838f016115cd565b909850965060608d013591508082111561188a57600080fd5b506118978d828e016115cd565b90955093506118aa905060808c016116dd565b915060a08b013590509295989b9194979a5092959850565b60208082526029908201527f54686520496e63657074696f6e3a2063616c6c6572206973206e6f74207468656040820152681037b832b930ba37b960b91b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6020808252602f908201527f54686520496e63657074696f6e3a206465706f736974206665652063616e742060408201526e6265206d6f7265207468616e20312560881b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60006001820161199857611998611970565b5060010190565b8082018082111561050c5761050c611970565b6000602082840312156119c457600080fd5b5051919050565b8181038181111561050c5761050c611970565b808202811582820484141761050c5761050c611970565b600082611a1257634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122002abc2c6063dff9bc9c4ae3764cc7f1421f4bf00a083f70462e2379dc9d7d09164736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006706adb93117c0a7235dcbe639e12ed13fa5752f0000000000000000000000000000000000000000000000000000000067e71be0
-----Decoded View---------------
Arg [0] : _SHIELD (address): 0x6706Adb93117C0a7235dCBe639E12ed13fa5752f
Arg [1] : _poolStartTime (uint256): 1743199200
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000006706adb93117c0a7235dcbe639e12ed13fa5752f
Arg [1] : 0000000000000000000000000000000000000000000000000000000067e71be0
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.