Contract
0xEC91B2808Ab778d8900634FD2811fD0Be07D9774
1
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Contract Name:
MasterChefV2
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./libs/IBEP20.sol"; import "./libs/SafeBEP20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./Token.sol"; // MasterChef is the master of Token. He can make Token and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once Token is sufficiently // distributed and the community can show to govern itself. // // Have fun reading it. Hopefully it's bug-free. God bless. contract MasterChefV2 is Ownable, ReentrancyGuard { using SafeMath for uint256; using SafeBEP20 for IBEP20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do some fancy math here. Basically, any point in time, the amount of Tokens // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accTokenPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens: // 1. The pool's `accTokenPerShare` (and `lastRewardTime`) 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. } // Info of each pool. struct PoolInfo { IBEP20 lpToken; // Address of LP token contract. uint256 allocPoint; // How many allocation points assigned to this pool. Tokens to distribute per second. uint256 lastRewardTime; // Last timestamp that Tokens distribution occurs. uint256 accTokenPerShare; // Accumulated Tokens per share, times 1e12. See below. uint16 withdrawFeeBP; // Deposit fee in basis points } // The TOKEN! Token public token; // Maximum emission rate uint256 public maxEmissionRate = 1 ether; // Dev address. address public devaddr; // Token tokens created per second. uint256 public tokenPerSecond; // Deposit Fee address address public feeAddress; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The timestamp when Token mining starts. uint256 public startTimestamp; 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 SetFeeAddress(address indexed user, address indexed newAddress); event SetDevAddress(address indexed user, address indexed newAddress); event UpdateEmissionRate(address indexed user, uint256 tokenPerSecond); event AddPool(uint256 pid, address lp, uint256 allocPoint, uint256 fee); event SetPool(uint256 pid, uint256 allocPoint, uint256 fee); event SetStartTime(uint256 startTime); constructor( address _devaddr, address _feeAddress, Token _token, uint256 _tokenPerSecond, uint256 _startTimestamp ) { require(_feeAddress != address(0), "no zero address"); require(_devaddr != address(0), "no zero address"); token = _token; devaddr = _devaddr; feeAddress = _feeAddress; tokenPerSecond = _tokenPerSecond; startTimestamp = _startTimestamp; } function poolLength() external view returns (uint256) { return poolInfo.length; } mapping(IBEP20 => bool) public poolExistence; modifier nonDuplicated(IBEP20 _lpToken) { require(poolExistence[_lpToken] == false, "nonDuplicated: duplicated"); _; } // Add a new lp to the pool. Can only be called by the owner. function add(uint256 _allocPoint, IBEP20 _lpToken, uint16 _withdrawFeeBP, bool _withUpdate) external onlyOwner nonDuplicated(_lpToken) { require(_withdrawFeeBP <= 400, "add: invalid deposit fee basis points"); if (_withUpdate) { massUpdatePools(); } // balanceOf check // this should be works fine if address is a token uint256 balance = _lpToken.balanceOf(address(this)); uint256 lastRewardTime = block.timestamp > startTimestamp ? block.timestamp : startTimestamp; totalAllocPoint = totalAllocPoint.add(_allocPoint); poolExistence[_lpToken] = true; poolInfo.push(PoolInfo({ lpToken : _lpToken, allocPoint : _allocPoint, lastRewardTime : lastRewardTime, accTokenPerShare : 0, withdrawFeeBP : _withdrawFeeBP })); emit AddPool(poolInfo.length.sub(1), address(_lpToken), _allocPoint, _withdrawFeeBP); } // Update the given pool's Token allocation point and deposit fee. Can only be called by the owner. function set(uint256 _pid, uint256 _allocPoint, uint16 _withdrawFeeBP, bool _withUpdate) external onlyOwner { require(_withdrawFeeBP <= 400, "add: invalid withdrawal fee basis points"); if (_withUpdate) { massUpdatePools(); } totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint); poolInfo[_pid].allocPoint = _allocPoint; poolInfo[_pid].withdrawFeeBP = _withdrawFeeBP; emit SetPool(_pid, _allocPoint, _withdrawFeeBP); } // Return reward multiplier over the given _from to _to block. function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) { return _to.sub(_from); } // View function to see pending Tokens on frontend. function pendingToken(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accTokenPerShare = pool.accTokenPerShare; uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (lpSupply == 0 || totalAllocPoint == 0) return 0; if (block.timestamp > pool.lastRewardTime && lpSupply != 0) { uint256 multiplier = getMultiplier(pool.lastRewardTime, block.timestamp); uint256 tokenReward = multiplier.mul(tokenPerSecond).mul(pool.allocPoint).div(totalAllocPoint); accTokenPerShare = accTokenPerShare.add(tokenReward.mul(1e12).div(lpSupply)); } return user.amount.mul(accTokenPerShare).div(1e12).sub(user.rewardDebt); } // 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); } } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; if (block.timestamp <= pool.lastRewardTime) { return; } uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (lpSupply == 0 || pool.allocPoint == 0) { pool.lastRewardTime = block.timestamp; return; } uint256 multiplier = getMultiplier(pool.lastRewardTime, block.timestamp); uint256 tokenReward = multiplier.mul(tokenPerSecond).mul(pool.allocPoint).div(totalAllocPoint); token.mint(devaddr, tokenReward.div(10)); token.mint(address(this), tokenReward); uint256 burnAmount = tokenReward.mul(5).div(100); safeTokenTransfer(0x000000000000000000000000000000000000dEaD, burnAmount); tokenReward = tokenReward.sub(burnAmount); pool.accTokenPerShare = pool.accTokenPerShare.add(tokenReward.mul(1e12).div(lpSupply)); pool.lastRewardTime = block.timestamp; } // Deposit LP tokens to MasterChef for Token allocation. function deposit(uint256 _pid, uint256 _amount) external nonReentrant { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; updatePool(_pid); if (user.amount > 0) { uint256 pending = user.amount.mul(pool.accTokenPerShare).div(1e12).sub(user.rewardDebt); if (pending > 0) { safeTokenTransfer(msg.sender, pending); } } if (_amount > 0) { uint256 balanceBefore = pool.lpToken.balanceOf(address(this)); pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount); uint256 finalAmount = pool.lpToken.balanceOf(address(this)).sub(balanceBefore); user.amount = user.amount.add(finalAmount); } user.rewardDebt = user.amount.mul(pool.accTokenPerShare).div(1e12); emit Deposit(msg.sender, _pid, _amount); } // Withdraw LP tokens from MasterChef. function withdraw(uint256 _pid, uint256 _amount) external nonReentrant { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; require(user.amount >= _amount, "withdraw: not good"); updatePool(_pid); uint256 pending = user.amount.mul(pool.accTokenPerShare).div(1e12).sub(user.rewardDebt); if (pending > 0) { safeTokenTransfer(msg.sender, pending); } if (_amount > 0) { user.amount = user.amount.sub(_amount); uint256 fee = 0; if (pool.withdrawFeeBP > 0) { fee = _amount.mul(pool.withdrawFeeBP).div(10000); pool.lpToken.safeTransfer(feeAddress, fee); } pool.lpToken.safeTransfer(address(msg.sender), _amount.sub(fee)); } user.rewardDebt = user.amount.mul(pool.accTokenPerShare).div(1e12); emit Withdraw(msg.sender, _pid, _amount); } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) external nonReentrant { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; uint256 fee = 0; uint256 amount = user.amount; user.amount = 0; user.rewardDebt = 0; if (pool.withdrawFeeBP > 0) { fee = amount.mul(pool.withdrawFeeBP).div(10000); amount = amount.sub(fee); pool.lpToken.safeTransfer(feeAddress, fee); } pool.lpToken.safeTransfer(msg.sender, amount); emit EmergencyWithdraw(msg.sender, _pid, amount); } // Safe token transfer function, just in case if rounding error causes pool to not have enough Tokens. function safeTokenTransfer(address _to, uint256 _amount) internal { uint256 tokenBal = token.balanceOf(address(this)); bool transferSuccess = false; if (_amount > tokenBal) { transferSuccess = token.transfer(_to, tokenBal); } else { transferSuccess = token.transfer(_to, _amount); } require(transferSuccess, "safeTokenTransfer: transfer failed"); } // Update dev address by the previous dev. function setDevAddress(address _devaddr) external { require(msg.sender == devaddr, "dev: wut?"); require(_devaddr != address(0), "no zero address"); devaddr = _devaddr; emit SetDevAddress(msg.sender, _devaddr); } function setFeeAddress(address _feeAddress) external { require(msg.sender == feeAddress, "setFeeAddress: FORBIDDEN"); require(_feeAddress != address(0), "no zero address"); feeAddress = _feeAddress; emit SetFeeAddress(msg.sender, _feeAddress); } //Pancake has to add hidden dummy pools inorder to alter the emission, here we make it simple and transparent to all. function updateEmissionRate(uint256 _tokenPerSecond) external onlyOwner { require(_tokenPerSecond <= 1 ether, "Maximum exceeded"); massUpdatePools(); tokenPerSecond = _tokenPerSecond; emit UpdateEmissionRate(msg.sender, _tokenPerSecond); } function setStartTime(uint256 _startTimestamp) external onlyOwner { require(block.timestamp < startTimestamp, "It's too late to postpone mining. It has already started"); require(_startTimestamp > startTimestamp, "Cannot set to past timestamp"); startTimestamp = _startTimestamp; uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { poolInfo[pid].lastRewardTime = _startTimestamp; } emit SetStartTime(_startTimestamp); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.0; import "./IBEP20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; /** * @title SafeBEP20 * @dev Wrappers around BEP20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeBEP20 for IBEP20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeBEP20 { using SafeMath for uint256; using Address for address; function safeTransfer(IBEP20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IBEP20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IBEP20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IBEP20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeBEP20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IBEP20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IBEP20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeBEP20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IBEP20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeBEP20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeBEP20: BEP20 operation did not succeed"); } } }
pragma solidity 0.8.0; interface IBEP20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the token name. */ function name() external view returns (string memory); /** * @dev Returns the bep token owner. */ function getOwner() external view returns (address); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address _owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import './IBEP20.sol'; import '@openzeppelin/contracts/utils/math/SafeMath.sol'; /** * @dev Implementation of the {IBEP20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {BEP20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-BEP20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of BEP20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IBEP20-approve}. */ contract BEP20 is Context, IBEP20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor(string memory name, string memory symbol) public { _name = name; _symbol = symbol; _decimals = 18; } /** * @dev Returns the bep token owner. */ function getOwner() external override view returns (address) { return owner(); } /** * @dev Returns the name of the token. */ function name() public override view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public override view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. */ function decimals() public override view returns (uint8) { return _decimals; } /** * @dev See {BEP20-totalSupply}. */ function totalSupply() public override view returns (uint256) { return _totalSupply; } /** * @dev See {BEP20-balanceOf}. */ function balanceOf(address account) public override view returns (uint256) { return _balances[account]; } /** * @dev See {BEP20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {BEP20-allowance}. */ function allowance(address owner, address spender) public override view returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {BEP20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {BEP20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {BEP20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for `sender`'s tokens of at least * `amount`. */ function transferFrom (address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, 'BEP20: transfer amount exceeds allowance') ); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {BEP20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {BEP20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, 'BEP20: decreased allowance below zero')); return true; } /** * @dev Creates `amount` tokens and assigns them to `msg.sender`, increasing * the total supply. * * Requirements * * - `msg.sender` must be the token owner */ function mint(uint256 amount) public onlyOwner returns (bool) { _mint(_msgSender(), amount); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer (address sender, address recipient, uint256 amount) virtual internal { require(sender != address(0), 'BEP20: transfer from the zero address'); require(recipient != address(0), 'BEP20: transfer to the zero address'); _balances[sender] = _balances[sender].sub(amount, 'BEP20: transfer amount exceeds balance'); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal { require(account != address(0), 'BEP20: mint to the zero address'); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal { require(account != address(0), 'BEP20: burn from the zero address'); _balances[account] = _balances[account].sub(amount, 'BEP20: burn amount exceeds balance'); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve (address owner, address spender, uint256 amount) internal { require(owner != address(0), 'BEP20: approve from the zero address'); require(spender != address(0), 'BEP20: approve to the zero address'); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Destroys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See {_burn} and {_approve}. */ function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, 'BEP20: burn amount exceeds allowance')); } }
pragma solidity 0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "./libs/BEP20.sol"; contract Token is BEP20('ICUBE', 'ICUBE') { using SafeMath for uint256; // Burn address address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD; // The operator can only update the transfer tax rate address private _operator; // Events event OperatorTransferred(address indexed previousOperator, address indexed newOperator); modifier onlyOperator() { require(_operator == msg.sender, "operator: caller is not the operator"); _; } /** * @notice Constructs the Token contract. */ constructor() { _operator = _msgSender(); emit OperatorTransferred(address(0), _operator); } /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); } // To receive MATIC from swapRouter when swapping receive() external payable {} /** * @dev Returns the address of the current operator. */ function operator() public view returns (address) { return _operator; } /** * @dev Transfers operator of the contract to a new account (`newOperator`). * Can only be called by the current operator. */ function transferOperator(address newOperator) public onlyOperator { require(newOperator != address(0), "TMGO::transferOperator: new operator is the zero address"); emit OperatorTransferred(_operator, newOperator); _operator = newOperator; } function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) { require(n < 2**32, errorMessage); return uint32(n); } function getChainId() internal view returns (uint256) { uint256 chainId; assembly { chainId := chainid() } return chainId; } }
pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
[{"inputs":[{"internalType":"address","name":"_devaddr","type":"address"},{"internalType":"address","name":"_feeAddress","type":"address"},{"internalType":"contract Token","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokenPerSecond","type":"uint256"},{"internalType":"uint256","name":"_startTimestamp","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"address","name":"lp","type":"address"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"AddPool","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":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"SetDevAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"SetFeeAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SetPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"SetStartTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenPerSecond","type":"uint256"}],"name":"UpdateEmissionRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IBEP20","name":"_lpToken","type":"address"},{"internalType":"uint16","name":"_withdrawFeeBP","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"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","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":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxEmissionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"name":"poolExistence","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IBEP20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accTokenPerShare","type":"uint256"},{"internalType":"uint16","name":"withdrawFeeBP","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint16","name":"_withdrawFeeBP","type":"uint16"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devaddr","type":"address"}],"name":"setDevAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTimestamp","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract Token","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenPerSecond","type":"uint256"}],"name":"updateEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","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
6080604052670de0b6b3a764000060035560006009553480156200002257600080fd5b506040516200411a3803806200411a833981810160405281019062000048919062000342565b620000686200005c6200023160201b60201c565b6200023960201b60201c565b60018081905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415620000e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000d99062000406565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141562000155576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200014c9062000406565b60405180910390fd5b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160058190555080600a819055505050505050620004ed565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000815190506200030e816200049f565b92915050565b6000815190506200032581620004b9565b92915050565b6000815190506200033c81620004d3565b92915050565b600080600080600060a086880312156200035b57600080fd5b60006200036b88828901620002fd565b95505060206200037e88828901620002fd565b9450506040620003918882890162000314565b9350506060620003a4888289016200032b565b9250506080620003b7888289016200032b565b9150509295509295909350565b6000620003d3600f8362000428565b91507f6e6f207a65726f206164647265737300000000000000000000000000000000006000830152602082019050919050565b600060208201905081810360008301526200042181620003c4565b9050919050565b600082825260208201905092915050565b6000620004468262000475565b9050919050565b60006200045a8262000475565b9050919050565b60006200046e826200044d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b620004aa8162000439565b8114620004b657600080fd5b50565b620004c48162000461565b8114620004d057600080fd5b50565b620004de8162000495565b8114620004ea57600080fd5b50565b613c1d80620004fd6000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c8063715018a6116100f9578063d0d41fe111610097578063e2bbb15811610071578063e2bbb15814610485578063e6fd48bc146104a1578063f2fde38b146104bf578063fc0c546a146104db576101a9565b8063d0d41fe11461042f578063d49e77cd1461044b578063d963842214610469576101a9565b80638da5cb5b116100d35780638da5cb5b146103805780638dbb1e3a1461039e57806393f1a40b146103ce578063cbd258b5146103ff576101a9565b8063715018a61461033e57806384e82a33146103485780638705fcd414610364576101a9565b8063412753581161016657806351eb05a61161014057806351eb05a6146102de5780635312ea8e146102fa5780635fa7b83f14610316578063630b5ba114610334576101a9565b80634127535814610274578063441a3e701461029257806348e43af4146102ae576101a9565b8063081e3eda146101ae5780630ba84cd2146101cc578063142fc582146101e85780631526fe271461020657806317caf6f11461023a5780633e0a322d14610258575b600080fd5b6101b66104f9565b6040516101c391906137c0565b60405180910390f35b6101e660048036038101906101e19190612cb6565b610506565b005b6101f061062d565b6040516101fd91906137c0565b60405180910390f35b610220600480360381019061021b9190612cb6565b610633565b604051610231959493929190613510565b60405180910390f35b6102426106a7565b60405161024f91906137c0565b60405180910390f35b610272600480360381019061026d9190612cb6565b6106ad565b005b61027c61086a565b604051610289919061347a565b60405180910390f35b6102ac60048036038101906102a79190612da7565b610890565b005b6102c860048036038101906102c39190612d08565b610c21565b6040516102d591906137c0565b60405180910390f35b6102f860048036038101906102f39190612cb6565b610e9f565b005b610314600480360381019061030f9190612cb6565b611223565b005b61031e6114c0565b60405161032b91906137c0565b60405180910390f35b61033c6114c6565b005b6103466114f9565b005b610362600480360381019061035d9190612d44565b611581565b005b61037e60048036038101906103799190612c3b565b611955565b005b610388611af3565b604051610395919061347a565b60405180910390f35b6103b860048036038101906103b39190612da7565b611b1c565b6040516103c591906137c0565b60405180910390f35b6103e860048036038101906103e39190612d08565b611b39565b6040516103f6929190613820565b60405180910390f35b61041960048036038101906104149190612c8d565b611b6a565b60405161042691906134f5565b60405180910390f35b61044960048036038101906104449190612c3b565b611b8a565b005b610453611d28565b604051610460919061347a565b60405180910390f35b610483600480360381019061047e9190612de3565b611d4e565b005b61049f600480360381019061049a9190612da7565b611f91565b005b6104a961237d565b6040516104b691906137c0565b60405180910390f35b6104d960048036038101906104d49190612c3b565b612383565b005b6104e361247b565b6040516104f09190613563565b60405180910390f35b6000600780549050905090565b61050e6124a1565b73ffffffffffffffffffffffffffffffffffffffff1661052c611af3565b73ffffffffffffffffffffffffffffffffffffffff1614610582576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610579906136e0565b60405180910390fd5b670de0b6b3a76400008111156105cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c490613660565b60405180910390fd5b6105d56114c6565b806005819055503373ffffffffffffffffffffffffffffffffffffffff167fe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c40538260405161062291906137c0565b60405180910390a250565b60035481565b6007818154811061064357600080fd5b90600052602060002090600502016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154908060030154908060040160009054906101000a900461ffff16905085565b60095481565b6106b56124a1565b73ffffffffffffffffffffffffffffffffffffffff166106d3611af3565b73ffffffffffffffffffffffffffffffffffffffff1614610729576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610720906136e0565b60405180910390fd5b600a54421061076d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610764906137a0565b60405180910390fd5b600a5481116107b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a890613620565b60405180910390fd5b80600a819055506000600780549050905060005b8181101561082e578260078281548110610808577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201600201819055508061082790613abc565b90506107c5565b507f191dde3e99ae398f28f0457d7346866a4fa04805ac0b57190b944935b5aa75508260405161085e91906137c0565b60405180910390a15050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260015414156108d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108cd90613780565b60405180910390fd5b600260018190555060006007838154811061091a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201905060006008600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905082816000015410156109c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109bc90613720565b60405180910390fd5b6109ce84610e9f565b6000610a188260010154610a0a64e8d4a510006109fc876003015487600001546124a990919063ffffffff16565b6124bf90919063ffffffff16565b6124d590919063ffffffff16565b90506000811115610a2e57610a2d33826124eb565b5b6000841115610b8a57610a4e8483600001546124d590919063ffffffff16565b82600001819055506000808460040160009054906101000a900461ffff1661ffff161115610b2757610ab3612710610aa58660040160009054906101000a900461ffff1661ffff16886124a990919063ffffffff16565b6124bf90919063ffffffff16565b9050610b26600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828660000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166127529092919063ffffffff16565b5b610b8833610b3e83886124d590919063ffffffff16565b8660000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166127529092919063ffffffff16565b505b610bbc64e8d4a51000610bae856003015485600001546124a990919063ffffffff16565b6124bf90919063ffffffff16565b8260010181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56886604051610c0b91906137c0565b60405180910390a3505050600180819055505050565b60008060078481548110610c5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201905060006008600086815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008260030154905060008360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610d2a919061347a565b60206040518083038186803b158015610d4257600080fd5b505afa158015610d56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7a9190612cdf565b90506000811480610d8d57506000600954145b15610d9f576000945050505050610e99565b836002015442118015610db3575060008114155b15610e4e576000610dc8856002015442611b1c565b90506000610e0b600954610dfd8860010154610def600554876124a990919063ffffffff16565b6124a990919063ffffffff16565b6124bf90919063ffffffff16565b9050610e49610e3a84610e2c64e8d4a51000856124a990919063ffffffff16565b6124bf90919063ffffffff16565b856127d890919063ffffffff16565b935050505b610e928360010154610e8464e8d4a51000610e768688600001546124a990919063ffffffff16565b6124bf90919063ffffffff16565b6124d590919063ffffffff16565b9450505050505b92915050565b600060078281548110610edb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201905080600201544211610efc5750611220565b60008160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610f5b919061347a565b60206040518083038186803b158015610f7357600080fd5b505afa158015610f87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fab9190612cdf565b90506000811480610fc0575060008260010154145b15610fd5574282600201819055505050611220565b6000610fe5836002015442611b1c565b9050600061102860095461101a866001015461100c600554876124a990919063ffffffff16565b6124a990919063ffffffff16565b6124bf90919063ffffffff16565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f19600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661109f600a856124bf90919063ffffffff16565b6040518363ffffffff1660e01b81526004016110bc9291906134cc565b600060405180830381600087803b1580156110d657600080fd5b505af11580156110ea573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b815260040161114b9291906134cc565b600060405180830381600087803b15801561116557600080fd5b505af1158015611179573d6000803e3d6000fd5b5050505060006111a660646111986005856124a990919063ffffffff16565b6124bf90919063ffffffff16565b90506111b461dead826124eb565b6111c781836124d590919063ffffffff16565b91506112096111f6856111e864e8d4a51000866124a990919063ffffffff16565b6124bf90919063ffffffff16565b86600301546127d890919063ffffffff16565b856003018190555042856002018190555050505050505b50565b60026001541415611269576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126090613780565b60405180910390fd5b60026001819055506000600782815481106112ad577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201905060006008600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008082600001549050600083600001819055506000836001018190555060008460040160009054906101000a900461ffff1661ffff1611156114145761138b61271061137d8660040160009054906101000a900461ffff1661ffff16846124a990919063ffffffff16565b6124bf90919063ffffffff16565b91506113a082826124d590919063ffffffff16565b9050611413600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838660000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166127529092919063ffffffff16565b5b61146333828660000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166127529092919063ffffffff16565b843373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595836040516114aa91906137c0565b60405180910390a3505050506001808190555050565b60055481565b6000600780549050905060005b818110156114f5576114e481610e9f565b806114ee90613abc565b90506114d3565b5050565b6115016124a1565b73ffffffffffffffffffffffffffffffffffffffff1661151f611af3565b73ffffffffffffffffffffffffffffffffffffffff1614611575576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156c906136e0565b60405180910390fd5b61157f60006127ee565b565b6115896124a1565b73ffffffffffffffffffffffffffffffffffffffff166115a7611af3565b73ffffffffffffffffffffffffffffffffffffffff16146115fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115f4906136e0565b60405180910390fd5b8260001515600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168890613740565b60405180910390fd5b6101908361ffff1611156116da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d1906135a0565b60405180910390fd5b81156116e9576116e86114c6565b5b60008473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611724919061347a565b60206040518083038186803b15801561173c57600080fd5b505afa158015611750573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117749190612cdf565b90506000600a54421161178957600a5461178b565b425b90506117a2876009546127d890919063ffffffff16565b6009819055506001600b60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060076040518060a001604052808873ffffffffffffffffffffffffffffffffffffffff168152602001898152602001838152602001600081526020018761ffff16815250908060018154018082558091505060019003906000526020600020906005020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548161ffff021916908361ffff16021790555050507fa69d86e67bfa14ad558a2599f0df3af0dff00c36be738f9118440420f1c2706761193160016007805490506124d590919063ffffffff16565b87898860405161194494939291906137db565b60405180910390a150505050505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146119e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119dc90613760565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4c90613600565b60405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f760405160405180910390a350565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000611b3183836124d590919063ffffffff16565b905092915050565b6008602052816000526040600020602052806000526040600020600091509150508060000154908060010154905082565b600b6020528060005260406000206000915054906101000a900460ff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c11906136c0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c8190613600565b60405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e760405160405180910390a350565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611d566124a1565b73ffffffffffffffffffffffffffffffffffffffff16611d74611af3565b73ffffffffffffffffffffffffffffffffffffffff1614611dca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dc1906136e0565b60405180910390fd5b6101908261ffff161115611e13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e0a906136a0565b60405180910390fd5b8015611e2257611e216114c6565b5b611e9483611e8660078781548110611e63577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201600101546009546124d590919063ffffffff16565b6127d890919063ffffffff16565b6009819055508260078581548110611ed5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201600101819055508160078581548110611f25577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906005020160040160006101000a81548161ffff021916908361ffff1602179055507f17cb2943c2b75826e10c84d8d48b9953b663936eb40867b23dfe8f4930b98686848484604051611f8393929190613849565b60405180910390a150505050565b60026001541415611fd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fce90613780565b60405180910390fd5b600260018190555060006007838154811061201b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201905060006008600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905061208884610e9f565b6000816000015411156120f75760006120df82600101546120d164e8d4a510006120c3876003015487600001546124a990919063ffffffff16565b6124bf90919063ffffffff16565b6124d590919063ffffffff16565b905060008111156120f5576120f433826124eb565b5b505b60008311156122e75760008260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161215f919061347a565b60206040518083038186803b15801561217757600080fd5b505afa15801561218b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121af9190612cdf565b90506122023330868660000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166128b2909392919063ffffffff16565b60006122c3828560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401612265919061347a565b60206040518083038186803b15801561227d57600080fd5b505afa158015612291573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b59190612cdf565b6124d590919063ffffffff16565b90506122dc8184600001546127d890919063ffffffff16565b836000018190555050505b61231964e8d4a5100061230b846003015484600001546124a990919063ffffffff16565b6124bf90919063ffffffff16565b8160010181905550833373ffffffffffffffffffffffffffffffffffffffff167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a158560405161236891906137c0565b60405180910390a35050600180819055505050565b600a5481565b61238b6124a1565b73ffffffffffffffffffffffffffffffffffffffff166123a9611af3565b73ffffffffffffffffffffffffffffffffffffffff16146123ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123f6906136e0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561246f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612466906135e0565b60405180910390fd5b612478816127ee565b50565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b600081836124b79190613939565b905092915050565b600081836124cd9190613908565b905092915050565b600081836124e39190613993565b905092915050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401612548919061347a565b60206040518083038186803b15801561256057600080fd5b505afa158015612574573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125989190612cdf565b905060008183111561265a57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85846040518363ffffffff1660e01b81526004016126019291906134cc565b602060405180830381600087803b15801561261b57600080fd5b505af115801561262f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126539190612c64565b905061270c565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b81526004016126b79291906134cc565b602060405180830381600087803b1580156126d157600080fd5b505af11580156126e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127099190612c64565b90505b8061274c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161274390613680565b60405180910390fd5b50505050565b6127d38363a9059cbb60e01b84846040516024016127719291906134cc565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061293b565b505050565b600081836127e691906138b2565b905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612935846323b872dd60e01b8585856040516024016128d393929190613495565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061293b565b50505050565b600061299d826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612a029092919063ffffffff16565b90506000815111156129fd57808060200190518101906129bd9190612c64565b6129fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129f3906135c0565b60405180910390fd5b5b505050565b6060612a118484600085612a1a565b90509392505050565b606082471015612a5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a5690613640565b60405180910390fd5b612a6885612b2e565b612aa7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a9e90613700565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612ad09190613463565b60006040518083038185875af1925050503d8060008114612b0d576040519150601f19603f3d011682016040523d82523d6000602084013e612b12565b606091505b5091509150612b22828286612b41565b92505050949350505050565b600080823b905060008111915050919050565b60608315612b5157829050612ba1565b600083511115612b645782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b98919061357e565b60405180910390fd5b9392505050565b600081359050612bb781613b74565b92915050565b600081359050612bcc81613b8b565b92915050565b600081519050612be181613b8b565b92915050565b600081359050612bf681613ba2565b92915050565b600081359050612c0b81613bb9565b92915050565b600081359050612c2081613bd0565b92915050565b600081519050612c3581613bd0565b92915050565b600060208284031215612c4d57600080fd5b6000612c5b84828501612ba8565b91505092915050565b600060208284031215612c7657600080fd5b6000612c8484828501612bd2565b91505092915050565b600060208284031215612c9f57600080fd5b6000612cad84828501612be7565b91505092915050565b600060208284031215612cc857600080fd5b6000612cd684828501612c11565b91505092915050565b600060208284031215612cf157600080fd5b6000612cff84828501612c26565b91505092915050565b60008060408385031215612d1b57600080fd5b6000612d2985828601612c11565b9250506020612d3a85828601612ba8565b9150509250929050565b60008060008060808587031215612d5a57600080fd5b6000612d6887828801612c11565b9450506020612d7987828801612be7565b9350506040612d8a87828801612bfc565b9250506060612d9b87828801612bbd565b91505092959194509250565b60008060408385031215612dba57600080fd5b6000612dc885828601612c11565b9250506020612dd985828601612c11565b9150509250929050565b60008060008060808587031215612df957600080fd5b6000612e0787828801612c11565b9450506020612e1887828801612c11565b9350506040612e2987828801612bfc565b9250506060612e3a87828801612bbd565b91505092959194509250565b612e4f816139c7565b82525050565b612e5e816139d9565b82525050565b6000612e6f82613880565b612e798185613896565b9350612e89818560208601613a89565b80840191505092915050565b612e9e81613a2f565b82525050565b612ead81613a53565b82525050565b6000612ebe8261388b565b612ec881856138a1565b9350612ed8818560208601613a89565b612ee181613b63565b840191505092915050565b6000612ef96025836138a1565b91507f6164643a20696e76616c6964206465706f73697420666565206261736973207060008301527f6f696e74730000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612f5f602a836138a1565b91507f5361666542455032303a204245503230206f7065726174696f6e20646964206e60008301527f6f742073756363656564000000000000000000000000000000000000000000006020830152604082019050919050565b6000612fc56026836138a1565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061302b600f836138a1565b91507f6e6f207a65726f206164647265737300000000000000000000000000000000006000830152602082019050919050565b600061306b601c836138a1565b91507f43616e6e6f742073657420746f20706173742074696d657374616d70000000006000830152602082019050919050565b60006130ab6026836138a1565b91507f416464726573733a20696e73756666696369656e742062616c616e636520666f60008301527f722063616c6c00000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006131116010836138a1565b91507f4d6178696d756d206578636565646564000000000000000000000000000000006000830152602082019050919050565b60006131516022836138a1565b91507f73616665546f6b656e5472616e736665723a207472616e73666572206661696c60008301527f65640000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006131b76028836138a1565b91507f6164643a20696e76616c6964207769746864726177616c20666565206261736960008301527f7320706f696e74730000000000000000000000000000000000000000000000006020830152604082019050919050565b600061321d6009836138a1565b91507f6465763a207775743f00000000000000000000000000000000000000000000006000830152602082019050919050565b600061325d6020836138a1565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b600061329d601d836138a1565b91507f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006000830152602082019050919050565b60006132dd6012836138a1565b91507f77697468647261773a206e6f7420676f6f6400000000000000000000000000006000830152602082019050919050565b600061331d6019836138a1565b91507f6e6f6e4475706c6963617465643a206475706c696361746564000000000000006000830152602082019050919050565b600061335d6018836138a1565b91507f736574466565416464726573733a20464f5242494444454e00000000000000006000830152602082019050919050565b600061339d601f836138a1565b91507f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006000830152602082019050919050565b60006133dd6038836138a1565b91507f4974277320746f6f206c61746520746f20706f7374706f6e65206d696e696e6760008301527f2e2049742068617320616c7265616479207374617274656400000000000000006020830152604082019050919050565b61343f816139f7565b82525050565b61344e81613a77565b82525050565b61345d81613a25565b82525050565b600061346f8284612e64565b915081905092915050565b600060208201905061348f6000830184612e46565b92915050565b60006060820190506134aa6000830186612e46565b6134b76020830185612e46565b6134c46040830184613454565b949350505050565b60006040820190506134e16000830185612e46565b6134ee6020830184613454565b9392505050565b600060208201905061350a6000830184612e55565b92915050565b600060a0820190506135256000830188612e95565b6135326020830187613454565b61353f6040830186613454565b61354c6060830185613454565b6135596080830184613436565b9695505050505050565b60006020820190506135786000830184612ea4565b92915050565b600060208201905081810360008301526135988184612eb3565b905092915050565b600060208201905081810360008301526135b981612eec565b9050919050565b600060208201905081810360008301526135d981612f52565b9050919050565b600060208201905081810360008301526135f981612fb8565b9050919050565b600060208201905081810360008301526136198161301e565b9050919050565b600060208201905081810360008301526136398161305e565b9050919050565b600060208201905081810360008301526136598161309e565b9050919050565b6000602082019050818103600083015261367981613104565b9050919050565b6000602082019050818103600083015261369981613144565b9050919050565b600060208201905081810360008301526136b9816131aa565b9050919050565b600060208201905081810360008301526136d981613210565b9050919050565b600060208201905081810360008301526136f981613250565b9050919050565b6000602082019050818103600083015261371981613290565b9050919050565b60006020820190508181036000830152613739816132d0565b9050919050565b6000602082019050818103600083015261375981613310565b9050919050565b6000602082019050818103600083015261377981613350565b9050919050565b6000602082019050818103600083015261379981613390565b9050919050565b600060208201905081810360008301526137b9816133d0565b9050919050565b60006020820190506137d56000830184613454565b92915050565b60006080820190506137f06000830187613454565b6137fd6020830186612e46565b61380a6040830185613454565b6138176060830184613445565b95945050505050565b60006040820190506138356000830185613454565b6138426020830184613454565b9392505050565b600060608201905061385e6000830186613454565b61386b6020830185613454565b6138786040830184613445565b949350505050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b60006138bd82613a25565b91506138c883613a25565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156138fd576138fc613b05565b5b828201905092915050565b600061391382613a25565b915061391e83613a25565b92508261392e5761392d613b34565b5b828204905092915050565b600061394482613a25565b915061394f83613a25565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561398857613987613b05565b5b828202905092915050565b600061399e82613a25565b91506139a983613a25565b9250828210156139bc576139bb613b05565b5b828203905092915050565b60006139d282613a05565b9050919050565b60008115159050919050565b60006139f0826139c7565b9050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000613a3a82613a41565b9050919050565b6000613a4c82613a05565b9050919050565b6000613a5e82613a65565b9050919050565b6000613a7082613a05565b9050919050565b6000613a82826139f7565b9050919050565b60005b83811015613aa7578082015181840152602081019050613a8c565b83811115613ab6576000848401525b50505050565b6000613ac782613a25565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613afa57613af9613b05565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b613b7d816139c7565b8114613b8857600080fd5b50565b613b94816139d9565b8114613b9f57600080fd5b50565b613bab816139e5565b8114613bb657600080fd5b50565b613bc2816139f7565b8114613bcd57600080fd5b50565b613bd981613a25565b8114613be457600080fd5b5056fea2646970667358221220ca5a080503a887e7ca0b13caabe3d65cfd3526721a44be5c31b68a6b37dc67f464736f6c63430008000033000000000000000000000000aad1acc82598d9979ad8942bc33604c3be235aaf000000000000000000000000aad1acc82598d9979ad8942bc33604c3be235aaf000000000000000000000000951c8a8dee33bd5039a71e7bd4244d5659cf1517000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000617c1a80
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000aad1acc82598d9979ad8942bc33604c3be235aaf000000000000000000000000aad1acc82598d9979ad8942bc33604c3be235aaf000000000000000000000000951c8a8dee33bd5039a71e7bd4244d5659cf1517000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000617c1a80
-----Decoded View---------------
Arg [0] : _devaddr (address): 0xaad1acc82598d9979ad8942bc33604c3be235aaf
Arg [1] : _feeAddress (address): 0xaad1acc82598d9979ad8942bc33604c3be235aaf
Arg [2] : _token (address): 0x951c8a8dee33bd5039a71e7bd4244d5659cf1517
Arg [3] : _tokenPerSecond (uint256): 100000000000000000
Arg [4] : _startTimestamp (uint256): 1635523200
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000aad1acc82598d9979ad8942bc33604c3be235aaf
Arg [1] : 000000000000000000000000aad1acc82598d9979ad8942bc33604c3be235aaf
Arg [2] : 000000000000000000000000951c8a8dee33bd5039a71e7bd4244d5659cf1517
Arg [3] : 000000000000000000000000000000000000000000000000016345785d8a0000
Arg [4] : 00000000000000000000000000000000000000000000000000000000617c1a80
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.