Source Code
Latest 25 from a total of 561 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Deposit | 1776951 | 664 days ago | IN | 0 ETH | 0.0000156 | ||||
| Deposit | 1776928 | 664 days ago | IN | 0 ETH | 0.00001838 | ||||
| Deposit | 1776902 | 664 days ago | IN | 0 ETH | 0.00001757 | ||||
| Deposit | 1776892 | 664 days ago | IN | 0 ETH | 0.00001844 | ||||
| Withdraw | 1726455 | 665 days ago | IN | 0 ETH | 0.00006646 | ||||
| Deposit | 1711983 | 666 days ago | IN | 0 ETH | 0.00003973 | ||||
| Deposit | 1711863 | 666 days ago | IN | 0 ETH | 0.00003425 | ||||
| Withdraw | 1667925 | 667 days ago | IN | 0 ETH | 0.00004024 | ||||
| Withdraw | 1667873 | 667 days ago | IN | 0 ETH | 0.00003258 | ||||
| Withdraw | 1667852 | 667 days ago | IN | 0 ETH | 0.00003287 | ||||
| Deposit | 1666211 | 667 days ago | IN | 0 ETH | 0.00003851 | ||||
| Deposit | 1666200 | 667 days ago | IN | 0 ETH | 0.00003787 | ||||
| Deposit | 1634130 | 667 days ago | IN | 0 ETH | 0.00006138 | ||||
| Deposit | 1634116 | 667 days ago | IN | 0 ETH | 0.00007492 | ||||
| Deposit | 1634108 | 667 days ago | IN | 0 ETH | 0.00007432 | ||||
| Deposit | 1609581 | 668 days ago | IN | 0 ETH | 0.00002919 | ||||
| Deposit | 1609567 | 668 days ago | IN | 0 ETH | 0.00003397 | ||||
| Deposit | 1609550 | 668 days ago | IN | 0 ETH | 0.00003288 | ||||
| Withdraw | 1606633 | 668 days ago | IN | 0 ETH | 0.00003152 | ||||
| Deposit | 1605613 | 668 days ago | IN | 0 ETH | 0.00002985 | ||||
| Deposit | 1605610 | 668 days ago | IN | 0 ETH | 0.00003047 | ||||
| Deposit | 1591744 | 668 days ago | IN | 0 ETH | 0.0000425 | ||||
| Deposit | 1591732 | 668 days ago | IN | 0 ETH | 0.00004427 | ||||
| Deposit | 1584631 | 668 days ago | IN | 0 ETH | 0.00003764 | ||||
| Deposit | 1584620 | 668 days ago | IN | 0 ETH | 0.0000406 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xa30380B2...2F73C8D0A The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
GasSwapChef
Compiler Version
v0.8.24+commit.e11b9ed9
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.20;
import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol';
import {IERC20, SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
interface IRewardToken {
function mint(address to, uint256 amount) external;
function burnFrom(address account, uint256 amount) external;
}
contract GasSwapChef {
using EnumerableSet for EnumerableSet.AddressSet;
using SafeERC20 for IERC20;
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 UpdateShare(uint256 indexed pid, uint256 rewardPerShare);
event NewDev(address newDev);
event NewReward(uint256 newReward);
event NewPool(
uint256 indexed pid,
address indexed lpToken,
uint256 allocPoint,
uint256 startSec,
uint256 endSec,
uint16 depositFeeBP
);
event UpdatePool(
uint256 indexed pid,
address indexed lpToken,
uint256 newAllocPoint,
uint256 startSec,
uint256 endSec,
uint16 depositFeeBP
);
/// @dev Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of CAKEs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accCakePerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accCakePerShare` (and `lastRewardSec`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
/// @dev Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. CAKEs to distribute per Sec.
uint256 startSec; // Sec to start reward calculation of the pool.
uint256 endSec; // Sec to end reward calculation of the pool.
uint256 lastRewardSec; // Last Sec number that CAKEs distribution occurs.
uint256 accRewardPerShare; // Accumulated rewards per share, times 1e12. See below.
uint16 depositFeeBP; // Deposit fee in basis points.
}
/// @dev Max Sec reward per Sec
uint256 public constant MAX_SEC_REWARD = 10 ether;
/// @dev Max dev reward rate per Sec
uint256 public constant MAX_DEV_DIVIDEND = 2000;
/// @dev Max depositFeeBP
uint256 public constant MAX_DEPOSIT_FEE = 2000;
/// @dev Reward Token
IRewardToken public rewardToken;
/// @dev Dev address
address public devaddr;
/// @dev Dev dividend per Sec
uint256 public devDividend;
/// @dev Reward per Sec
uint256 public rewardPerSec;
/// @dev List of pools
EnumerableSet.AddressSet private pools;
/// @dev Info of each pool
PoolInfo[] public poolInfo;
/// @dev Info of each user that stakes LP tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
/// @dev Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint;
/**
* @dev Ownable
*/
address public owner;
modifier onlyOwner() {
require(msg.sender == owner, 'FORBIDDEN');
_;
}
/**
* @dev Initializable
*/
bool private initialized;
modifier initializer() {
require(!initialized, 'NotInitializing');
_;
}
/**
* @dev ReentrancyGuard
*/
bool private locked;
modifier lock() {
require(!locked, 'LOCKED');
locked = true;
_;
locked = false;
}
modifier onlyDev() {
require(msg.sender == owner || msg.sender == devaddr, 'FORBIDDEN');
_;
}
function poolLength() external view returns (uint256) {
return pools.length();
}
function initialize(
address _rewardToken,
address _devaddr,
uint256 _rewardPerSec
) external initializer {
require(_rewardPerSec < MAX_SEC_REWARD, 'Invalid reward');
initialized = true;
owner = msg.sender;
rewardToken = IRewardToken(_rewardToken);
devaddr = _devaddr;
rewardPerSec = _rewardPerSec;
devDividend = 1000;
emit NewDev(_devaddr);
emit NewReward(_rewardPerSec);
}
/// @dev Add a new LP to the pool. Can only be called by the owner
function add(
address _lpToken,
uint256 _allocPoint,
uint256 _startSec,
uint256 _endSec,
uint16 _depositFeeBP,
bool _withUpdate
) external onlyOwner {
require(!pools.contains(_lpToken), 'Duplicated Pool');
require(_depositFeeBP <= MAX_DEPOSIT_FEE, 'Invalid Deposit Fee');
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint += _allocPoint;
pools.add(_lpToken);
poolInfo.push(PoolInfo({
lpToken: IERC20(_lpToken),
allocPoint: _allocPoint,
startSec: _startSec,
endSec: _endSec,
lastRewardSec: 0,
accRewardPerShare: 0,
depositFeeBP: _depositFeeBP
}));
emit NewPool(
pools.length() - 1,
_lpToken,
_allocPoint,
_startSec,
_endSec,
_depositFeeBP
);
}
/// @dev Update the given pool. Can only be called by the owner.
function set(
uint256 _pid,
uint256 _allocPoint,
uint256 _startSec,
uint256 _endSec,
uint16 _depositFeeBP,
bool _withUpdate
) external onlyDev {
require(_pid < pools.length(), 'Invalid Pool');
require(_depositFeeBP <= MAX_DEPOSIT_FEE, 'Invalid Deposit Fee');
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint = totalAllocPoint - poolInfo[_pid].allocPoint + _allocPoint;
poolInfo[_pid].allocPoint = _allocPoint;
poolInfo[_pid].startSec = _startSec;
poolInfo[_pid].endSec = _endSec;
poolInfo[_pid].depositFeeBP = _depositFeeBP;
emit UpdatePool(
_pid,
address(poolInfo[_pid].lpToken),
_allocPoint,
_startSec,
_endSec,
_depositFeeBP
);
}
/// @dev Return reward multiplier over the given _fromSec to _toSec Sec.
function getMultiplier(uint256 _pid, uint256 _fromSec, uint256 _toSec) public view returns (uint256) {
PoolInfo memory pool = poolInfo[_pid];
if (rewardPerSec == 0 || pool.allocPoint == 0 || totalAllocPoint == 0) {
return 0;
} else if (_fromSec >= _toSec) {
return 0;
} else if (_toSec <= pool.startSec) {
return 0;
} else if (_fromSec <= pool.startSec && _toSec <= pool.endSec) {
return _toSec - pool.startSec;
} else if (_fromSec <= pool.startSec && _toSec > pool.endSec) {
return pool.endSec - pool.startSec;
} else if (_fromSec > pool.startSec && _toSec <= pool.endSec) {
return _toSec - _fromSec;
} else if (_fromSec <= pool.endSec && _toSec > pool.endSec) {
return pool.endSec - _fromSec;
} else {
return 0;
}
}
/// @dev View function to see pending rewards on frontend.
function pendingRewards(uint256 _pid, address _user) external view returns (uint256) {
PoolInfo memory pool = poolInfo[_pid];
UserInfo memory user = userInfo[_pid][_user];
uint256 accRewardPerShare = pool.accRewardPerShare;
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
uint256 multiplier = getMultiplier(_pid, pool.lastRewardSec, block.timestamp);
if (lpSupply != 0 && multiplier != 0) {
uint256 rewards = multiplier * rewardPerSec * pool.allocPoint / totalAllocPoint;
accRewardPerShare += rewards * 1e12 / lpSupply;
}
return (user.amount * accRewardPerShare / 1e12) - user.rewardDebt;
}
/// @dev Update reward variables for all pools. Be careful of gas spending!
function massUpdatePools() public {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
/// @dev Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
uint256 multiplier = getMultiplier(_pid, pool.lastRewardSec, block.timestamp);
if (lpSupply == 0 || multiplier == 0) {
pool.lastRewardSec = block.timestamp;
return;
}
uint256 rewards = multiplier * rewardPerSec * pool.allocPoint / totalAllocPoint;
if (devDividend != 0) {
rewardToken.mint(devaddr, rewards * devDividend / 10000);
}
pool.accRewardPerShare += rewards * 1e12 / lpSupply;
pool.lastRewardSec = block.timestamp;
emit UpdateShare(_pid, pool.accRewardPerShare);
}
/// @dev Add pool rewards from burned msg.sender's balance
function addRewards(uint256 _pid, uint256 _amount, bool _withUpdate) external {
if (_withUpdate) {
updatePool(_pid);
}
PoolInfo storage pool = poolInfo[_pid];
rewardToken.burnFrom(msg.sender, _amount);
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
pool.accRewardPerShare += _amount * 1e12 / lpSupply;
pool.lastRewardSec = block.timestamp;
emit UpdateShare(_pid, pool.accRewardPerShare);
}
/// @dev Deposit LP tokens to MasterChef
function deposit(uint256 _pid, uint256 _amount) public lock {
require(_pid < pools.length(), 'Invalid Pool');
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
updatePool(_pid);
if (user.amount != 0) {
uint256 pending = (user.amount * pool.accRewardPerShare / 1e12) - user.rewardDebt;
if (pending != 0) {
rewardToken.mint(msg.sender, pending);
}
}
if (_amount != 0) {
// Correctly reflect deposit amount from transfer-on-fee tokens
uint256 balance = pool.lpToken.balanceOf(address(this));
pool.lpToken.safeTransferFrom(msg.sender, address(this), _amount);
_amount = pool.lpToken.balanceOf(address(this)) - balance;
// Collect deposit fees
if (pool.depositFeeBP != 0) {
uint256 depositFee = _amount * pool.depositFeeBP / 10000;
pool.lpToken.safeTransfer(devaddr, depositFee);
_amount -= depositFee;
}
user.amount += _amount;
}
user.rewardDebt = user.amount * pool.accRewardPerShare / 1e12;
emit Deposit(msg.sender, _pid, _amount);
}
/// @dev Withdraw LP tokens from masterchef
function withdraw(uint256 _pid, uint256 _amount) external lock {
require(_pid < pools.length(), 'Invalid Pool');
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
updatePool(_pid);
uint256 pending = (user.amount * pool.accRewardPerShare / 1e12) - user.rewardDebt;
if (pending != 0) {
rewardToken.mint(msg.sender, pending);
}
if (_amount != 0) {
user.amount -= _amount;
pool.lpToken.safeTransfer(msg.sender, _amount);
}
user.rewardDebt = user.amount * pool.accRewardPerShare / 1e12;
emit Withdraw(msg.sender, _pid, _amount);
}
/// @dev Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) external lock {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
uint256 userAmount = user.amount;
user.amount = 0;
user.rewardDebt = 0;
pool.lpToken.safeTransfer(msg.sender, userAmount);
emit EmergencyWithdraw(msg.sender, _pid, userAmount);
}
/// @dev Helper function to harvest yields from all pool
function harvestAll() external lock {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
deposit(pid, 0);
}
}
function transferOwnership(address newOwner) external onlyOwner {
owner = newOwner;
}
function updateDev(address newDev) external onlyDev {
devaddr = newDev;
emit NewDev(newDev);
}
function updateDevDividend(uint256 newDividend) external onlyDev {
require(newDividend < MAX_DEV_DIVIDEND, 'Invalid rate');
devDividend = newDividend;
}
function updateRewardPerSec(uint256 newSecReward) external onlyDev {
require(newSecReward < MAX_SEC_REWARD, 'Invalid reward');
rewardPerSec = newSecReward;
emit NewReward(newSecReward);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.20;
/**
* @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 v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @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 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.0.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../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 An operation with an ERC20 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 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);
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.
*/
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.
*/
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 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);
if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
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 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(token).code.length > 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @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 or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* 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.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @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`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) 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 FailedInnerCall();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.
pragma solidity ^0.8.20;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```solidity
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*
* [WARNING]
* ====
* Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
* unusable.
* See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
*
* In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
* array of EnumerableSet.
* ====
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position is the index of the value in the `values` array plus 1.
// Position 0 is used to mean a value is not in the set.
mapping(bytes32 value => uint256) _positions;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._positions[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We cache the value's position to prevent multiple reads from the same storage slot
uint256 position = set._positions[value];
if (position != 0) {
// Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 valueIndex = position - 1;
uint256 lastIndex = set._values.length - 1;
if (valueIndex != lastIndex) {
bytes32 lastValue = set._values[lastIndex];
// Move the lastValue to the index where the value to delete is
set._values[valueIndex] = lastValue;
// Update the tracked position of the lastValue (that was just moved)
set._positions[lastValue] = position;
}
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the tracked position for the deleted slot
delete set._positions[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._positions[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
bytes32[] memory store = _values(set._inner);
bytes32[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
}{
"evmVersion": "paris",
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","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":false,"internalType":"address","name":"newDev","type":"address"}],"name":"NewDev","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":true,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startSec","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endSec","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"depositFeeBP","type":"uint16"}],"name":"NewPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newReward","type":"uint256"}],"name":"NewReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":true,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"newAllocPoint","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startSec","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endSec","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"depositFeeBP","type":"uint16"}],"name":"UpdatePool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardPerShare","type":"uint256"}],"name":"UpdateShare","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":"MAX_DEPOSIT_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_DEV_DIVIDEND","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SEC_REWARD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_startSec","type":"uint256"},{"internalType":"uint256","name":"_endSec","type":"uint256"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"addRewards","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":"devDividend","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"devaddr","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":"_pid","type":"uint256"},{"internalType":"uint256","name":"_fromSec","type":"uint256"},{"internalType":"uint256","name":"_toSec","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvestAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_devaddr","type":"address"},{"internalType":"uint256","name":"_rewardPerSec","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"startSec","type":"uint256"},{"internalType":"uint256","name":"endSec","type":"uint256"},{"internalType":"uint256","name":"lastRewardSec","type":"uint256"},{"internalType":"uint256","name":"accRewardPerShare","type":"uint256"},{"internalType":"uint16","name":"depositFeeBP","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerSec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IRewardToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_startSec","type":"uint256"},{"internalType":"uint256","name":"_endSec","type":"uint256"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newDev","type":"address"}],"name":"updateDev","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDividend","type":"uint256"}],"name":"updateDevDividend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSecReward","type":"uint256"}],"name":"updateRewardPerSec","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x608060405234801561001057600080fd5b506120db806100206000396000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c80637bafb029116100f9578063c6d87dd511610097578063d49e77cd11610071578063d49e77cd146103d4578063e2bbb158146103e7578063f2fde38b146103fa578063f7c618c11461040d57600080fd5b8063c6d87dd51461026f578063cda4a5ae146103ae578063d18df53c146103c157600080fd5b80638ed955b9116100d35780638ed955b914610339578063934c19381461034157806393f1a40b14610354578063adc84f9a1461039b57600080fd5b80637bafb029146102e85780638d3aa8bc146102fb5780638da5cb5b1461030e57600080fd5b8063441a3e701161016657806351eb05a61161014057806351eb05a6146102a75780635312ea8e146102ba5780635a01fe1a146102cd578063630b5ba1146102e057600080fd5b8063441a3e701461027857806346143f4c1461028b5780634f41e95d1461029e57600080fd5b80631794bb3c116101a25780631794bb3c1461024857806317caf6f11461025d5780631ba2cbb214610266578063392d2e701461026f57600080fd5b806249d1d4146101c8578063081e3eda146101ea5780631526fe27146101f2575b600080fd5b6101d7678ac7230489e8000081565b6040519081526020015b60405180910390f35b6101d7610420565b610205610200366004611d4c565b610431565b604080516001600160a01b0390981688526020880196909652948601939093526060850191909152608084015260a083015261ffff1660c082015260e0016101e1565b61025b610256366004611d81565b61048e565b005b6101d760085481565b6101d760025481565b6101d76107d081565b61025b610286366004611dbd565b6105e3565b61025b610299366004611d4c565b6107d6565b6101d760035481565b61025b6102b5366004611d4c565b61085a565b61025b6102c8366004611d4c565b610a62565b61025b6102db366004611dff565b610b4f565b61025b610e36565b6101d76102f6366004611e62565b610e59565b61025b610309366004611d4c565b610ff2565b600954610321906001600160a01b031681565b6040516001600160a01b0390911681526020016101e1565b61025b6110b5565b61025b61034f366004611e8e565b611124565b610386610362366004611ea9565b60076020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016101e1565b61025b6103a9366004611ed5565b6111b1565b61025b6103bc366004611f13565b6113e6565b6101d76103cf366004611ea9565b611560565b600154610321906001600160a01b031681565b61025b6103f5366004611dbd565b611732565b61025b610408366004611e8e565b611a60565b600054610321906001600160a01b031681565b600061042c6004611aac565b905090565b6006818154811061044157600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039095169650929491939092919061ffff1687565b600954600160a01b900460ff16156104df5760405162461bcd60e51b815260206004820152600f60248201526e4e6f74496e697469616c697a696e6760881b60448201526064015b60405180910390fd5b678ac7230489e8000081106105275760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a59081c995dd85c9960921b60448201526064016104d6565b600980546001600160a81b0319163317600160a01b179055600080546001600160a01b038581166001600160a01b03199283161790925560018054928516929091168217905560038290556103e86002556040519081527fc221fc4c7e5fe6682d7dbb36b97edf0a75127b7ef5c0ffafcbb981689a7bf78b9060200160405180910390a16040518181527fa4fda205b298198f8e2513573448542da0f39bbdff6d63026dcf8aea1167f9b59060200160405180910390a1505050565b600954600160a81b900460ff161561060d5760405162461bcd60e51b81526004016104d690611f4c565b6009805460ff60a81b1916600160a81b17905561062a6004611aac565b82106106485760405162461bcd60e51b81526004016104d690611f6c565b60006006838154811061065d5761065d611f92565b6000918252602080832086845260078083526040808620338752909352919093209102909101915061068e8461085a565b6000816001015464e8d4a51000846005015484600001546106af9190611fbe565b6106b99190611fd5565b6106c39190611ff7565b90508015610730576000546040516340c10f1960e01b8152336004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b15801561071757600080fd5b505af115801561072b573d6000803e3d6000fd5b505050505b8315610765578382600001600082825461074a9190611ff7565b90915550508254610765906001600160a01b03163386611ab6565b6005830154825464e8d4a510009161077c91611fbe565b6107869190611fd5565b6001830155604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a350506009805460ff60a81b19169055505050565b6009546001600160a01b03163314806107f957506001546001600160a01b031633145b6108155760405162461bcd60e51b81526004016104d69061200a565b6107d081106108555760405162461bcd60e51b815260206004820152600c60248201526b496e76616c6964207261746560a01b60448201526064016104d6565b600255565b60006006828154811061086f5761086f611f92565b6000918252602082206007919091020180546040516370a0823160e01b81523060048201529193506001600160a01b0316906370a0823190602401602060405180830381865afa1580156108c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108eb919061202d565b905060006108fe84846004015442610e59565b905081158061090b575080155b1561091c5750504260049091015550565b60006008548460010154600354846109349190611fbe565b61093e9190611fbe565b6109489190611fd5565b90506002546000146109e8576000546001546002546001600160a01b03928316926340c10f199216906127109061097f9086611fbe565b6109899190611fd5565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156109cf57600080fd5b505af11580156109e3573d6000803e3d6000fd5b505050505b826109f88264e8d4a51000611fbe565b610a029190611fd5565b846005016000828254610a159190612046565b9091555050426004850155600584015460405190815285907f603be601ae49125970c8cc31a0951580e10012f3d56575b6c98996045078b76e906020015b60405180910390a25050505050565b600954600160a81b900460ff1615610a8c5760405162461bcd60e51b81526004016104d690611f4c565b6009805460ff60a81b1916600160a81b179055600680546000919083908110610ab757610ab7611f92565b60009182526020808320858452600780835260408086203380885294528520805486825560018201969096559302018054909450919291610b04916001600160a01b039091169083611ab6565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020015b60405180910390a350506009805460ff60a81b191690555050565b6009546001600160a01b03163314610b795760405162461bcd60e51b81526004016104d69061200a565b610b84600487611b1a565b15610bc35760405162461bcd60e51b815260206004820152600f60248201526e111d5c1b1a58d85d195908141bdbdb608a1b60448201526064016104d6565b6107d08261ffff161115610c0f5760405162461bcd60e51b8152602060048201526013602482015272496e76616c6964204465706f7369742046656560681b60448201526064016104d6565b8015610c1d57610c1d610e36565b8460086000828254610c2f9190612046565b90915550610c409050600487611b3c565b506040805160e0810182526001600160a01b03888116808352602083018981529383018881526060840188815260006080860181815260a0870182815261ffff8b811660c08a0190815260068054600180820183559190965299517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f600790960295860180546001600160a01b03191691909a161790985598517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4084015593517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4183015591517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4282015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4382015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4482015591517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d45909201805461ffff19169290941691909117909255610dd86004611aac565b610de29190611ff7565b604080518881526020810188905290810186905261ffff851660608201527fb7384b884d10e502d2c3f220ac3311470d8c5131a445f6c18e26f2e8f8f4957e906080015b60405180910390a3505050505050565b60065460005b81811015610e5557610e4d8161085a565b600101610e3c565b5050565b60008060068581548110610e6f57610e6f611f92565b60009182526020918290206040805160e081018252600790930290910180546001600160a01b03168352600181015493830193909352600283015490820152600380830154606083015260048301546080830152600583015460a083015260069092015461ffff1660c082015290549091501580610eef57506020810151155b80610efa5750600854155b15610f09576000915050610feb565b828410610f1a576000915050610feb565b80604001518311610f2f576000915050610feb565b80604001518411158015610f47575080606001518311155b15610f63576040810151610f5b9084611ff7565b915050610feb565b80604001518411158015610f7a5750806060015183115b15610f935780604001518160600151610f5b9190611ff7565b806040015184118015610faa575080606001518311155b15610fb957610f5b8484611ff7565b80606001518411158015610fd05750806060015183115b15610fe557838160600151610f5b9190611ff7565b60009150505b9392505050565b6009546001600160a01b031633148061101557506001546001600160a01b031633145b6110315760405162461bcd60e51b81526004016104d69061200a565b678ac7230489e8000081106110795760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a59081c995dd85c9960921b60448201526064016104d6565b60038190556040518181527fa4fda205b298198f8e2513573448542da0f39bbdff6d63026dcf8aea1167f9b5906020015b60405180910390a150565b600954600160a81b900460ff16156110df5760405162461bcd60e51b81526004016104d690611f4c565b6009805460ff60a81b1916600160a81b17905560065460005b818110156111135761110b816000611732565b6001016110f8565b50506009805460ff60a81b19169055565b6009546001600160a01b031633148061114757506001546001600160a01b031633145b6111635760405162461bcd60e51b81526004016104d69061200a565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527fc221fc4c7e5fe6682d7dbb36b97edf0a75127b7ef5c0ffafcbb981689a7bf78b906020016110aa565b6009546001600160a01b03163314806111d457506001546001600160a01b031633145b6111f05760405162461bcd60e51b81526004016104d69061200a565b6111fa6004611aac565b86106112185760405162461bcd60e51b81526004016104d690611f6c565b6107d08261ffff1611156112645760405162461bcd60e51b8152602060048201526013602482015272496e76616c6964204465706f7369742046656560681b60448201526064016104d6565b801561127257611272610e36565b846006878154811061128657611286611f92565b9060005260206000209060070201600101546008546112a59190611ff7565b6112af9190612046565b60088190555084600687815481106112c9576112c9611f92565b90600052602060002090600702016001018190555083600687815481106112f2576112f2611f92565b906000526020600020906007020160020181905550826006878154811061131b5761131b611f92565b906000526020600020906007020160030181905550816006878154811061134457611344611f92565b906000526020600020906007020160060160006101000a81548161ffff021916908361ffff1602179055506006868154811061138257611382611f92565b60009182526020918290206007909102015460408051888152928301879052820185905261ffff841660608301526001600160a01b03169087907fe8ec8a8d34fdcc5d87eb8d57696010c61e86e05c79c0130cdafe5deb3687832190608001610e26565b80156113f5576113f58361085a565b60006006848154811061140a5761140a611f92565b600091825260208220915460405163079cc67960e41b81523360048201526024810187905260079290920290920192506001600160a01b03909116906379cc679090604401600060405180830381600087803b15801561146957600080fd5b505af115801561147d573d6000803e3d6000fd5b505082546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa1580156114cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ef919061202d565b9050806115018564e8d4a51000611fbe565b61150b9190611fd5565b82600501600082825461151e9190612046565b9091555050426004830155600582015460405190815285907f603be601ae49125970c8cc31a0951580e10012f3d56575b6c98996045078b76e90602001610a53565b6000806006848154811061157657611576611f92565b600091825260208083206040805160e081018252600794850290920180546001600160a01b03908116845260018083015485870152600283015485850152600383015460608601526004808401546080870152600584015460a0870190815260069094015461ffff1660c08701528c89529686528388208b8316895286528388208451808601865281548152910154958101959095529051835192516370a0823160e01b8152309681019690965292965092949193919216906370a0823190602401602060405180830381865afa158015611655573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611679919061202d565b9050600061168c88866080015142610e59565b9050811580159061169c57508015155b156116f75760006008548660200151600354846116b99190611fbe565b6116c39190611fbe565b6116cd9190611fd5565b9050826116df8264e8d4a51000611fbe565b6116e99190611fd5565b6116f39085612046565b9350505b6020840151845164e8d4a5100090611710908690611fbe565b61171a9190611fd5565b6117249190611ff7565b955050505050505b92915050565b600954600160a81b900460ff161561175c5760405162461bcd60e51b81526004016104d690611f4c565b6009805460ff60a81b1916600160a81b1790556117796004611aac565b82106117975760405162461bcd60e51b81526004016104d690611f6c565b6000600683815481106117ac576117ac611f92565b600091825260208083208684526007808352604080862033875290935291909320910290910191506117dd8461085a565b805415611888576000816001015464e8d4a51000846005015484600001546118059190611fbe565b61180f9190611fd5565b6118199190611ff7565b90508015611886576000546040516340c10f1960e01b8152336004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b15801561186d57600080fd5b505af1158015611881573d6000803e3d6000fd5b505050505b505b8215611a065781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156118d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118fa919061202d565b8354909150611914906001600160a01b0316333087611b51565b82546040516370a0823160e01b815230600482015282916001600160a01b0316906370a0823190602401602060405180830381865afa15801561195b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197f919061202d565b6119899190611ff7565b600684015490945061ffff16156119eb576006830154600090612710906119b49061ffff1687611fbe565b6119be9190611fd5565b60015485549192506119dd916001600160a01b03908116911683611ab6565b6119e78186611ff7565b9450505b838260000160008282546119ff9190612046565b9091555050505b6005820154815464e8d4a5100091611a1d91611fbe565b611a279190611fd5565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001610b34565b6009546001600160a01b03163314611a8a5760405162461bcd60e51b81526004016104d69061200a565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b600061172c825490565b6040516001600160a01b03838116602483015260448201839052611b1591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611b90565b505050565b6001600160a01b03811660009081526001830160205260408120541515610feb565b6000610feb836001600160a01b038416611bf3565b6040516001600160a01b038481166024830152838116604483015260648201839052611b8a9186918216906323b872dd90608401611ae3565b50505050565b6000611ba56001600160a01b03841683611c42565b90508051600014158015611bca575080806020019051810190611bc89190612059565b155b15611b1557604051635274afe760e01b81526001600160a01b03841660048201526024016104d6565b6000818152600183016020526040812054611c3a5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561172c565b50600061172c565b6060610feb8383600084600080856001600160a01b03168486604051611c689190612076565b60006040518083038185875af1925050503d8060008114611ca5576040519150601f19603f3d011682016040523d82523d6000602084013e611caa565b606091505b5091509150611cba868383611cc4565b9695505050505050565b606082611cd957611cd482611d20565b610feb565b8151158015611cf057506001600160a01b0384163b155b15611d1957604051639996b31560e01b81526001600160a01b03851660048201526024016104d6565b5080610feb565b805115611d305780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b600060208284031215611d5e57600080fd5b5035919050565b80356001600160a01b0381168114611d7c57600080fd5b919050565b600080600060608486031215611d9657600080fd5b611d9f84611d65565b9250611dad60208501611d65565b9150604084013590509250925092565b60008060408385031215611dd057600080fd5b50508035926020909101359150565b803561ffff81168114611d7c57600080fd5b8015158114611d4957600080fd5b60008060008060008060c08789031215611e1857600080fd5b611e2187611d65565b9550602087013594506040870135935060608701359250611e4460808801611ddf565b915060a0870135611e5481611df1565b809150509295509295509295565b600080600060608486031215611e7757600080fd5b505081359360208301359350604090920135919050565b600060208284031215611ea057600080fd5b610feb82611d65565b60008060408385031215611ebc57600080fd5b82359150611ecc60208401611d65565b90509250929050565b60008060008060008060c08789031215611eee57600080fd5b86359550602087013594506040870135935060608701359250611e4460808801611ddf565b600080600060608486031215611f2857600080fd5b83359250602084013591506040840135611f4181611df1565b809150509250925092565b6020808252600690820152651313d0d2d15160d21b604082015260600190565b6020808252600c908201526b125b9d985b1a5908141bdbdb60a21b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761172c5761172c611fa8565b600082611ff257634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561172c5761172c611fa8565b6020808252600990820152682327a92124a22222a760b91b604082015260600190565b60006020828403121561203f57600080fd5b5051919050565b8082018082111561172c5761172c611fa8565b60006020828403121561206b57600080fd5b8151610feb81611df1565b6000825160005b81811015612097576020818601810151858301520161207d565b50600092019182525091905056fea2646970667358221220a84e773fe1c4b8bb0d1e32bc9491f7fca4d11fd9a7384d08a4cf4c6317c0798264736f6c63430008180033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101c35760003560e01c80637bafb029116100f9578063c6d87dd511610097578063d49e77cd11610071578063d49e77cd146103d4578063e2bbb158146103e7578063f2fde38b146103fa578063f7c618c11461040d57600080fd5b8063c6d87dd51461026f578063cda4a5ae146103ae578063d18df53c146103c157600080fd5b80638ed955b9116100d35780638ed955b914610339578063934c19381461034157806393f1a40b14610354578063adc84f9a1461039b57600080fd5b80637bafb029146102e85780638d3aa8bc146102fb5780638da5cb5b1461030e57600080fd5b8063441a3e701161016657806351eb05a61161014057806351eb05a6146102a75780635312ea8e146102ba5780635a01fe1a146102cd578063630b5ba1146102e057600080fd5b8063441a3e701461027857806346143f4c1461028b5780634f41e95d1461029e57600080fd5b80631794bb3c116101a25780631794bb3c1461024857806317caf6f11461025d5780631ba2cbb214610266578063392d2e701461026f57600080fd5b806249d1d4146101c8578063081e3eda146101ea5780631526fe27146101f2575b600080fd5b6101d7678ac7230489e8000081565b6040519081526020015b60405180910390f35b6101d7610420565b610205610200366004611d4c565b610431565b604080516001600160a01b0390981688526020880196909652948601939093526060850191909152608084015260a083015261ffff1660c082015260e0016101e1565b61025b610256366004611d81565b61048e565b005b6101d760085481565b6101d760025481565b6101d76107d081565b61025b610286366004611dbd565b6105e3565b61025b610299366004611d4c565b6107d6565b6101d760035481565b61025b6102b5366004611d4c565b61085a565b61025b6102c8366004611d4c565b610a62565b61025b6102db366004611dff565b610b4f565b61025b610e36565b6101d76102f6366004611e62565b610e59565b61025b610309366004611d4c565b610ff2565b600954610321906001600160a01b031681565b6040516001600160a01b0390911681526020016101e1565b61025b6110b5565b61025b61034f366004611e8e565b611124565b610386610362366004611ea9565b60076020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016101e1565b61025b6103a9366004611ed5565b6111b1565b61025b6103bc366004611f13565b6113e6565b6101d76103cf366004611ea9565b611560565b600154610321906001600160a01b031681565b61025b6103f5366004611dbd565b611732565b61025b610408366004611e8e565b611a60565b600054610321906001600160a01b031681565b600061042c6004611aac565b905090565b6006818154811061044157600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039095169650929491939092919061ffff1687565b600954600160a01b900460ff16156104df5760405162461bcd60e51b815260206004820152600f60248201526e4e6f74496e697469616c697a696e6760881b60448201526064015b60405180910390fd5b678ac7230489e8000081106105275760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a59081c995dd85c9960921b60448201526064016104d6565b600980546001600160a81b0319163317600160a01b179055600080546001600160a01b038581166001600160a01b03199283161790925560018054928516929091168217905560038290556103e86002556040519081527fc221fc4c7e5fe6682d7dbb36b97edf0a75127b7ef5c0ffafcbb981689a7bf78b9060200160405180910390a16040518181527fa4fda205b298198f8e2513573448542da0f39bbdff6d63026dcf8aea1167f9b59060200160405180910390a1505050565b600954600160a81b900460ff161561060d5760405162461bcd60e51b81526004016104d690611f4c565b6009805460ff60a81b1916600160a81b17905561062a6004611aac565b82106106485760405162461bcd60e51b81526004016104d690611f6c565b60006006838154811061065d5761065d611f92565b6000918252602080832086845260078083526040808620338752909352919093209102909101915061068e8461085a565b6000816001015464e8d4a51000846005015484600001546106af9190611fbe565b6106b99190611fd5565b6106c39190611ff7565b90508015610730576000546040516340c10f1960e01b8152336004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b15801561071757600080fd5b505af115801561072b573d6000803e3d6000fd5b505050505b8315610765578382600001600082825461074a9190611ff7565b90915550508254610765906001600160a01b03163386611ab6565b6005830154825464e8d4a510009161077c91611fbe565b6107869190611fd5565b6001830155604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a350506009805460ff60a81b19169055505050565b6009546001600160a01b03163314806107f957506001546001600160a01b031633145b6108155760405162461bcd60e51b81526004016104d69061200a565b6107d081106108555760405162461bcd60e51b815260206004820152600c60248201526b496e76616c6964207261746560a01b60448201526064016104d6565b600255565b60006006828154811061086f5761086f611f92565b6000918252602082206007919091020180546040516370a0823160e01b81523060048201529193506001600160a01b0316906370a0823190602401602060405180830381865afa1580156108c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108eb919061202d565b905060006108fe84846004015442610e59565b905081158061090b575080155b1561091c5750504260049091015550565b60006008548460010154600354846109349190611fbe565b61093e9190611fbe565b6109489190611fd5565b90506002546000146109e8576000546001546002546001600160a01b03928316926340c10f199216906127109061097f9086611fbe565b6109899190611fd5565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156109cf57600080fd5b505af11580156109e3573d6000803e3d6000fd5b505050505b826109f88264e8d4a51000611fbe565b610a029190611fd5565b846005016000828254610a159190612046565b9091555050426004850155600584015460405190815285907f603be601ae49125970c8cc31a0951580e10012f3d56575b6c98996045078b76e906020015b60405180910390a25050505050565b600954600160a81b900460ff1615610a8c5760405162461bcd60e51b81526004016104d690611f4c565b6009805460ff60a81b1916600160a81b179055600680546000919083908110610ab757610ab7611f92565b60009182526020808320858452600780835260408086203380885294528520805486825560018201969096559302018054909450919291610b04916001600160a01b039091169083611ab6565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020015b60405180910390a350506009805460ff60a81b191690555050565b6009546001600160a01b03163314610b795760405162461bcd60e51b81526004016104d69061200a565b610b84600487611b1a565b15610bc35760405162461bcd60e51b815260206004820152600f60248201526e111d5c1b1a58d85d195908141bdbdb608a1b60448201526064016104d6565b6107d08261ffff161115610c0f5760405162461bcd60e51b8152602060048201526013602482015272496e76616c6964204465706f7369742046656560681b60448201526064016104d6565b8015610c1d57610c1d610e36565b8460086000828254610c2f9190612046565b90915550610c409050600487611b3c565b506040805160e0810182526001600160a01b03888116808352602083018981529383018881526060840188815260006080860181815260a0870182815261ffff8b811660c08a0190815260068054600180820183559190965299517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f600790960295860180546001600160a01b03191691909a161790985598517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4084015593517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4183015591517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4282015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4382015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4482015591517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d45909201805461ffff19169290941691909117909255610dd86004611aac565b610de29190611ff7565b604080518881526020810188905290810186905261ffff851660608201527fb7384b884d10e502d2c3f220ac3311470d8c5131a445f6c18e26f2e8f8f4957e906080015b60405180910390a3505050505050565b60065460005b81811015610e5557610e4d8161085a565b600101610e3c565b5050565b60008060068581548110610e6f57610e6f611f92565b60009182526020918290206040805160e081018252600790930290910180546001600160a01b03168352600181015493830193909352600283015490820152600380830154606083015260048301546080830152600583015460a083015260069092015461ffff1660c082015290549091501580610eef57506020810151155b80610efa5750600854155b15610f09576000915050610feb565b828410610f1a576000915050610feb565b80604001518311610f2f576000915050610feb565b80604001518411158015610f47575080606001518311155b15610f63576040810151610f5b9084611ff7565b915050610feb565b80604001518411158015610f7a5750806060015183115b15610f935780604001518160600151610f5b9190611ff7565b806040015184118015610faa575080606001518311155b15610fb957610f5b8484611ff7565b80606001518411158015610fd05750806060015183115b15610fe557838160600151610f5b9190611ff7565b60009150505b9392505050565b6009546001600160a01b031633148061101557506001546001600160a01b031633145b6110315760405162461bcd60e51b81526004016104d69061200a565b678ac7230489e8000081106110795760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a59081c995dd85c9960921b60448201526064016104d6565b60038190556040518181527fa4fda205b298198f8e2513573448542da0f39bbdff6d63026dcf8aea1167f9b5906020015b60405180910390a150565b600954600160a81b900460ff16156110df5760405162461bcd60e51b81526004016104d690611f4c565b6009805460ff60a81b1916600160a81b17905560065460005b818110156111135761110b816000611732565b6001016110f8565b50506009805460ff60a81b19169055565b6009546001600160a01b031633148061114757506001546001600160a01b031633145b6111635760405162461bcd60e51b81526004016104d69061200a565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527fc221fc4c7e5fe6682d7dbb36b97edf0a75127b7ef5c0ffafcbb981689a7bf78b906020016110aa565b6009546001600160a01b03163314806111d457506001546001600160a01b031633145b6111f05760405162461bcd60e51b81526004016104d69061200a565b6111fa6004611aac565b86106112185760405162461bcd60e51b81526004016104d690611f6c565b6107d08261ffff1611156112645760405162461bcd60e51b8152602060048201526013602482015272496e76616c6964204465706f7369742046656560681b60448201526064016104d6565b801561127257611272610e36565b846006878154811061128657611286611f92565b9060005260206000209060070201600101546008546112a59190611ff7565b6112af9190612046565b60088190555084600687815481106112c9576112c9611f92565b90600052602060002090600702016001018190555083600687815481106112f2576112f2611f92565b906000526020600020906007020160020181905550826006878154811061131b5761131b611f92565b906000526020600020906007020160030181905550816006878154811061134457611344611f92565b906000526020600020906007020160060160006101000a81548161ffff021916908361ffff1602179055506006868154811061138257611382611f92565b60009182526020918290206007909102015460408051888152928301879052820185905261ffff841660608301526001600160a01b03169087907fe8ec8a8d34fdcc5d87eb8d57696010c61e86e05c79c0130cdafe5deb3687832190608001610e26565b80156113f5576113f58361085a565b60006006848154811061140a5761140a611f92565b600091825260208220915460405163079cc67960e41b81523360048201526024810187905260079290920290920192506001600160a01b03909116906379cc679090604401600060405180830381600087803b15801561146957600080fd5b505af115801561147d573d6000803e3d6000fd5b505082546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa1580156114cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ef919061202d565b9050806115018564e8d4a51000611fbe565b61150b9190611fd5565b82600501600082825461151e9190612046565b9091555050426004830155600582015460405190815285907f603be601ae49125970c8cc31a0951580e10012f3d56575b6c98996045078b76e90602001610a53565b6000806006848154811061157657611576611f92565b600091825260208083206040805160e081018252600794850290920180546001600160a01b03908116845260018083015485870152600283015485850152600383015460608601526004808401546080870152600584015460a0870190815260069094015461ffff1660c08701528c89529686528388208b8316895286528388208451808601865281548152910154958101959095529051835192516370a0823160e01b8152309681019690965292965092949193919216906370a0823190602401602060405180830381865afa158015611655573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611679919061202d565b9050600061168c88866080015142610e59565b9050811580159061169c57508015155b156116f75760006008548660200151600354846116b99190611fbe565b6116c39190611fbe565b6116cd9190611fd5565b9050826116df8264e8d4a51000611fbe565b6116e99190611fd5565b6116f39085612046565b9350505b6020840151845164e8d4a5100090611710908690611fbe565b61171a9190611fd5565b6117249190611ff7565b955050505050505b92915050565b600954600160a81b900460ff161561175c5760405162461bcd60e51b81526004016104d690611f4c565b6009805460ff60a81b1916600160a81b1790556117796004611aac565b82106117975760405162461bcd60e51b81526004016104d690611f6c565b6000600683815481106117ac576117ac611f92565b600091825260208083208684526007808352604080862033875290935291909320910290910191506117dd8461085a565b805415611888576000816001015464e8d4a51000846005015484600001546118059190611fbe565b61180f9190611fd5565b6118199190611ff7565b90508015611886576000546040516340c10f1960e01b8152336004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b15801561186d57600080fd5b505af1158015611881573d6000803e3d6000fd5b505050505b505b8215611a065781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156118d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118fa919061202d565b8354909150611914906001600160a01b0316333087611b51565b82546040516370a0823160e01b815230600482015282916001600160a01b0316906370a0823190602401602060405180830381865afa15801561195b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197f919061202d565b6119899190611ff7565b600684015490945061ffff16156119eb576006830154600090612710906119b49061ffff1687611fbe565b6119be9190611fd5565b60015485549192506119dd916001600160a01b03908116911683611ab6565b6119e78186611ff7565b9450505b838260000160008282546119ff9190612046565b9091555050505b6005820154815464e8d4a5100091611a1d91611fbe565b611a279190611fd5565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001610b34565b6009546001600160a01b03163314611a8a5760405162461bcd60e51b81526004016104d69061200a565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b600061172c825490565b6040516001600160a01b03838116602483015260448201839052611b1591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611b90565b505050565b6001600160a01b03811660009081526001830160205260408120541515610feb565b6000610feb836001600160a01b038416611bf3565b6040516001600160a01b038481166024830152838116604483015260648201839052611b8a9186918216906323b872dd90608401611ae3565b50505050565b6000611ba56001600160a01b03841683611c42565b90508051600014158015611bca575080806020019051810190611bc89190612059565b155b15611b1557604051635274afe760e01b81526001600160a01b03841660048201526024016104d6565b6000818152600183016020526040812054611c3a5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561172c565b50600061172c565b6060610feb8383600084600080856001600160a01b03168486604051611c689190612076565b60006040518083038185875af1925050503d8060008114611ca5576040519150601f19603f3d011682016040523d82523d6000602084013e611caa565b606091505b5091509150611cba868383611cc4565b9695505050505050565b606082611cd957611cd482611d20565b610feb565b8151158015611cf057506001600160a01b0384163b155b15611d1957604051639996b31560e01b81526001600160a01b03851660048201526024016104d6565b5080610feb565b805115611d305780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b600060208284031215611d5e57600080fd5b5035919050565b80356001600160a01b0381168114611d7c57600080fd5b919050565b600080600060608486031215611d9657600080fd5b611d9f84611d65565b9250611dad60208501611d65565b9150604084013590509250925092565b60008060408385031215611dd057600080fd5b50508035926020909101359150565b803561ffff81168114611d7c57600080fd5b8015158114611d4957600080fd5b60008060008060008060c08789031215611e1857600080fd5b611e2187611d65565b9550602087013594506040870135935060608701359250611e4460808801611ddf565b915060a0870135611e5481611df1565b809150509295509295509295565b600080600060608486031215611e7757600080fd5b505081359360208301359350604090920135919050565b600060208284031215611ea057600080fd5b610feb82611d65565b60008060408385031215611ebc57600080fd5b82359150611ecc60208401611d65565b90509250929050565b60008060008060008060c08789031215611eee57600080fd5b86359550602087013594506040870135935060608701359250611e4460808801611ddf565b600080600060608486031215611f2857600080fd5b83359250602084013591506040840135611f4181611df1565b809150509250925092565b6020808252600690820152651313d0d2d15160d21b604082015260600190565b6020808252600c908201526b125b9d985b1a5908141bdbdb60a21b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761172c5761172c611fa8565b600082611ff257634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561172c5761172c611fa8565b6020808252600990820152682327a92124a22222a760b91b604082015260600190565b60006020828403121561203f57600080fd5b5051919050565b8082018082111561172c5761172c611fa8565b60006020828403121561206b57600080fd5b8151610feb81611df1565b6000825160005b81811015612097576020818601810151858301520161207d565b50600092019182525091905056fea2646970667358221220a84e773fe1c4b8bb0d1e32bc9491f7fca4d11fd9a7384d08a4cf4c6317c0798264736f6c63430008180033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.