More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
MatchPairNormalV2
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "./MatchPairStorageV2.sol"; import "./MatchPairDelegator.sol"; contract MatchPairNormalV2 is MatchPairStorageV2, MatchPairDelegator { constructor(address _lpToken) public { lpToken = IUniswapV2Pair(_lpToken); } /** From Library */ function token(uint256 _index) public view override returns (address) { return _index == 0 ? lpToken.token0() : lpToken.token1(); } function setPriceSafeChecker(address _priceChecker) public onlyOwner() { priceChecker = IPriceSafeChecker(_priceChecker); } function setStakeGatling(address _gatlinAddress) public onlyOwner() { stakeGatling = IStakeGatling(_gatlinAddress); } function setMintLimit(uint256 _minMintToken0, uint256 _minMintToken1) public onlyOwner() { minMintToken0 = _minMintToken0; minMintToken1 = _minMintToken1; } function implementation() public view override returns (address) { return IProxyRegistry(masterCaller()).getProxy(PROXY_INDEX); } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; abstract contract DelegateCaller { function implementation() public view virtual returns (address); function delegateToImplementation(bytes memory data) public returns (bytes memory) { address impl = implementation(); require(impl != address(0), "NO implemention"); return delegateTo(impl, data); } function delegateTo(address callee, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returnData) = callee.delegatecall(data); assembly { if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) } } return returnData; } /** * @notice Delegates execution to an implementation contract * @dev It returns to the external caller whatever the implementation returns or forwards reverts * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop. * @param data The raw data to delegatecall * @return The returned bytes from the delegatecall */ function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) { (bool success, bytes memory returnData) = address(this).staticcall(abi.encodeWithSignature("delegateToImplementation(bytes)", data)); assembly { if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) } } return abi.decode(returnData, (bytes)); } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./uniswapv2/interfaces/IUniswapV2Pair.sol"; import './uniswapv2/libraries/UniswapV2Library.sol'; import './uniswapv2/libraries/TransferHelper.sol'; import "./utils/MasterCaller.sol"; import "./interfaces/IStakeGatling.sol"; import "./interfaces/IMatchPair.sol"; import "./interfaces/IPriceSafeChecker.sol"; import "./interfaces/IProxyRegistry.sol"; import "./DelegateCaller.sol"; abstract contract MatchPairDelegator is DelegateCaller, IMatchPair, Ownable, MasterCaller{ using SafeERC20 for IERC20; using SafeMath for uint256; function stake(uint256 _index, address _user,uint256 _amount) public override onlyMasterCaller() { delegateToImplementation( abi.encodeWithSignature("stake(uint256,address,uint256)", _index, _user, _amount ) ); } function untakeToken(uint256 _index, address _user,uint256 _amount) public override onlyMasterCaller() returns (uint256 _tokenAmount, uint256 _leftAmount) { bytes memory data = delegateToImplementation( abi.encodeWithSignature("untakeToken(uint256,address,uint256)", _index, _user, _amount )); return abi.decode(data, (uint256, uint256)); } function queueTokenAmount(uint256 _index) public view override returns (uint256) { bytes memory data = delegateToViewImplementation( abi.encodeWithSignature("queueTokenAmount(uint256)", _index )); return abi.decode(data, (uint256)); } function lPAmount(uint256 _index, address _user) public view returns (uint256) { bytes memory data = delegateToViewImplementation( abi.encodeWithSignature("lPAmount(uint256,address)", _index, _user )); return abi.decode(data, (uint256)); } function tokenAmount(uint256 _index, address _user) public view returns (uint256) { bytes memory data = delegateToViewImplementation( abi.encodeWithSignature("tokenAmount(uint256,address)", _index, _user )); return abi.decode(data, (uint256)); } function lp2TokenAmount(uint256 _liquidity) public view returns (uint256, uint256) { bytes memory data = delegateToViewImplementation( abi.encodeWithSignature("lp2TokenAmount(uint256)", _liquidity )); return abi.decode(data, (uint256, uint256)); } function maxAcceptAmount(uint256 _index, uint256 _molecular, uint256 _denominator, uint256 _inputAmount) public view override returns (uint256) { bytes memory data = delegateToViewImplementation( abi.encodeWithSignature("maxAcceptAmount(uint256,uint256,uint256,uint256)", _index, _molecular, _denominator, _inputAmount) ); return abi.decode(data, (uint256)); } function userPoint(uint256 _side, address _account) external view returns(uint256 ) { bytes memory data = delegateToViewImplementation( abi.encodeWithSignature("userPoint(uint256,address)", _side, _account )); return abi.decode(data, (uint256)); } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "./uniswapv2/interfaces/IUniswapV2Pair.sol"; import "./interfaces/IStakeGatling.sol"; import "./interfaces/IMatchPair.sol"; import "./interfaces/IPriceSafeChecker.sol"; contract MatchPairStorageV2{ uint256 public constant PROXY_INDEX = 3; IUniswapV2Pair public lpToken; IStakeGatling public stakeGatling; IPriceSafeChecker public priceChecker; //migrate via factory // IUniswapV2Factory public factoryAddress; struct UserInfo{ address user; uint256 tokenPoint; } uint256 public pendingToken0; uint256 public pendingToken1; uint256 public totalTokenPoint0; uint256 public totalTokenPoint1; // in UniswapV2.burn() call ,small LP cause Exception('UniswapV2: INSUFFICIENT_LIQUIDITY_BURNED') uint256 public sentinelAmount = 500; // filter too small asset, saving gas uint256 public minMintToken0; uint256 public minMintToken1; mapping(address => UserInfo) userInfo0; mapping(address => UserInfo) userInfo1; event Stake(bool _index0, address _user, uint256 _amount); }
pragma solidity 0.6.12; interface IMatchPair { function stake(uint256 _index, address _user,uint256 _amount) external; // owner function untakeToken(uint256 _index, address _user,uint256 _amount) external returns (uint256 _tokenAmount, uint256 _leftAmount);// owner // function untakeLP(uint256 _index, address _user,uint256 _amount) external returns (uint256);// owner function token(uint256 _index) external view returns (address); //token0 - token1 Amount //LP0 - LP1 Amount // queue Token0 / token1 function queueTokenAmount(uint256 _index) external view returns (uint256); // max Accept Amount function maxAcceptAmount(uint256 _index, uint256 _molecular, uint256 _denominator, uint256 _inputAmount) external view returns (uint256); }
pragma solidity 0.6.12; interface IPriceSafeChecker { //checking price ( _reserve0/_reserve1 ) to making sure in a safe range function checkPrice(uint256 _reserve0, uint256 _reserve1) external view ; event SettingPriceRang(uint256 _minPriceNumerator, uint256 _minPriceDenominator, uint256 _maxPriceNumerator, uint256 _maxPriceDenominator); }
pragma solidity 0.6.12; interface IProxyRegistry { function getProxy(uint256 _index) external view returns(address); }
pragma solidity 0.6.12; interface IStakeGatling { function stake(uint256 _amount) external; function withdraw(uint256 _amount) external; function presentRate() external view returns (uint256); function totalLPAmount() external view returns (uint256); function totalToken() external view returns (uint256 amount0, uint256 amount1); function burn(address _to, uint256 _amount) external returns (uint256 amount0, uint256 amount1); function lpStakeDst() external view returns (address); }
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 migrator() 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; function setMigrator(address) external; }
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.6.12; // a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math) library SafeMathUniswap { function add(uint x, uint y) internal pure returns (uint z) { require((z = x + y) >= x, 'ds-math-add-overflow'); } function sub(uint x, uint y) internal pure returns (uint z) { require((z = x - y) <= x, 'ds-math-sub-underflow'); } function mul(uint x, uint y) internal pure returns (uint z) { require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow'); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.0; // helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false library TransferHelper { function safeApprove(address token, address to, uint value) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED'); } function safeTransfer(address token, address to, uint value) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED'); } function safeTransferFrom(address token, address from, address to, uint value) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED'); } function safeTransferETH(address to, uint value) internal { (bool success,) = to.call{value:value}(new bytes(0)); require(success, 'TransferHelper: ETH_TRANSFER_FAILED'); } }
pragma solidity >=0.5.0; import '../interfaces/IUniswapV2Pair.sol'; import '../interfaces/IUniswapV2Factory.sol'; import "./SafeMath.sol"; library UniswapV2Library { using SafeMathUniswap for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES'); (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS'); } // calculates the CREATE2 address for a pair without making any external calls function pairFor(address factory, address tokenA, address tokenB) internal view returns (address pair) { (address token0, address token1) = sortTokens(tokenA, tokenB); pair = IUniswapV2Factory(factory).getPair(token0, token1); // = address(uint(keccak256(abi.encodePacked( // hex'ff', // factory, // keccak256(abi.encodePacked(token0, token1)), // hex'e18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303' // init code hash // )))); } // fetches and sorts the reserves for a pair function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) { (address token0,) = sortTokens(tokenA, tokenB); (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves(); (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0); } // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) { require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT'); require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY'); amountB = amountA.mul(reserveB) / reserveA; } // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) { require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT'); require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY'); uint amountInWithFee = amountIn.mul(997); uint numerator = amountInWithFee.mul(reserveOut); uint denominator = reserveIn.mul(1000).add(amountInWithFee); amountOut = numerator / denominator; } // given an output amount of an asset and pair reserves, returns a required input amount of the other asset function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) { require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT'); require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY'); uint numerator = reserveIn.mul(amountOut).mul(1000); uint denominator = reserveOut.sub(amountOut).mul(997); amountIn = (numerator / denominator).add(1); } // performs chained getAmountOut calculations on any number of pairs function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) { require(path.length >= 2, 'UniswapV2Library: INVALID_PATH'); amounts = new uint[](path.length); amounts[0] = amountIn; for (uint i; i < path.length - 1; i++) { (uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]); amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut); } } // performs chained getAmountIn calculations on any number of pairs function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) { require(path.length >= 2, 'UniswapV2Library: INVALID_PATH'); amounts = new uint[](path.length); amounts[amounts.length - 1] = amountOut; for (uint i = path.length - 1; i > 0; i--) { (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]); amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; contract MasterCaller { address private _master; event MastershipTransferred(address indexed previousMaster, address indexed newMaster); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _master = msg.sender; emit MastershipTransferred(address(0), _master); } /** * @dev Returns the address of the current MasterCaller. */ function masterCaller() public view returns (address) { return _master; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyMasterCaller() { require(_master == msg.sender, "Master: caller is not the master"); _; } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferMastership(address newMaster) public virtual onlyMasterCaller { require(newMaster != address(0), "Master: new owner is the zero address"); emit MastershipTransferred(_master, newMaster); _master = newMaster; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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 () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), 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 { 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 virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.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, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { 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) { 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) { // 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) { 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) { 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) { 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) { require(b <= a, "SafeMath: subtraction overflow"); 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) { 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, reverting 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) { require(b > 0, "SafeMath: division by zero"); 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) { require(b > 0, "SafeMath: modulo by zero"); 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) { 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. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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) { 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) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ 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); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.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 IERC20;` 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)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // 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. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); 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"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <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; // solhint-disable-next-line no-inline-assembly 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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 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. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "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":"_lpToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousMaster","type":"address"},{"indexed":true,"internalType":"address","name":"newMaster","type":"address"}],"name":"MastershipTransferred","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":false,"internalType":"bool","name":"_index0","type":"bool"},{"indexed":false,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Stake","type":"event"},{"inputs":[],"name":"PROXY_INDEX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"delegateToImplementation","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"delegateToViewImplementation","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"lPAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_liquidity","type":"uint256"}],"name":"lp2TokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpToken","outputs":[{"internalType":"contract IUniswapV2Pair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterCaller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"uint256","name":"_molecular","type":"uint256"},{"internalType":"uint256","name":"_denominator","type":"uint256"},{"internalType":"uint256","name":"_inputAmount","type":"uint256"}],"name":"maxAcceptAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minMintToken0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minMintToken1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingToken0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingToken1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceChecker","outputs":[{"internalType":"contract IPriceSafeChecker","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"queueTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sentinelAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minMintToken0","type":"uint256"},{"internalType":"uint256","name":"_minMintToken1","type":"uint256"}],"name":"setMintLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_priceChecker","type":"address"}],"name":"setPriceSafeChecker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gatlinAddress","type":"address"}],"name":"setStakeGatling","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeGatling","outputs":[{"internalType":"contract IStakeGatling","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"tokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokenPoint0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokenPoint1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newMaster","type":"address"}],"name":"transferMastership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"untakeToken","outputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"internalType":"uint256","name":"_leftAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_side","type":"uint256"},{"internalType":"address","name":"_account","type":"address"}],"name":"userPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526101f460075534801561001657600080fd5b506040516115ee3803806115ee8339818101604052602081101561003957600080fd5b50516000610045610104565b600c80546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600d80546001600160a01b0319163317908190556040516001600160a01b0391909116906000907fcdcbd4b72fc8f770531ce2b3fd5fa59dd682740e699d4a37fd65062507a8d22c908290a3600080546001600160a01b0319166001600160a01b0392909216919091179055610108565b3390565b6114d7806101176000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c80637886422f1161010f578063c3f59687116100a2578063ec2944ae11610071578063ec2944ae14610657578063f2fde38b1461065f578063fca0064d14610685578063fcc0d5171461068d576101e5565b8063c3f59687146105ef578063d4c36b9414610615578063d96aefbe1461061d578063e4dc995114610625576101e5565b80639174cbe8116100de5780639174cbe814610559578063928ae6e914610585578063ad9da7bd146105b1578063ae53c8b2146105e7576101e5565b80637886422f146104fd5780638aaa7cd8146105055780638da5cb5b1461052b578063900f87c614610533576101e5565b80635c60da1b116101875780636abc2957116101565780636abc2957146104965780636e9c931c1461049e5780636fad40d5146104d2578063715018a6146104f5576101e5565b80635c60da1b146104525780635fcbd2851461045a578063652f05391461046257806369de996f1461048e576101e5565b8063379ff896116101c3578063379ff8961461036d5780634487152f14610375578063456b8e221461041b578063543233291461044a576101e5565b8063044215c6146101ea5780630933c1ed146102235780632f5aab221461033e575b600080fd5b6102076004803603602081101561020057600080fd5b5035610695565b604080516001600160a01b039092168252519081900360200190f35b6102c96004803603602081101561023957600080fd5b81019060208101813564010000000081111561025457600080fd5b82018360208201111561026657600080fd5b8035906020019184600183028401116401000000008311171561028857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610799945050505050565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103035781810151838201526020016102eb565b50505050905090810190601f1680156103305780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61035b6004803603602081101561035457600080fd5b5035610805565b60408051918252519081900360200190f35b61035b61086c565b6102c96004803603602081101561038b57600080fd5b8101906020810181356401000000008111156103a657600080fd5b8201836020820111156103b857600080fd5b803590602001918460018302840111640100000000831117156103da57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610872945050505050565b61035b6004803603608081101561043157600080fd5b5080359060208101359060408101359060600135610a93565b610207610b12565b610207610b21565b610207610ba0565b61035b6004803603604081101561047857600080fd5b50803590602001356001600160a01b0316610baf565b61035b610c29565b610207610c2f565b6104d0600480360360608110156104b457600080fd5b508035906001600160a01b036020820135169060400135610c3e565b005b6104d0600480360360408110156104e857600080fd5b5080359060200135610cfa565b6104d0610d67565b61035b610e13565b6104d06004803603602081101561051b57600080fd5b50356001600160a01b0316610e19565b610207610e9d565b6104d06004803603602081101561054957600080fd5b50356001600160a01b0316610eac565b61035b6004803603604081101561056f57600080fd5b50803590602001356001600160a01b0316610f30565b61035b6004803603604081101561059b57600080fd5b50803590602001356001600160a01b0316610f89565b6105ce600480360360208110156105c757600080fd5b5035610fe2565b6040805192835260208301919091528051918290030190f35b61035b611056565b6104d06004803603602081101561060557600080fd5b50356001600160a01b031661105c565b61035b61115c565b61035b611162565b6105ce6004803603606081101561063b57600080fd5b508035906001600160a01b036020820135169060400135611167565b610207611252565b6104d06004803603602081101561067557600080fd5b50356001600160a01b0316611261565b61035b611364565b61035b61136a565b6000811561071a5760008054906101000a90046001600160a01b03166001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156106e957600080fd5b505afa1580156106fd573d6000803e3d6000fd5b505050506040513d602081101561071357600080fd5b5051610793565b60008054906101000a90046001600160a01b03166001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561076657600080fd5b505afa15801561077a573d6000803e3d6000fd5b505050506040513d602081101561079057600080fd5b50515b92915050565b606060006107a5610b21565b90506001600160a01b0381166107f4576040805162461bcd60e51b815260206004820152600f60248201526e27279034b6b83632b6b2b73a34b7b760891b604482015290519081900360640190fd5b6107fe8184611370565b9392505050565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b03166317ad559160e11b17905260009060609061084c90610872565b905080806020019051602081101561086357600080fd5b50519392505050565b60045481565b606060006060306001600160a01b0316846040516024018080602001828103825283818151815260200191508051906020019080838360005b838110156108c35781810151838201526020016108ab565b50505050905090810190601f1680156108f05780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b178152905182519295509350839250908083835b6020831061094b5780518252601f19909201916020918201910161092c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146109ab576040519150601f19603f3d011682016040523d82523d6000602084013e6109b0565b606091505b509150915060008214156109c5573d60208201fd5b8080602001905160208110156109da57600080fd5b81019080805160405193929190846401000000008211156109fa57600080fd5b908301906020820185811115610a0f57600080fd5b8251640100000000811182820188101715610a2957600080fd5b82525081516020918201929091019080838360005b83811015610a56578181015183820152602001610a3e565b50505050905090810190601f168015610a835780820380516001836020036101000a031916815260200191505b5060405250505092505050919050565b6040805160248101869052604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b03166322b5c71160e11b179052600090606090610aef90610872565b9050808060200190516020811015610b0657600080fd5b50519695505050505050565b600d546001600160a01b031690565b6000610b2b610b12565b6001600160a01b031663d4c43fd060036040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610b6f57600080fd5b505afa158015610b83573d6000803e3d6000fd5b505050506040513d6020811015610b9957600080fd5b5051905090565b6000546001600160a01b031681565b60408051602481018490526001600160a01b0383166044808301919091528251808303909101815260649091019091526020810180516001600160e01b031663652f053960e01b179052600090606090610c0890610872565b9050808060200190516020811015610c1f57600080fd5b5051949350505050565b60035481565b6001546001600160a01b031681565b600d546001600160a01b03163314610c9d576040805162461bcd60e51b815260206004820181905260248201527f4d61737465723a2063616c6c6572206973206e6f7420746865206d6173746572604482015290519081900360640190fd5b60408051602481018590526001600160a01b038416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b0316631ba724c760e21b179052610cf490610799565b50505050565b610d02611432565b6001600160a01b0316610d13610e9d565b6001600160a01b031614610d5c576040805162461bcd60e51b8152602060048201819052602482015260008051602061145d833981519152604482015290519081900360640190fd5b600891909155600955565b610d6f611432565b6001600160a01b0316610d80610e9d565b6001600160a01b031614610dc9576040805162461bcd60e51b8152602060048201819052602482015260008051602061145d833981519152604482015290519081900360640190fd5b600c546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600c80546001600160a01b0319169055565b60075481565b610e21611432565b6001600160a01b0316610e32610e9d565b6001600160a01b031614610e7b576040805162461bcd60e51b8152602060048201819052602482015260008051602061145d833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600c546001600160a01b031690565b610eb4611432565b6001600160a01b0316610ec5610e9d565b6001600160a01b031614610f0e576040805162461bcd60e51b8152602060048201819052602482015260008051602061145d833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60408051602481018490526001600160a01b0383166044808301919091528251808303909101815260649091019091526020810180516001600160e01b031663122e997d60e31b179052600090606090610c0890610872565b60408051602481018490526001600160a01b0383166044808301919091528251808303909101815260649091019091526020810180516001600160e01b031663928ae6e960e01b179052600090606090610c0890610872565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663ad9da7bd60e01b179052600090819060609061102b90610872565b905080806020019051604081101561104257600080fd5b508051602090910151909350915050915091565b60055481565b600d546001600160a01b031633146110bb576040805162461bcd60e51b815260206004820181905260248201527f4d61737465723a2063616c6c6572206973206e6f7420746865206d6173746572604482015290519081900360640190fd5b6001600160a01b0381166111005760405162461bcd60e51b815260040180806020018281038252602581526020018061147d6025913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907fcdcbd4b72fc8f770531ce2b3fd5fa59dd682740e699d4a37fd65062507a8d22c90600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b60085481565b600381565b600d5460009081906001600160a01b031633146111cb576040805162461bcd60e51b815260206004820181905260248201527f4d61737465723a2063616c6c6572206973206e6f7420746865206d6173746572604482015290519081900360640190fd5b60408051602481018790526001600160a01b038616604482015260648082018690528251808303909101815260849091019091526020810180516001600160e01b031663e4dc995160e01b17905260609061122590610799565b905080806020019051604081101561123c57600080fd5b5080516020909101519097909650945050505050565b6002546001600160a01b031681565b611269611432565b6001600160a01b031661127a610e9d565b6001600160a01b0316146112c3576040805162461bcd60e51b8152602060048201819052602482015260008051602061145d833981519152604482015290519081900360640190fd5b6001600160a01b0381166113085760405162461bcd60e51b81526004018080602001828103825260268152602001806114376026913960400191505060405180910390fd5b600c546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600c80546001600160a01b0319166001600160a01b0392909216919091179055565b60095481565b60065481565b606060006060846001600160a01b0316846040518082805190602001908083835b602083106113b05780518252601f199092019160209182019101611391565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114611410576040519150601f19603f3d011682016040523d82523d6000602084013e611415565b606091505b5091509150600082141561142a573d60208201fd5b949350505050565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724d61737465723a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220fd32f92d357c42cbdd57cdb826f92eaa598398600a667af17245afc104156a7f64736f6c634300060c0033000000000000000000000000397ff1542f962076d0bfe58ea045ffa2d347aca0
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101e55760003560e01c80637886422f1161010f578063c3f59687116100a2578063ec2944ae11610071578063ec2944ae14610657578063f2fde38b1461065f578063fca0064d14610685578063fcc0d5171461068d576101e5565b8063c3f59687146105ef578063d4c36b9414610615578063d96aefbe1461061d578063e4dc995114610625576101e5565b80639174cbe8116100de5780639174cbe814610559578063928ae6e914610585578063ad9da7bd146105b1578063ae53c8b2146105e7576101e5565b80637886422f146104fd5780638aaa7cd8146105055780638da5cb5b1461052b578063900f87c614610533576101e5565b80635c60da1b116101875780636abc2957116101565780636abc2957146104965780636e9c931c1461049e5780636fad40d5146104d2578063715018a6146104f5576101e5565b80635c60da1b146104525780635fcbd2851461045a578063652f05391461046257806369de996f1461048e576101e5565b8063379ff896116101c3578063379ff8961461036d5780634487152f14610375578063456b8e221461041b578063543233291461044a576101e5565b8063044215c6146101ea5780630933c1ed146102235780632f5aab221461033e575b600080fd5b6102076004803603602081101561020057600080fd5b5035610695565b604080516001600160a01b039092168252519081900360200190f35b6102c96004803603602081101561023957600080fd5b81019060208101813564010000000081111561025457600080fd5b82018360208201111561026657600080fd5b8035906020019184600183028401116401000000008311171561028857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610799945050505050565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103035781810151838201526020016102eb565b50505050905090810190601f1680156103305780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61035b6004803603602081101561035457600080fd5b5035610805565b60408051918252519081900360200190f35b61035b61086c565b6102c96004803603602081101561038b57600080fd5b8101906020810181356401000000008111156103a657600080fd5b8201836020820111156103b857600080fd5b803590602001918460018302840111640100000000831117156103da57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610872945050505050565b61035b6004803603608081101561043157600080fd5b5080359060208101359060408101359060600135610a93565b610207610b12565b610207610b21565b610207610ba0565b61035b6004803603604081101561047857600080fd5b50803590602001356001600160a01b0316610baf565b61035b610c29565b610207610c2f565b6104d0600480360360608110156104b457600080fd5b508035906001600160a01b036020820135169060400135610c3e565b005b6104d0600480360360408110156104e857600080fd5b5080359060200135610cfa565b6104d0610d67565b61035b610e13565b6104d06004803603602081101561051b57600080fd5b50356001600160a01b0316610e19565b610207610e9d565b6104d06004803603602081101561054957600080fd5b50356001600160a01b0316610eac565b61035b6004803603604081101561056f57600080fd5b50803590602001356001600160a01b0316610f30565b61035b6004803603604081101561059b57600080fd5b50803590602001356001600160a01b0316610f89565b6105ce600480360360208110156105c757600080fd5b5035610fe2565b6040805192835260208301919091528051918290030190f35b61035b611056565b6104d06004803603602081101561060557600080fd5b50356001600160a01b031661105c565b61035b61115c565b61035b611162565b6105ce6004803603606081101561063b57600080fd5b508035906001600160a01b036020820135169060400135611167565b610207611252565b6104d06004803603602081101561067557600080fd5b50356001600160a01b0316611261565b61035b611364565b61035b61136a565b6000811561071a5760008054906101000a90046001600160a01b03166001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156106e957600080fd5b505afa1580156106fd573d6000803e3d6000fd5b505050506040513d602081101561071357600080fd5b5051610793565b60008054906101000a90046001600160a01b03166001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561076657600080fd5b505afa15801561077a573d6000803e3d6000fd5b505050506040513d602081101561079057600080fd5b50515b92915050565b606060006107a5610b21565b90506001600160a01b0381166107f4576040805162461bcd60e51b815260206004820152600f60248201526e27279034b6b83632b6b2b73a34b7b760891b604482015290519081900360640190fd5b6107fe8184611370565b9392505050565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b03166317ad559160e11b17905260009060609061084c90610872565b905080806020019051602081101561086357600080fd5b50519392505050565b60045481565b606060006060306001600160a01b0316846040516024018080602001828103825283818151815260200191508051906020019080838360005b838110156108c35781810151838201526020016108ab565b50505050905090810190601f1680156108f05780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b178152905182519295509350839250908083835b6020831061094b5780518252601f19909201916020918201910161092c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146109ab576040519150601f19603f3d011682016040523d82523d6000602084013e6109b0565b606091505b509150915060008214156109c5573d60208201fd5b8080602001905160208110156109da57600080fd5b81019080805160405193929190846401000000008211156109fa57600080fd5b908301906020820185811115610a0f57600080fd5b8251640100000000811182820188101715610a2957600080fd5b82525081516020918201929091019080838360005b83811015610a56578181015183820152602001610a3e565b50505050905090810190601f168015610a835780820380516001836020036101000a031916815260200191505b5060405250505092505050919050565b6040805160248101869052604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b03166322b5c71160e11b179052600090606090610aef90610872565b9050808060200190516020811015610b0657600080fd5b50519695505050505050565b600d546001600160a01b031690565b6000610b2b610b12565b6001600160a01b031663d4c43fd060036040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610b6f57600080fd5b505afa158015610b83573d6000803e3d6000fd5b505050506040513d6020811015610b9957600080fd5b5051905090565b6000546001600160a01b031681565b60408051602481018490526001600160a01b0383166044808301919091528251808303909101815260649091019091526020810180516001600160e01b031663652f053960e01b179052600090606090610c0890610872565b9050808060200190516020811015610c1f57600080fd5b5051949350505050565b60035481565b6001546001600160a01b031681565b600d546001600160a01b03163314610c9d576040805162461bcd60e51b815260206004820181905260248201527f4d61737465723a2063616c6c6572206973206e6f7420746865206d6173746572604482015290519081900360640190fd5b60408051602481018590526001600160a01b038416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b0316631ba724c760e21b179052610cf490610799565b50505050565b610d02611432565b6001600160a01b0316610d13610e9d565b6001600160a01b031614610d5c576040805162461bcd60e51b8152602060048201819052602482015260008051602061145d833981519152604482015290519081900360640190fd5b600891909155600955565b610d6f611432565b6001600160a01b0316610d80610e9d565b6001600160a01b031614610dc9576040805162461bcd60e51b8152602060048201819052602482015260008051602061145d833981519152604482015290519081900360640190fd5b600c546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600c80546001600160a01b0319169055565b60075481565b610e21611432565b6001600160a01b0316610e32610e9d565b6001600160a01b031614610e7b576040805162461bcd60e51b8152602060048201819052602482015260008051602061145d833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600c546001600160a01b031690565b610eb4611432565b6001600160a01b0316610ec5610e9d565b6001600160a01b031614610f0e576040805162461bcd60e51b8152602060048201819052602482015260008051602061145d833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60408051602481018490526001600160a01b0383166044808301919091528251808303909101815260649091019091526020810180516001600160e01b031663122e997d60e31b179052600090606090610c0890610872565b60408051602481018490526001600160a01b0383166044808301919091528251808303909101815260649091019091526020810180516001600160e01b031663928ae6e960e01b179052600090606090610c0890610872565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663ad9da7bd60e01b179052600090819060609061102b90610872565b905080806020019051604081101561104257600080fd5b508051602090910151909350915050915091565b60055481565b600d546001600160a01b031633146110bb576040805162461bcd60e51b815260206004820181905260248201527f4d61737465723a2063616c6c6572206973206e6f7420746865206d6173746572604482015290519081900360640190fd5b6001600160a01b0381166111005760405162461bcd60e51b815260040180806020018281038252602581526020018061147d6025913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907fcdcbd4b72fc8f770531ce2b3fd5fa59dd682740e699d4a37fd65062507a8d22c90600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b60085481565b600381565b600d5460009081906001600160a01b031633146111cb576040805162461bcd60e51b815260206004820181905260248201527f4d61737465723a2063616c6c6572206973206e6f7420746865206d6173746572604482015290519081900360640190fd5b60408051602481018790526001600160a01b038616604482015260648082018690528251808303909101815260849091019091526020810180516001600160e01b031663e4dc995160e01b17905260609061122590610799565b905080806020019051604081101561123c57600080fd5b5080516020909101519097909650945050505050565b6002546001600160a01b031681565b611269611432565b6001600160a01b031661127a610e9d565b6001600160a01b0316146112c3576040805162461bcd60e51b8152602060048201819052602482015260008051602061145d833981519152604482015290519081900360640190fd5b6001600160a01b0381166113085760405162461bcd60e51b81526004018080602001828103825260268152602001806114376026913960400191505060405180910390fd5b600c546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600c80546001600160a01b0319166001600160a01b0392909216919091179055565b60095481565b60065481565b606060006060846001600160a01b0316846040518082805190602001908083835b602083106113b05780518252601f199092019160209182019101611391565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114611410576040519150601f19603f3d011682016040523d82523d6000602084013e611415565b606091505b5091509150600082141561142a573d60208201fd5b949350505050565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724d61737465723a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220fd32f92d357c42cbdd57cdb826f92eaa598398600a667af17245afc104156a7f64736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000397ff1542f962076d0bfe58ea045ffa2d347aca0
-----Decoded View---------------
Arg [0] : _lpToken (address): 0x397FF1542f962076d0BFE58eA045FfA2d347ACa0
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000397ff1542f962076d0bfe58ea045ffa2d347aca0
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.999767 | 161.4656 | $161.43 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.