Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 58 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Unstake | 12341587 | 1372 days ago | IN | 0 ETH | 0.00789173 | ||||
Unstake | 12251607 | 1386 days ago | IN | 0 ETH | 0.05865558 | ||||
Unstake | 11928578 | 1436 days ago | IN | 0 ETH | 0.03302566 | ||||
Unstake | 11898704 | 1441 days ago | IN | 0 ETH | 0.03066668 | ||||
Unstake | 11887730 | 1442 days ago | IN | 0 ETH | 0.04254054 | ||||
Unstake | 11874218 | 1444 days ago | IN | 0 ETH | 0.0327069 | ||||
Unstake | 11874161 | 1444 days ago | IN | 0 ETH | 0.02378912 | ||||
Unstake | 11873685 | 1444 days ago | IN | 0 ETH | 0.03371795 | ||||
Unstake | 11873341 | 1445 days ago | IN | 0 ETH | 0.03362392 | ||||
Unstake | 11872702 | 1445 days ago | IN | 0 ETH | 0.03218024 | ||||
Stake | 11866819 | 1446 days ago | IN | 1 ETH | 0.03337737 | ||||
Stake | 11866781 | 1446 days ago | IN | 2 ETH | 0.03695786 | ||||
Stake | 11866707 | 1446 days ago | IN | 2.5 ETH | 0.00345768 | ||||
Stake | 11861724 | 1446 days ago | IN | 1 ETH | 0.02401284 | ||||
Stake | 11860903 | 1446 days ago | IN | 0.12 ETH | 0.02401369 | ||||
Stake | 11860598 | 1446 days ago | IN | 1.5 ETH | 0.0282504 | ||||
Stake | 11856390 | 1447 days ago | IN | 1.5 ETH | 0.02418566 | ||||
Unstake | 11844211 | 1449 days ago | IN | 0 ETH | 0.0542855 | ||||
Stake | 11842379 | 1449 days ago | IN | 1 ETH | 0.03179463 | ||||
Stake | 11842364 | 1449 days ago | IN | 3 ETH | 0.00337123 | ||||
Stake | 11842353 | 1449 days ago | IN | 5 ETH | 0.00337123 | ||||
Stake | 11842326 | 1449 days ago | IN | 5 ETH | 0.00360175 | ||||
Stake | 11837336 | 1450 days ago | IN | 0.8 ETH | 0.07582407 | ||||
Stake | 11836441 | 1450 days ago | IN | 0.4 ETH | 0.05960834 | ||||
Stake | 11834221 | 1451 days ago | IN | 1 ETH | 0.02934889 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
12341587 | 1372 days ago | 0.95138567 ETH | ||||
12341587 | 1372 days ago | 0.95138567 ETH | ||||
12251607 | 1386 days ago | 8.06318983 ETH | ||||
12251607 | 1386 days ago | 8.06318983 ETH | ||||
11928578 | 1436 days ago | 0.08084384 ETH | ||||
11928578 | 1436 days ago | 0.08084384 ETH | ||||
11898704 | 1441 days ago | 3.11044244 ETH | ||||
11898704 | 1441 days ago | 3.11044244 ETH | ||||
11887730 | 1442 days ago | 3.6073889 ETH | ||||
11887730 | 1442 days ago | 3.6073889 ETH | ||||
11874218 | 1444 days ago | 0.50972685 ETH | ||||
11874218 | 1444 days ago | 0.50972685 ETH | ||||
11874161 | 1444 days ago | 2.82086826 ETH | ||||
11874161 | 1444 days ago | 2.82086826 ETH | ||||
11873685 | 1444 days ago | 1.01877755 ETH | ||||
11873685 | 1444 days ago | 1.01877755 ETH | ||||
11873341 | 1445 days ago | 0.67912707 ETH | ||||
11873341 | 1445 days ago | 0.67912707 ETH | ||||
11872702 | 1445 days ago | 0.05666431 ETH | ||||
11872702 | 1445 days ago | 0.05666431 ETH | ||||
11866819 | 1446 days ago | 1 ETH | ||||
11866781 | 1446 days ago | 2 ETH | ||||
11861724 | 1446 days ago | 1 ETH | ||||
11860903 | 1446 days ago | 0.12 ETH | ||||
11860598 | 1446 days ago | 1.5 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
RewardedPdogeWethUniV2Pair
Compiler Version
v0.5.16+commit.9c3226ce
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.5.0; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/ownership/Ownable.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; import "../lib/UniswapV2Library.sol"; import "../ModifiedUnipool.sol"; import "../interfaces/IWETH.sol"; contract RewardedPdogeWethUniV2Pair is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public pdoge; IWETH public weth; IUniswapV2Pair public uniV2; ModifiedUnipool public modifiedUnipool; uint256 public allowedSlippage; event Staked(address indexed user, uint256 amount); event Unstaked(address indexed user, uint256 pdogeAmount, uint256 ethAmount); event AllowedSlippageChanged(uint256 slippage); /** * @param _uniV2 UniV2Pair address * @param _modifiedUnipool ModifiedUnipool address */ constructor(address _uniV2, address _modifiedUnipool) public { require(Address.isContract(_uniV2), "RewardedPdogeWethUniV2Pair: _uniV2 not a contract"); uniV2 = IUniswapV2Pair(_uniV2); modifiedUnipool = ModifiedUnipool(_modifiedUnipool); pdoge = IERC20(uniV2.token1()); weth = IWETH(uniV2.token0()); } /** * @notice function used to handle the ethers sent * during the witdraw within the unstake function */ function() external payable { require(msg.sender == address(weth), "RewardedPdogeWethUniV2Pair: msg.sender is not weth"); } /** * @param _allowedSlippage new max allowed in percentage */ function setAllowedSlippage(uint256 _allowedSlippage) external onlyOwner { allowedSlippage = _allowedSlippage; emit AllowedSlippageChanged(_allowedSlippage); } /** * @notice _stakeFor wrapper */ function stake() public payable returns (bool) { require(msg.value > 0, "RewardedPdogeWethUniV2Pair: msg.value must be greater than 0"); _stakeFor(msg.sender, msg.value); return true; } /** * @notice Burn all user's UniV2 staked in the ModifiedUnipool, * unwrap the corresponding amount of WETH into ETH, collect * rewards matured from the UniV2 staking and sent it to msg.sender. * User must approve this contract to withdraw the corresponding * amount of his UniV2 balance in behalf of him. */ function unstake() public returns (bool) { uint256 uniV2SenderBalance = modifiedUnipool.balanceOf(msg.sender); require( modifiedUnipool.allowance(msg.sender, address(this)) >= uniV2SenderBalance, "RewardedPdogeWethUniV2Pair: amount not approved" ); modifiedUnipool.withdrawFrom(msg.sender, uniV2SenderBalance); modifiedUnipool.getReward(msg.sender); uniV2.transfer(address(uniV2), uniV2SenderBalance); (uint256 wethAmount, uint256 pdogeAmount) = uniV2.burn(address(this)); weth.withdraw(wethAmount); address(msg.sender).transfer(wethAmount); pdoge.transfer(msg.sender, pdogeAmount); emit Unstaked(msg.sender, pdogeAmount, wethAmount); return true; } /** * @notice Wrap the Ethereum sent into WETH, swap the amount sent / 2 * into WETH and put them into a pDOGE/WETH Uniswap pool. * The amount of UniV2 token will be sent to ModifiedUnipool * in order to mature rewards. * @param _user address of the user who will have UniV2 tokens in ModifiedUnipool * @param _amount amount of weth to use to perform this operation */ function _stakeFor(address _user, uint256 _amount) internal { uint256 wethAmountIn = _amount / 2; (uint256 wethReserve, uint256 pdogeReserve,) = uniV2.getReserves(); uint256 pdogeAmountOut = UniswapV2Library.getAmountOut(wethAmountIn, wethReserve, pdogeReserve); require( allowedSlippage >= UniswapV2Library.calculateSlippage(wethAmountIn, wethReserve, pdogeReserve), "RewardedPdogeWethUniV2Pair: too much slippage" ); weth.deposit.value(_amount)(); weth.transfer(address(uniV2), wethAmountIn); uniV2.swap(0, pdogeAmountOut, address(this), ""); pdoge.safeTransfer(address(uniV2), pdogeAmountOut); weth.transfer(address(uniV2), wethAmountIn); uint256 liquidity = uniV2.mint(address(this)); uniV2.approve(address(modifiedUnipool), liquidity); modifiedUnipool.stakeFor(_user, liquidity); emit Staked(_user, _amount); } }
pragma solidity ^0.5.0; import "@openzeppelin/contracts/ownership/Ownable.sol"; contract IRewardDistributionRecipient is Ownable { address public rewardDistribution; function notifyRewardAmount(uint256 reward) external; modifier onlyRewardDistribution() { require(_msgSender() == rewardDistribution, "Caller is not reward distribution"); _; } function setRewardDistribution(address _rewardDistribution) external onlyOwner { rewardDistribution = _rewardDistribution; } }
pragma solidity ^0.5.0; import "@openzeppelin/contracts/math/Math.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/ownership/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./IRewardDistributionRecipient.sol"; contract LPTokenWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public token; uint256 private _totalSupply; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; event Approval(address indexed owner, address indexed spender, uint256 value); constructor(address _token) public { token = IERC20(_token); } function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function stakeFor(address _user, uint256 _amount) public { _stake(_user, _amount); } function stake(uint256 _amount) public { _stake(msg.sender, _amount); } function approve(address _user, uint256 _amount) public { _approve(msg.sender, _user, _amount); } function withdraw(uint256 _amount) public { _withdraw(msg.sender, _amount); } function withdrawFrom(address _user, uint256 _amount) public { _withdraw(_user, _amount); _approve( _user, msg.sender, _allowances[_user][msg.sender].sub(_amount, "LPTokenWrapper: withdraw amount exceeds allowance") ); } function allowance(address _owner, address _spender) public view returns (uint256) { return _allowances[_owner][_spender]; } function _stake(address _user, uint256 _amount) internal { _totalSupply = _totalSupply.add(_amount); _balances[_user] = _balances[_user].add(_amount); token.safeTransferFrom(msg.sender, address(this), _amount); } function _withdraw(address _owner, uint256 _amount) internal { _totalSupply = _totalSupply.sub(_amount); _balances[_owner] = _balances[_owner].sub(_amount); IERC20(token).safeTransfer(msg.sender, _amount); } function _approve( address _owner, address _user, uint256 _amount ) internal returns (bool) { require(_user != address(0), "LPTokenWrapper: approve to the zero address"); _allowances[_owner][_user] = _amount; emit Approval(_owner, _user, _amount); return true; } } contract ModifiedUnipool is LPTokenWrapper, IRewardDistributionRecipient { address public rewardToken; uint256 public constant DURATION = 7 days; uint256 public periodFinish = 0; uint256 public rewardRate = 0; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); modifier updateReward(address account) { rewardPerTokenStored = rewardPerToken(); lastUpdateTime = lastTimeRewardApplicable(); if (account != address(0)) { rewards[account] = earned(account); userRewardPerTokenPaid[account] = rewardPerTokenStored; } _; } constructor(address _rewardToken, address _token) public LPTokenWrapper(_token) { rewardToken = _rewardToken; } function notifyRewardAmount(uint256 reward) external onlyRewardDistribution updateReward(address(0)) { if (block.timestamp >= periodFinish) { rewardRate = reward.div(DURATION); } else { uint256 remaining = periodFinish.sub(block.timestamp); uint256 leftover = remaining.mul(rewardRate); rewardRate = reward.add(leftover).div(DURATION); } lastUpdateTime = block.timestamp; periodFinish = block.timestamp.add(DURATION); emit RewardAdded(reward); } function exit() external { withdraw(balanceOf(msg.sender)); getReward(msg.sender); } function lastTimeRewardApplicable() public view returns (uint256) { return Math.min(block.timestamp, periodFinish); } function rewardPerToken() public view returns (uint256) { if (totalSupply() == 0) { return rewardPerTokenStored; } return rewardPerTokenStored.add( lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRate).mul(1e18).div(totalSupply()) ); } function earned(address account) public view returns (uint256) { return balanceOf(account).mul(rewardPerToken().sub(userRewardPerTokenPaid[account])).div(1e18).add( rewards[account] ); } function stake(uint256 amount) public updateReward(msg.sender) { require(amount > 0, "Cannot stake 0"); super.stake(amount); emit Staked(msg.sender, amount); } function stakeFor(address _user, uint256 _amount) public updateReward(_user) { require(_amount > 0, "Cannot stake 0"); super.stakeFor(_user, _amount); emit Staked(_user, _amount); } function withdraw(uint256 amount) public updateReward(msg.sender) { require(amount > 0, "Cannot withdraw 0"); super.withdraw(amount); emit Withdrawn(msg.sender, amount); } function withdrawFrom(address _user, uint256 amount) public updateReward(_user) { require(amount > 0, "Cannot withdraw 0"); super.withdrawFrom(_user, amount); emit Withdrawn(_user, amount); } function getReward() public { _getReward(msg.sender); } function getReward(address _user) public { _getReward(_user); } function _getReward(address _user) internal updateReward(_user) { uint256 reward = earned(_user); if (reward > 0) { rewards[_user] = 0; IERC20(rewardToken).safeTransfer(_user, reward); emit RewardPaid(_user, reward); } } }
pragma solidity >=0.5.0; interface IWETH { function deposit() external payable; function transfer(address to, uint256 value) external returns (bool); function withdraw(uint256) external; function balanceOf(address who) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function allowance(address owner, address spender) external returns (uint256); }
// taken from here: https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/libraries/UniswapV2Library.sol pragma solidity >=0.5.0; import "@openzeppelin/contracts/math/SafeMath.sol"; library UniswapV2Library { using SafeMath for uint256; // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) internal pure returns (uint256 amountOut) { require(amountIn > 0, "UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT"); require(reserveIn > 0 && reserveOut > 0, "UniswapV2Library: INSUFFICIENT_LIQUIDITY"); uint256 amountInWithFee = amountIn.mul(997); uint256 numerator = amountInWithFee.mul(reserveOut); uint256 denominator = reserveIn.mul(1000).add(amountInWithFee); amountOut = numerator / denominator; } /** * @author allemanfredi * @notice given an input amount, returns the output * amount with slippage and with fees. This fx is * to check approximately onchain the slippage * during a swap */ function calculateSlippageAmountWithFees( uint256 _amountIn, uint256 _allowedSlippage, uint256 _rateIn, uint256 _rateOut ) internal pure returns (uint256) { require(_amountIn > 0, "UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT"); uint256 slippageAmount = _amountIn.mul(_rateOut).div(_rateIn).mul(10000 - _allowedSlippage).div(10000); // NOTE: remove fees return slippageAmount.mul(997).div(1000); } /** * @author allemanfredi * @notice given 2 inputs amount, it returns the * rate percentage between the 2 amounts */ function calculateRate(uint256 _amountIn, uint256 _amountOut) internal pure returns (uint256) { require(_amountIn > 0, "UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT"); require(_amountOut > 0, "UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT"); return _amountIn > _amountOut ? (10000 * _amountIn).sub(10000 * _amountOut).div(_amountIn) : (10000 * _amountOut).sub(10000 * _amountIn).div(_amountOut); } /** * @author allemanfredi * @notice returns the slippage for a trade counting alfo the fees */ function calculateSlippage( uint256 _amountIn, uint256 _reserveIn, uint256 _reserveOut ) internal pure returns (uint256) { require(_amountIn > 0, "UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT"); uint256 price = _reserveOut.mul(10**18).div(_reserveIn); uint256 quote = _amountIn.mul(price); uint256 amountOut = getAmountOut(_amountIn, _reserveIn, _reserveOut); return uint256(10000).sub((amountOut * 10000).div(quote.div(10**18))).mul(997).div(1000); } }
pragma solidity ^0.5.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 GSN 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. */ contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
pragma solidity ^0.5.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } }
pragma solidity ^0.5.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts 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. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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 mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
pragma solidity ^0.5.0; import "../GSN/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. * * 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. */ 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 () internal { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return _msgSender() == _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 onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = 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 onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
pragma solidity ^0.5.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: 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(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
pragma solidity ^0.5.5; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing 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. */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @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]. * * _Available since v2.4.0._ */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } }
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; }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": { "": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_uniV2","type":"address"},{"internalType":"address","name":"_modifiedUnipool","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"slippage","type":"uint256"}],"name":"AllowedSlippageChanged","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":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"pdogeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"}],"name":"Unstaked","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":true,"inputs":[],"name":"allowedSlippage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"modifiedUnipool","outputs":[{"internalType":"contract ModifiedUnipool","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pdoge","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_allowedSlippage","type":"uint256"}],"name":"setAllowedSlippage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"stake","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"uniV2","outputs":[{"internalType":"contract IUniswapV2Pair","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unstake","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"weth","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200197438038062001974833981810160405260408110156200003757600080fd5b508051602090910151620000536001600160e01b036200023416565b600080546001600160a01b0319166001600160a01b03928316178082556040519216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3620000b1826200023860201b620014bf1760201c565b620000ee5760405162461bcd60e51b8152600401808060200182810382526031815260200180620019436031913960400191505060405180910390fd5b600380546001600160a01b038085166001600160a01b031992831617928390556004805485831693169290921782556040805163d21220a760e01b81529051939091169263d21220a792828101926020929190829003018186803b1580156200015657600080fd5b505afa1580156200016b573d6000803e3d6000fd5b505050506040513d60208110156200018257600080fd5b5051600180546001600160a01b0319166001600160a01b0392831617905560035460408051630dfe168160e01b815290519190921691630dfe1681916004808301926020929190829003018186803b158015620001de57600080fd5b505afa158015620001f3573d6000803e3d6000fd5b505050506040513d60208110156200020a57600080fd5b5051600280546001600160a01b0319166001600160a01b0390921691909117905550620002759050565b3390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906200026d5750808214155b949350505050565b6116be80620002856000396000f3fe6080604052600436106100a75760003560e01c8063715018a611610064578063715018a6146101ba57806374bbecf4146101cf5780638da5cb5b146101e45780638f32d59b146101f9578063f2fde38b1461020e578063ffae404914610241576100a7565b80632365faea146100f25780632def66201461011c5780633a4b66f1146101455780633fc8cef31461014d578063431f24451461017e5780636406b6d0146101a5575b6002546001600160a01b031633146100f05760405162461bcd60e51b81526004018080602001828103825260328152602001806116586032913960400191505060405180910390fd5b005b3480156100fe57600080fd5b506100f06004803603602081101561011557600080fd5b5035610256565b34801561012857600080fd5b506101316102ea565b604080519115158252519081900360200190f35b610131610752565b34801561015957600080fd5b506101626107a2565b604080516001600160a01b039092168252519081900360200190f35b34801561018a57600080fd5b506101936107b1565b60408051918252519081900360200190f35b3480156101b157600080fd5b506101626107b7565b3480156101c657600080fd5b506100f06107c6565b3480156101db57600080fd5b50610162610869565b3480156101f057600080fd5b50610162610878565b34801561020557600080fd5b50610131610887565b34801561021a57600080fd5b506100f06004803603602081101561023157600080fd5b50356001600160a01b03166108ab565b34801561024d57600080fd5b50610162610910565b61025e610887565b6102af576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60058190556040805182815290517f44f3ebcd53cc7caaa403093ba74b57dd97ab53ba634db0463e5ed5ef359015949181900360200190a150565b60048054604080516370a0823160e01b815233938101939093525160009283926001600160a01b0316916370a0823191602480820192602092909190829003018186803b15801561033a57600080fd5b505afa15801561034e573d6000803e3d6000fd5b505050506040513d602081101561036457600080fd5b50516004805460408051636eb1769f60e11b815233938101939093523060248401525192935083926001600160a01b039091169163dd62ed3e916044808301926020929190829003018186803b1580156103bd57600080fd5b505afa1580156103d1573d6000803e3d6000fd5b505050506040513d60208110156103e757600080fd5b505110156104265760405162461bcd60e51b815260040180806020018281038252602f815260200180611598602f913960400191505060405180910390fd5b6004805460408051639470b0bd60e01b8152339381019390935260248301849052516001600160a01b0390911691639470b0bd91604480830192600092919082900301818387803b15801561047a57600080fd5b505af115801561048e573d6000803e3d6000fd5b50506004805460408051630c00007b60e41b81523393810193909352516001600160a01b03909116935063c00007b09250602480830192600092919082900301818387803b1580156104df57600080fd5b505af11580156104f3573d6000803e3d6000fd5b50506003546040805163a9059cbb60e01b81526001600160a01b039092166004830181905260248301869052905190935063a9059cbb925060448083019260209291908290030181600087803b15801561054c57600080fd5b505af1158015610560573d6000803e3d6000fd5b505050506040513d602081101561057657600080fd5b50506003546040805163226bf2d160e21b8152306004820152815160009384936001600160a01b03909116926389afcb44926024808301939282900301818787803b1580156105c457600080fd5b505af11580156105d8573d6000803e3d6000fd5b505050506040513d60408110156105ee57600080fd5b50805160209091015160025460408051632e1a7d4d60e01b81526004810185905290519395509193506001600160a01b031691632e1a7d4d9160248082019260009290919082900301818387803b15801561064857600080fd5b505af115801561065c573d6000803e3d6000fd5b505060405133925084156108fc02915084906000818181858888f1935050505015801561068d573d6000803e3d6000fd5b506001546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b1580156106e257600080fd5b505af11580156106f6573d6000803e3d6000fd5b505050506040513d602081101561070c57600080fd5b50506040805182815260208101849052815133927f7fc4727e062e336010f2c282598ef5f14facb3de68cf8195c2f23e1454b2b74e928290030190a26001935050505090565b60008034116107925760405162461bcd60e51b815260040180806020018281038252603c8152602001806115c7603c913960400191505060405180910390fd5b61079c333461091f565b50600190565b6002546001600160a01b031681565b60055481565b6004546001600160a01b031681565b6107ce610887565b61081f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001546001600160a01b031681565b6000546001600160a01b031690565b600080546001600160a01b031661089c610dea565b6001600160a01b031614905090565b6108b3610887565b610904576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61090d81610dee565b50565b6003546001600160a01b031681565b6000600282049050600080600360009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561097857600080fd5b505afa15801561098c573d6000803e3d6000fd5b505050506040513d60608110156109a257600080fd5b5080516020909101516dffffffffffffffffffffffffffff918216935016905060006109cf848484610e8e565b90506109dc848484610f7e565b6005541015610a1c5760405162461bcd60e51b815260040180806020018281038252602d81526020018061156b602d913960400191505060405180910390fd5b600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0866040518263ffffffff1660e01b81526004016000604051808303818588803b158015610a6c57600080fd5b505af1158015610a80573d6000803e3d6000fd5b50506002546003546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018b9052905191909216945063a9059cbb9350604480830193506020928290030181600087803b158015610adc57600080fd5b505af1158015610af0573d6000803e3d6000fd5b505050506040513d6020811015610b0657600080fd5b50506003546040805163022c0d9f60e01b815260006004820181905260248201859052306044830152608060648301526084820181905291516001600160a01b039093169263022c0d9f9260c48084019391929182900301818387803b158015610b6f57600080fd5b505af1158015610b83573d6000803e3d6000fd5b5050600354600154610baa93506001600160a01b039081169250168363ffffffff61106e16565b6002546003546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018890529051919092169163a9059cbb9160448083019260209291908290030181600087803b158015610c0357600080fd5b505af1158015610c17573d6000803e3d6000fd5b505050506040513d6020811015610c2d57600080fd5b5050600354604080516335313c2160e11b815230600482015290516000926001600160a01b031691636a62784291602480830192602092919082900301818787803b158015610c7b57600080fd5b505af1158015610c8f573d6000803e3d6000fd5b505050506040513d6020811015610ca557600080fd5b5051600354600480546040805163095ea7b360e01b81526001600160a01b039283169381019390935260248301859052519394509091169163095ea7b3916044808201926020929091908290030181600087803b158015610d0557600080fd5b505af1158015610d19573d6000803e3d6000fd5b505050506040513d6020811015610d2f57600080fd5b505060048054604080516305dc812160e31b81526001600160a01b038b8116948201949094526024810185905290519290911691632ee409089160448082019260009290919082900301818387803b158015610d8a57600080fd5b505af1158015610d9e573d6000803e3d6000fd5b50506040805189815290516001600160a01b038b1693507f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d92509081900360200190a250505050505050565b3390565b6001600160a01b038116610e335760405162461bcd60e51b81526004018080602001828103825260268152602001806114fc6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000808411610ece5760405162461bcd60e51b815260040180806020018281038252602b81526020018061162d602b913960400191505060405180910390fd5b600083118015610ede5750600082115b610f195760405162461bcd60e51b81526004018080602001828103825260288152602001806115226028913960400191505060405180910390fd5b6000610f2d856103e563ffffffff6110c516565b90506000610f41828563ffffffff6110c516565b90506000610f6783610f5b886103e863ffffffff6110c516565b9063ffffffff61112716565b9050808281610f7257fe5b04979650505050505050565b6000808411610fbe5760405162461bcd60e51b815260040180806020018281038252602b81526020018061162d602b913960400191505060405180910390fd5b6000610fe884610fdc85670de0b6b3a764000063ffffffff6110c516565b9063ffffffff61118116565b90506000610ffc868363ffffffff6110c516565b9050600061100b878787610e8e565b90506110636103e8610fdc6103e561105761104861103788670de0b6b3a764000063ffffffff61118116565b61271088029063ffffffff61118116565b6127109063ffffffff6111c316565b9063ffffffff6110c516565b979650505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526110c0908490611205565b505050565b6000826110d457506000611121565b828202828482816110e157fe5b041461111e5760405162461bcd60e51b815260040180806020018281038252602181526020018061154a6021913960400191505060405180910390fd5b90505b92915050565b60008282018381101561111e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061111e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506113c3565b600061111e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611465565b611217826001600160a01b03166114bf565b611268576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106112a65780518252601f199092019160209182019101611287565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611308576040519150601f19603f3d011682016040523d82523d6000602084013e61130d565b606091505b509150915081611364576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156113bd5780806020019051602081101561138057600080fd5b50516113bd5760405162461bcd60e51b815260040180806020018281038252602a815260200180611603602a913960400191505060405180910390fd5b50505050565b6000818361144f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114145781810151838201526020016113fc565b50505050905090810190601f1680156114415780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161145b57fe5b0495945050505050565b600081848411156114b75760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156114145781810151838201526020016113fc565b505050900390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906114f35750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373556e697377617056324c6962726172793a20494e53554646494349454e545f4c4951554944495459536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77526577617264656450646f676557657468556e695632506169723a20746f6f206d75636820736c697070616765526577617264656450646f676557657468556e695632506169723a20616d6f756e74206e6f7420617070726f766564526577617264656450646f676557657468556e695632506169723a206d73672e76616c7565206d7573742062652067726561746572207468616e20305361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54526577617264656450646f676557657468556e695632506169723a206d73672e73656e646572206973206e6f742077657468a265627a7a72315820255b223859962d8f2afaaa2db5af32db34be7dd924251d93f8d7562367da782264736f6c63430005100032526577617264656450646f676557657468556e695632506169723a205f756e695632206e6f74206120636f6e747261637400000000000000000000000048584714106c724c6954c5546708aad5811c29bd000000000000000000000000eb8a0bac52fe10949c088a43afbbb42cf0c3684e
Deployed Bytecode
0x6080604052600436106100a75760003560e01c8063715018a611610064578063715018a6146101ba57806374bbecf4146101cf5780638da5cb5b146101e45780638f32d59b146101f9578063f2fde38b1461020e578063ffae404914610241576100a7565b80632365faea146100f25780632def66201461011c5780633a4b66f1146101455780633fc8cef31461014d578063431f24451461017e5780636406b6d0146101a5575b6002546001600160a01b031633146100f05760405162461bcd60e51b81526004018080602001828103825260328152602001806116586032913960400191505060405180910390fd5b005b3480156100fe57600080fd5b506100f06004803603602081101561011557600080fd5b5035610256565b34801561012857600080fd5b506101316102ea565b604080519115158252519081900360200190f35b610131610752565b34801561015957600080fd5b506101626107a2565b604080516001600160a01b039092168252519081900360200190f35b34801561018a57600080fd5b506101936107b1565b60408051918252519081900360200190f35b3480156101b157600080fd5b506101626107b7565b3480156101c657600080fd5b506100f06107c6565b3480156101db57600080fd5b50610162610869565b3480156101f057600080fd5b50610162610878565b34801561020557600080fd5b50610131610887565b34801561021a57600080fd5b506100f06004803603602081101561023157600080fd5b50356001600160a01b03166108ab565b34801561024d57600080fd5b50610162610910565b61025e610887565b6102af576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60058190556040805182815290517f44f3ebcd53cc7caaa403093ba74b57dd97ab53ba634db0463e5ed5ef359015949181900360200190a150565b60048054604080516370a0823160e01b815233938101939093525160009283926001600160a01b0316916370a0823191602480820192602092909190829003018186803b15801561033a57600080fd5b505afa15801561034e573d6000803e3d6000fd5b505050506040513d602081101561036457600080fd5b50516004805460408051636eb1769f60e11b815233938101939093523060248401525192935083926001600160a01b039091169163dd62ed3e916044808301926020929190829003018186803b1580156103bd57600080fd5b505afa1580156103d1573d6000803e3d6000fd5b505050506040513d60208110156103e757600080fd5b505110156104265760405162461bcd60e51b815260040180806020018281038252602f815260200180611598602f913960400191505060405180910390fd5b6004805460408051639470b0bd60e01b8152339381019390935260248301849052516001600160a01b0390911691639470b0bd91604480830192600092919082900301818387803b15801561047a57600080fd5b505af115801561048e573d6000803e3d6000fd5b50506004805460408051630c00007b60e41b81523393810193909352516001600160a01b03909116935063c00007b09250602480830192600092919082900301818387803b1580156104df57600080fd5b505af11580156104f3573d6000803e3d6000fd5b50506003546040805163a9059cbb60e01b81526001600160a01b039092166004830181905260248301869052905190935063a9059cbb925060448083019260209291908290030181600087803b15801561054c57600080fd5b505af1158015610560573d6000803e3d6000fd5b505050506040513d602081101561057657600080fd5b50506003546040805163226bf2d160e21b8152306004820152815160009384936001600160a01b03909116926389afcb44926024808301939282900301818787803b1580156105c457600080fd5b505af11580156105d8573d6000803e3d6000fd5b505050506040513d60408110156105ee57600080fd5b50805160209091015160025460408051632e1a7d4d60e01b81526004810185905290519395509193506001600160a01b031691632e1a7d4d9160248082019260009290919082900301818387803b15801561064857600080fd5b505af115801561065c573d6000803e3d6000fd5b505060405133925084156108fc02915084906000818181858888f1935050505015801561068d573d6000803e3d6000fd5b506001546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b1580156106e257600080fd5b505af11580156106f6573d6000803e3d6000fd5b505050506040513d602081101561070c57600080fd5b50506040805182815260208101849052815133927f7fc4727e062e336010f2c282598ef5f14facb3de68cf8195c2f23e1454b2b74e928290030190a26001935050505090565b60008034116107925760405162461bcd60e51b815260040180806020018281038252603c8152602001806115c7603c913960400191505060405180910390fd5b61079c333461091f565b50600190565b6002546001600160a01b031681565b60055481565b6004546001600160a01b031681565b6107ce610887565b61081f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001546001600160a01b031681565b6000546001600160a01b031690565b600080546001600160a01b031661089c610dea565b6001600160a01b031614905090565b6108b3610887565b610904576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61090d81610dee565b50565b6003546001600160a01b031681565b6000600282049050600080600360009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561097857600080fd5b505afa15801561098c573d6000803e3d6000fd5b505050506040513d60608110156109a257600080fd5b5080516020909101516dffffffffffffffffffffffffffff918216935016905060006109cf848484610e8e565b90506109dc848484610f7e565b6005541015610a1c5760405162461bcd60e51b815260040180806020018281038252602d81526020018061156b602d913960400191505060405180910390fd5b600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0866040518263ffffffff1660e01b81526004016000604051808303818588803b158015610a6c57600080fd5b505af1158015610a80573d6000803e3d6000fd5b50506002546003546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018b9052905191909216945063a9059cbb9350604480830193506020928290030181600087803b158015610adc57600080fd5b505af1158015610af0573d6000803e3d6000fd5b505050506040513d6020811015610b0657600080fd5b50506003546040805163022c0d9f60e01b815260006004820181905260248201859052306044830152608060648301526084820181905291516001600160a01b039093169263022c0d9f9260c48084019391929182900301818387803b158015610b6f57600080fd5b505af1158015610b83573d6000803e3d6000fd5b5050600354600154610baa93506001600160a01b039081169250168363ffffffff61106e16565b6002546003546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018890529051919092169163a9059cbb9160448083019260209291908290030181600087803b158015610c0357600080fd5b505af1158015610c17573d6000803e3d6000fd5b505050506040513d6020811015610c2d57600080fd5b5050600354604080516335313c2160e11b815230600482015290516000926001600160a01b031691636a62784291602480830192602092919082900301818787803b158015610c7b57600080fd5b505af1158015610c8f573d6000803e3d6000fd5b505050506040513d6020811015610ca557600080fd5b5051600354600480546040805163095ea7b360e01b81526001600160a01b039283169381019390935260248301859052519394509091169163095ea7b3916044808201926020929091908290030181600087803b158015610d0557600080fd5b505af1158015610d19573d6000803e3d6000fd5b505050506040513d6020811015610d2f57600080fd5b505060048054604080516305dc812160e31b81526001600160a01b038b8116948201949094526024810185905290519290911691632ee409089160448082019260009290919082900301818387803b158015610d8a57600080fd5b505af1158015610d9e573d6000803e3d6000fd5b50506040805189815290516001600160a01b038b1693507f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d92509081900360200190a250505050505050565b3390565b6001600160a01b038116610e335760405162461bcd60e51b81526004018080602001828103825260268152602001806114fc6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000808411610ece5760405162461bcd60e51b815260040180806020018281038252602b81526020018061162d602b913960400191505060405180910390fd5b600083118015610ede5750600082115b610f195760405162461bcd60e51b81526004018080602001828103825260288152602001806115226028913960400191505060405180910390fd5b6000610f2d856103e563ffffffff6110c516565b90506000610f41828563ffffffff6110c516565b90506000610f6783610f5b886103e863ffffffff6110c516565b9063ffffffff61112716565b9050808281610f7257fe5b04979650505050505050565b6000808411610fbe5760405162461bcd60e51b815260040180806020018281038252602b81526020018061162d602b913960400191505060405180910390fd5b6000610fe884610fdc85670de0b6b3a764000063ffffffff6110c516565b9063ffffffff61118116565b90506000610ffc868363ffffffff6110c516565b9050600061100b878787610e8e565b90506110636103e8610fdc6103e561105761104861103788670de0b6b3a764000063ffffffff61118116565b61271088029063ffffffff61118116565b6127109063ffffffff6111c316565b9063ffffffff6110c516565b979650505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526110c0908490611205565b505050565b6000826110d457506000611121565b828202828482816110e157fe5b041461111e5760405162461bcd60e51b815260040180806020018281038252602181526020018061154a6021913960400191505060405180910390fd5b90505b92915050565b60008282018381101561111e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061111e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506113c3565b600061111e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611465565b611217826001600160a01b03166114bf565b611268576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106112a65780518252601f199092019160209182019101611287565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611308576040519150601f19603f3d011682016040523d82523d6000602084013e61130d565b606091505b509150915081611364576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156113bd5780806020019051602081101561138057600080fd5b50516113bd5760405162461bcd60e51b815260040180806020018281038252602a815260200180611603602a913960400191505060405180910390fd5b50505050565b6000818361144f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114145781810151838201526020016113fc565b50505050905090810190601f1680156114415780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161145b57fe5b0495945050505050565b600081848411156114b75760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156114145781810151838201526020016113fc565b505050900390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906114f35750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373556e697377617056324c6962726172793a20494e53554646494349454e545f4c4951554944495459536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77526577617264656450646f676557657468556e695632506169723a20746f6f206d75636820736c697070616765526577617264656450646f676557657468556e695632506169723a20616d6f756e74206e6f7420617070726f766564526577617264656450646f676557657468556e695632506169723a206d73672e76616c7565206d7573742062652067726561746572207468616e20305361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54526577617264656450646f676557657468556e695632506169723a206d73672e73656e646572206973206e6f742077657468a265627a7a72315820255b223859962d8f2afaaa2db5af32db34be7dd924251d93f8d7562367da782264736f6c63430005100032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000048584714106c724c6954c5546708aad5811c29bd000000000000000000000000eb8a0bac52fe10949c088a43afbbb42cf0c3684e
-----Decoded View---------------
Arg [0] : _uniV2 (address): 0x48584714106c724c6954c5546708aaD5811c29BD
Arg [1] : _modifiedUnipool (address): 0xeB8A0BaC52fE10949c088A43AfBBB42cF0C3684E
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000048584714106c724c6954c5546708aad5811c29bd
Arg [1] : 000000000000000000000000eb8a0bac52fe10949c088a43afbbb42cf0c3684e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.