Source Code
Overview
ETH Balance
ETH Value
$0.00| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
OracleV2GMoth
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./shadow/interfaces/IPool.sol";
import "./owner/Operator.sol";
interface IChainlinkPriceFeed {
function latestAnswer() external view returns (int256);
}
/**************************************************************************************************************************************************
/$$ /$$ /$$ /$$ /$$$$$$$$ /$$
| $$$ /$$$ | $$ | $$ | $$_____/|__/
| $$$$ /$$$$ /$$$$$$ /$$$$$$ | $$$$$$$ | $$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$$ /$$$$$$
| $$ $$/$$ $$ /$$__ $$|_ $$_/ | $$__ $$ | $$$$$ | $$| $$__ $$ |____ $$| $$__ $$ /$$_____/ /$$__ $$
| $$ $$$| $$| $$ \ $$ | $$ | $$ \ $$ | $$__/ | $$| $$ \ $$ /$$$$$$$| $$ \ $$| $$ | $$$$$$$$
| $$\ $ | $$| $$ | $$ | $$ /$$| $$ | $$ | $$ | $$| $$ | $$ /$$__ $$| $$ | $$| $$ | $$_____/
| $$ \/ | $$| $$$$$$/ | $$$$/| $$ | $$ | $$ | $$| $$ | $$| $$$$$$$| $$ | $$| $$$$$$$| $$$$$$$
|__/ |__/ \______/ \___/ |__/ |__/ |__/ |__/|__/ |__/ \_______/|__/ |__/ \_______/ \_______/
#### Website: https://moth.finance/
#### Author: kell
**************************************************************************************************************************************************/
contract OracleV2GMoth is Operator {
using SafeMath for uint256;
address public token0;
address public token1;
uint256 public granularityToUse = 1; // 1 observation every 30 minutes
bool public useTwap = false;
bool public useInstantPrice = true;
IPool public pair;
IChainlinkPriceFeed public constant ethUsdPriceFeed =
IChainlinkPriceFeed(0x3c6Cd9Cc7c7a4c2Cf5a82734CD249D7D593354dA); // get eth in usd
constructor(IPool _pair) public {
pair = _pair;
token0 = pair.token0();
token1 = pair.token1();
// uint256 reserve0;
// uint256 reserve1;
// (reserve0, reserve1, ) = pair.getReserves();
// require(reserve0 != 0 && reserve1 != 0, "Oracle: No reserves");
}
function update() external {
pair.sync();
}
function consult(
address _token,
uint256 _amountIn
) external view returns (uint256 amountOut) {
if (_token == token0) {
amountOut = _quote(_token, _amountIn, 12);
} else {
require(_token == token1, "Oracle: Invalid token");
amountOut = _quote(_token, _amountIn, 12);
}
}
function twap(
address _token,
uint256 _amountIn
) external view returns (uint256 amountOut) {
if (_token == token0) {
if (useTwap) {
amountOut = _quote(_token, _amountIn, granularityToUse);
} else {
if (useInstantPrice) {
amountOut = _getAmountOut(_token, _amountIn);
} else {
amountOut = _current(_token, _amountIn);
}
}
} else {
require(_token == token1, "Oracle: Invalid token");
if (useTwap) {
amountOut = _quote(_token, _amountIn, granularityToUse);
} else {
if (useInstantPrice) {
amountOut = _getAmountOut(_token, _amountIn);
} else {
amountOut = _current(_token, _amountIn);
}
}
}
}
// Note the window parameter is removed as its always 1 (30min), granularity at 12 for example is (12 * 30min) = 6 hours
function _quote(
address tokenIn,
uint256 amountIn,
uint256 granularity // number of observations to query
) internal view returns (uint256 amountOut) {
uint256 observationLength = IPool(pair).observationLength();
require(
granularity <= observationLength,
"Oracle: Not enough observations"
);
uint256 price = IPool(pair).quote(tokenIn, amountIn, granularity);
amountOut = price.mul(1e30).div(uint256(ethUsdPriceFeed.latestAnswer()).mul(1e10));
}
// Note the window parameter is removed as its always 1 (30min), granularity at 12 for example is (12 * 30min) = 6 hours
function _getAmountOut(
address tokenIn,
uint256 amountIn
) internal view returns (uint256 amountOut) {
uint256 reserve0;
uint256 reserve1;
(reserve0, reserve1, ) = IPool(pair).getReserves();
require(reserve0 != 0 && reserve1 != 0, "Oracle: No reserves");
uint256 price = IPool(pair).getAmountOut(amountIn, tokenIn);
amountOut = price.mul(1e30).div(uint256(ethUsdPriceFeed.latestAnswer()).mul(1e10));
}
// Note the window parameter is removed as its always 1 (30min), granularity at 12 for example is (12 * 30min) = 6 hours
function _current(
address tokenIn,
uint256 amountIn
) internal view returns (uint256 amountOut) {
uint256 observationLength = IPool(pair).observationLength();
require(
observationLength > 0,
"Oracle: Not enough observations"
);
uint256 price = IPool(pair).current(tokenIn, amountIn);
amountOut = price.mul(1e30).div(uint256(ethUsdPriceFeed.latestAnswer()).mul(1e10));
}
function setGranularity(uint256 _granularity) external onlyOperator {
granularityToUse = _granularity;
}
function setUseTwap(bool _useTwap) external onlyOperator {
useTwap = _useTwap;
}
function setUseInstantPrice(bool _useInstantPrice) external onlyOperator {
useInstantPrice = _useInstantPrice;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(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");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Operator is Context, Ownable {
address private _operator;
event OperatorTransferred(address indexed previousOperator, address indexed newOperator);
constructor() {
_operator = _msgSender();
emit OperatorTransferred(address(0), _operator);
}
function operator() public view returns (address) {
return _operator;
}
modifier onlyOperator() {
require(_operator == msg.sender, "operator: caller is not the operator");
_;
}
function isOperator() public view returns (bool) {
return _msgSender() == _operator;
}
function transferOperator(address newOperator_) public onlyOwner {
_transferOperator(newOperator_);
}
function _transferOperator(address newOperator_) internal {
require(newOperator_ != address(0), "operator: zero address given for new operator");
emit OperatorTransferred(address(0), newOperator_);
_operator = newOperator_;
}
function _renounceOperator() public onlyOwner {
emit OperatorTransferred(_operator, address(0));
_operator = address(0);
}
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.26;
interface IPool {
error NOT_AUTHORIZED();
error UNSTABLE_RATIO();
/// @dev safe transfer failed
error STF();
error OVERFLOW();
/// @dev skim disabled
error SD();
/// @dev insufficient liquidity minted
error ILM();
/// @dev insufficient liquidity burned
error ILB();
/// @dev insufficient output amount
error IOA();
/// @dev insufficient input amount
error IIA();
error IL();
error IT();
error K();
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Burn(
address indexed sender,
uint256 amount0,
uint256 amount1,
address indexed to
);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
/// @notice Same as prices with with an additional window argument.
/// Window = 2 means 2 * 30min (or 1 hr) between observations
/// @param tokenIn .
/// @param amountIn .
/// @param points .
/// @param window .
/// @return Array of TWAP prices
function sample(
address tokenIn,
uint256 amountIn,
uint256 points,
uint256 window
) external view returns (uint256[] memory);
function observations(uint256 index) external view returns (uint256 timestamp, uint256 reserve0Cumulative, uint256 reserve1Cumulative);
function current(address tokenIn, uint256 amountIn) external view returns (uint256 amountOut);
/// @notice Provides twap price with user configured granularity, up to the full window size
/// @param tokenIn .
/// @param amountIn .
/// @param granularity .
/// @return amountOut .
function quote(address tokenIn, uint256 amountIn, uint256 granularity) external view returns (uint256 amountOut);
/// @notice Get the number of observations recorded
function observationLength() external view returns (uint256);
/// @notice Address of token in the pool with the lower address value
function token0() external view returns (address);
/// @notice Address of token in the poool with the higher address value
function token1() external view returns (address);
/// @notice initialize the pool, called only once programatically
function initialize(
address _token0,
address _token1,
bool _stable
) external;
/// @notice calculate the current reserves of the pool and their last 'seen' timestamp
/// @return _reserve0 amount of token0 in reserves
/// @return _reserve1 amount of token1 in reserves
/// @return _blockTimestampLast the timestamp when the pool was last updated
function getReserves()
external
view
returns (
uint112 _reserve0,
uint112 _reserve1,
uint32 _blockTimestampLast
);
/// @notice mint the pair tokens (LPs)
/// @param to where to mint the LP tokens to
/// @return liquidity amount of LP tokens to mint
function mint(address to) external returns (uint256 liquidity);
/// @notice burn the pair tokens (LPs)
/// @param to where to send the underlying
/// @return amount0 amount of amount0
/// @return amount1 amount of amount1
function burn(
address to
) external returns (uint256 amount0, uint256 amount1);
/// @notice direct swap through the pool
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
/// @notice force balances to match reserves, can be used to harvest rebases from rebasing tokens or other external factors
/// @param to where to send the excess tokens to
function skim(address to) external;
/// @notice force reserves to match balances, prevents skim excess if skim is enabled
function sync() external;
/// @notice set the pair fees contract address
function setFeeRecipient(address _pairFees) external;
/// @notice set the feesplit variable
function setFeeSplit(uint256 _feeSplit) external;
/// @notice sets the swap fee of the pair
/// @dev max of 10_000 (10%)
/// @param _fee the fee
function setFee(uint256 _fee) external;
/// @notice 'mint' the fees as LP tokens
/// @dev this is used for protocol/voter fees
function mintFee() external;
/// @notice calculates the amount of tokens to receive post swap
/// @param amountIn the token amount
/// @param tokenIn the address of the token
function getAmountOut(
uint256 amountIn,
address tokenIn
) external view returns (uint256 amountOut);
/// @notice returns various metadata about the pair
function metadata()
external
view
returns (
uint256 _decimals0,
uint256 _decimals1,
uint256 _reserve0,
uint256 _reserve1,
bool _stable,
address _token0,
address _token1
);
/// @notice returns the feeSplit of the pair
function feeSplit() external view returns (uint256);
/// @notice returns the fee of the pair
function fee() external view returns (uint256);
/// @notice returns the feeRecipient of the pair
function feeRecipient() external view returns (address);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IPool","name":"_pair","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOperator","type":"address"},{"indexed":true,"internalType":"address","name":"newOperator","type":"address"}],"name":"OperatorTransferred","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"},{"inputs":[],"name":"_renounceOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amountIn","type":"uint256"}],"name":"consult","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethUsdPriceFeed","outputs":[{"internalType":"contract IChainlinkPriceFeed","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"granularityToUse","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"contract IPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_granularity","type":"uint256"}],"name":"setGranularity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_useInstantPrice","type":"bool"}],"name":"setUseInstantPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_useTwap","type":"bool"}],"name":"setUseTwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOperator_","type":"address"}],"name":"transferOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amountIn","type":"uint256"}],"name":"twap","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"update","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"useInstantPrice","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"useTwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405260016004556005805461ffff191661010017905534801561002457600080fd5b506040516110f93803806110f983398101604081905261004391610240565b61004c336101d8565b600180546001600160a01b031916339081179091556040516000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a380600560026101000a8154816001600160a01b0302191690836001600160a01b03160217905550600560029054906101000a90046001600160a01b03166001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610106573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061012a9190610240565b600280546001600160a01b0319166001600160a01b039283161790556005546040805163d21220a760e01b81529051620100009092049092169163d21220a79160048083019260209291908290030181865afa15801561018e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b29190610240565b600380546001600160a01b0319166001600160a01b039290921691909117905550610264565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461023d57600080fd5b50565b60006020828403121561025257600080fd5b815161025d81610228565b9392505050565b610e86806102736000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80636808a128116100ad578063a8aa1b3111610071578063a8aa1b311461025a578063c6af81d914610273578063d21220a714610286578063d5000cdf14610299578063f2fde38b146102ab57600080fd5b80636808a1281461021e578063715018a6146102315780638a27f103146102395780638da5cb5b14610241578063a2e620451461025257600080fd5b806342f6fb29116100f457806342f6fb29146101bd5780634456eda2146101d8578063570ca735146101f7578063588ff2d214610208578063625b36721461021157600080fd5b806306b5d2d0146101315780630dfe16811461014657806329605e77146101765780633b5fce92146101895780633ddac9531461019c575b600080fd5b61014461013f366004610ca2565b6102be565b005b600254610159906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b610144610184366004610ce7565b61030b565b610144610197366004610d02565b61031f565b6101af6101aa366004610d1b565b61034e565b60405190815260200161016d565b610159733c6cd9cc7c7a4c2cf5a82734cd249d7d593354da81565b6001546001600160a01b031633145b604051901515815260200161016d565b6001546001600160a01b0316610159565b6101af60045481565b6005546101e79060ff1681565b6101af61022c366004610d1b565b6103e4565b6101446104ca565b6101446104de565b6000546001600160a01b0316610159565b610144610530565b600554610159906201000090046001600160a01b031681565b610144610281366004610ca2565b61059a565b600354610159906001600160a01b031681565b6005546101e790610100900460ff1681565b6101446102b9366004610ce7565b6105d7565b6001546001600160a01b031633146102f15760405162461bcd60e51b81526004016102e890610d45565b60405180910390fd5b600580549115156101000261ff0019909216919091179055565b61031361064d565b61031c816106a7565b50565b6001546001600160a01b031633146103495760405162461bcd60e51b81526004016102e890610d45565b600455565b6002546000906001600160a01b039081169084160361037a576103738383600c61076b565b90506103de565b6003546001600160a01b038481169116146103cf5760405162461bcd60e51b815260206004820152601560248201527427b930b1b6329d1024b73b30b634b2103a37b5b2b760591b60448201526064016102e8565b6103db8383600c61076b565b90505b92915050565b6002546000906001600160a01b03908116908416036104395760055460ff161561041557610373838360045461076b565b600554610100900460ff161561042f57610373838361096c565b6103738383610a89565b6003546001600160a01b0384811691161461048e5760405162461bcd60e51b815260206004820152601560248201527427b930b1b6329d1024b73b30b634b2103a37b5b2b760591b60448201526064016102e8565b60055460ff16156104a657610373838360045461076b565b600554610100900460ff16156104c057610373838361096c565b6103db8383610a89565b6104d261064d565b6104dc6000610c3a565b565b6104e661064d565b6001546040516000916001600160a01b0316907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908390a3600180546001600160a01b0319169055565b600560029054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561058057600080fd5b505af1158015610594573d6000803e3d6000fd5b50505050565b6001546001600160a01b031633146105c45760405162461bcd60e51b81526004016102e890610d45565b6005805460ff1916911515919091179055565b6105df61064d565b6001600160a01b0381166106445760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102e8565b61031c81610c3a565b6000546001600160a01b031633146104dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e8565b6001600160a01b0381166107135760405162461bcd60e51b815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201526c103732bb9037b832b930ba37b960991b60648201526084016102e8565b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b600080600560029054906101000a90046001600160a01b03166001600160a01b031663ebeb31db6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e59190610d89565b9050808311156108375760405162461bcd60e51b815260206004820152601f60248201527f4f7261636c653a204e6f7420656e6f756768206f62736572766174696f6e730060448201526064016102e8565b600554604051639e8cc04b60e01b81526001600160a01b03878116600483015260248201879052604482018690526000926201000090041690639e8cc04b906064015b602060405180830381865afa158015610897573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bb9190610d89565b90506109626109456402540be400733c6cd9cc7c7a4c2cf5a82734cd249d7d593354da6001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561091b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093f9190610d89565b90610c8a565b61095c836c0c9f2c9cd04674edea40000000610c8a565b90610c96565b9695505050505050565b6000806000600560029054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156109c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e89190610db9565b506001600160701b0391821693501690508115801590610a0757508015155b610a495760405162461bcd60e51b81526020600482015260136024820152724f7261636c653a204e6f20726573657276657360681b60448201526064016102e8565b6005546040516378a051ad60e11b8152600481018690526001600160a01b038781166024830152600092620100009004169063f140a35a9060440161087a565b600080600560029054906101000a90046001600160a01b03166001600160a01b031663ebeb31db6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b039190610d89565b905060008111610b555760405162461bcd60e51b815260206004820152601f60248201527f4f7261636c653a204e6f7420656e6f756768206f62736572766174696f6e730060448201526064016102e8565b6005546040516328bd9fc160e11b81526001600160a01b03868116600483015260248201869052600092620100009004169063517b3f8290604401602060405180830381865afa158015610bad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd19190610d89565b9050610c316109456402540be400733c6cd9cc7c7a4c2cf5a82734cd249d7d593354da6001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561091b573d6000803e3d6000fd5b95945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006103db8284610e09565b60006103db8284610e2e565b600060208284031215610cb457600080fd5b81358015158114610cc457600080fd5b9392505050565b80356001600160a01b0381168114610ce257600080fd5b919050565b600060208284031215610cf957600080fd5b6103db82610ccb565b600060208284031215610d1457600080fd5b5035919050565b60008060408385031215610d2e57600080fd5b610d3783610ccb565b946020939093013593505050565b60208082526024908201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b600060208284031215610d9b57600080fd5b5051919050565b80516001600160701b0381168114610ce257600080fd5b600080600060608486031215610dce57600080fd5b610dd784610da2565b9250610de560208501610da2565b9150604084015163ffffffff81168114610dfe57600080fd5b809150509250925092565b80820281158282048414176103de57634e487b7160e01b600052601160045260246000fd5b600082610e4b57634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122091fe1b667256b4cf24d018cd01430f56ff3de2398f48fb3b7262755a45b11c7a64736f6c634300081a00330000000000000000000000008010847e10ce37c2694a8b06ba2225736feddb14
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80636808a128116100ad578063a8aa1b3111610071578063a8aa1b311461025a578063c6af81d914610273578063d21220a714610286578063d5000cdf14610299578063f2fde38b146102ab57600080fd5b80636808a1281461021e578063715018a6146102315780638a27f103146102395780638da5cb5b14610241578063a2e620451461025257600080fd5b806342f6fb29116100f457806342f6fb29146101bd5780634456eda2146101d8578063570ca735146101f7578063588ff2d214610208578063625b36721461021157600080fd5b806306b5d2d0146101315780630dfe16811461014657806329605e77146101765780633b5fce92146101895780633ddac9531461019c575b600080fd5b61014461013f366004610ca2565b6102be565b005b600254610159906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b610144610184366004610ce7565b61030b565b610144610197366004610d02565b61031f565b6101af6101aa366004610d1b565b61034e565b60405190815260200161016d565b610159733c6cd9cc7c7a4c2cf5a82734cd249d7d593354da81565b6001546001600160a01b031633145b604051901515815260200161016d565b6001546001600160a01b0316610159565b6101af60045481565b6005546101e79060ff1681565b6101af61022c366004610d1b565b6103e4565b6101446104ca565b6101446104de565b6000546001600160a01b0316610159565b610144610530565b600554610159906201000090046001600160a01b031681565b610144610281366004610ca2565b61059a565b600354610159906001600160a01b031681565b6005546101e790610100900460ff1681565b6101446102b9366004610ce7565b6105d7565b6001546001600160a01b031633146102f15760405162461bcd60e51b81526004016102e890610d45565b60405180910390fd5b600580549115156101000261ff0019909216919091179055565b61031361064d565b61031c816106a7565b50565b6001546001600160a01b031633146103495760405162461bcd60e51b81526004016102e890610d45565b600455565b6002546000906001600160a01b039081169084160361037a576103738383600c61076b565b90506103de565b6003546001600160a01b038481169116146103cf5760405162461bcd60e51b815260206004820152601560248201527427b930b1b6329d1024b73b30b634b2103a37b5b2b760591b60448201526064016102e8565b6103db8383600c61076b565b90505b92915050565b6002546000906001600160a01b03908116908416036104395760055460ff161561041557610373838360045461076b565b600554610100900460ff161561042f57610373838361096c565b6103738383610a89565b6003546001600160a01b0384811691161461048e5760405162461bcd60e51b815260206004820152601560248201527427b930b1b6329d1024b73b30b634b2103a37b5b2b760591b60448201526064016102e8565b60055460ff16156104a657610373838360045461076b565b600554610100900460ff16156104c057610373838361096c565b6103db8383610a89565b6104d261064d565b6104dc6000610c3a565b565b6104e661064d565b6001546040516000916001600160a01b0316907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908390a3600180546001600160a01b0319169055565b600560029054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561058057600080fd5b505af1158015610594573d6000803e3d6000fd5b50505050565b6001546001600160a01b031633146105c45760405162461bcd60e51b81526004016102e890610d45565b6005805460ff1916911515919091179055565b6105df61064d565b6001600160a01b0381166106445760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102e8565b61031c81610c3a565b6000546001600160a01b031633146104dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e8565b6001600160a01b0381166107135760405162461bcd60e51b815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201526c103732bb9037b832b930ba37b960991b60648201526084016102e8565b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b600080600560029054906101000a90046001600160a01b03166001600160a01b031663ebeb31db6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e59190610d89565b9050808311156108375760405162461bcd60e51b815260206004820152601f60248201527f4f7261636c653a204e6f7420656e6f756768206f62736572766174696f6e730060448201526064016102e8565b600554604051639e8cc04b60e01b81526001600160a01b03878116600483015260248201879052604482018690526000926201000090041690639e8cc04b906064015b602060405180830381865afa158015610897573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bb9190610d89565b90506109626109456402540be400733c6cd9cc7c7a4c2cf5a82734cd249d7d593354da6001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561091b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093f9190610d89565b90610c8a565b61095c836c0c9f2c9cd04674edea40000000610c8a565b90610c96565b9695505050505050565b6000806000600560029054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156109c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e89190610db9565b506001600160701b0391821693501690508115801590610a0757508015155b610a495760405162461bcd60e51b81526020600482015260136024820152724f7261636c653a204e6f20726573657276657360681b60448201526064016102e8565b6005546040516378a051ad60e11b8152600481018690526001600160a01b038781166024830152600092620100009004169063f140a35a9060440161087a565b600080600560029054906101000a90046001600160a01b03166001600160a01b031663ebeb31db6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b039190610d89565b905060008111610b555760405162461bcd60e51b815260206004820152601f60248201527f4f7261636c653a204e6f7420656e6f756768206f62736572766174696f6e730060448201526064016102e8565b6005546040516328bd9fc160e11b81526001600160a01b03868116600483015260248201869052600092620100009004169063517b3f8290604401602060405180830381865afa158015610bad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd19190610d89565b9050610c316109456402540be400733c6cd9cc7c7a4c2cf5a82734cd249d7d593354da6001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561091b573d6000803e3d6000fd5b95945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006103db8284610e09565b60006103db8284610e2e565b600060208284031215610cb457600080fd5b81358015158114610cc457600080fd5b9392505050565b80356001600160a01b0381168114610ce257600080fd5b919050565b600060208284031215610cf957600080fd5b6103db82610ccb565b600060208284031215610d1457600080fd5b5035919050565b60008060408385031215610d2e57600080fd5b610d3783610ccb565b946020939093013593505050565b60208082526024908201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b600060208284031215610d9b57600080fd5b5051919050565b80516001600160701b0381168114610ce257600080fd5b600080600060608486031215610dce57600080fd5b610dd784610da2565b9250610de560208501610da2565b9150604084015163ffffffff81168114610dfe57600080fd5b809150509250925092565b80820281158282048414176103de57634e487b7160e01b600052601160045260246000fd5b600082610e4b57634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122091fe1b667256b4cf24d018cd01430f56ff3de2398f48fb3b7262755a45b11c7a64736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008010847e10ce37c2694a8b06ba2225736feddb14
-----Decoded View---------------
Arg [0] : _pair (address): 0x8010847E10cE37c2694a8B06bA2225736FedDb14
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000008010847e10ce37c2694a8b06ba2225736feddb14
Loading...
Loading
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.