Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 1,119 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Update | 12088215 | 1822 days ago | IN | 0 ETH | 0.00817834 | ||||
| Update | 12080803 | 1823 days ago | IN | 0 ETH | 0.00647866 | ||||
| Update | 12078705 | 1823 days ago | IN | 0 ETH | 0.00675602 | ||||
| Update | 12074101 | 1824 days ago | IN | 0 ETH | 0.00739606 | ||||
| Update | 12073550 | 1824 days ago | IN | 0 ETH | 0.00718271 | ||||
| Update | 12071906 | 1824 days ago | IN | 0 ETH | 0.00853392 | ||||
| Update | 12067859 | 1825 days ago | IN | 0 ETH | 0.00881838 | ||||
| Update | 12067026 | 1825 days ago | IN | 0 ETH | 0.00974289 | ||||
| Update | 12066756 | 1825 days ago | IN | 0 ETH | 0.00931619 | ||||
| Update | 12066473 | 1825 days ago | IN | 0 ETH | 0.00896061 | ||||
| Update | 12066190 | 1825 days ago | IN | 0 ETH | 0.0086548 | ||||
| Update | 12065949 | 1825 days ago | IN | 0 ETH | 0.0106674 | ||||
| Update | 12065665 | 1825 days ago | IN | 0 ETH | 0.00881838 | ||||
| Update | 12065378 | 1825 days ago | IN | 0 ETH | 0.00909382 | ||||
| Update | 12065164 | 1825 days ago | IN | 0 ETH | 0.00967177 | ||||
| Update | 12064862 | 1825 days ago | IN | 0 ETH | 0.01258753 | ||||
| Update | 12064597 | 1825 days ago | IN | 0 ETH | 0.01345514 | ||||
| Update | 12064313 | 1825 days ago | IN | 0 ETH | 0.00924508 | ||||
| Update | 12064020 | 1826 days ago | IN | 0 ETH | 0.01088074 | ||||
| Update | 12063753 | 1826 days ago | IN | 0 ETH | 0.01484759 | ||||
| Update | 12063501 | 1826 days ago | IN | 0 ETH | 0.01144967 | ||||
| Update | 12063196 | 1826 days ago | IN | 0 ETH | 0.0117906 | ||||
| Update | 12062969 | 1826 days ago | IN | 0 ETH | 0.01093892 | ||||
| Update | 12062651 | 1826 days ago | IN | 0 ETH | 0.00934468 | ||||
| Update | 12062373 | 1826 days ago | IN | 0 ETH | 0.00871752 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Oracle
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.6.0;
import '@openzeppelin/contracts/math/SafeMath.sol';
import './lib/Babylonian.sol';
import './lib/FixedPoint.sol';
import './lib/UniswapV2Library.sol';
import './lib/UniswapV2OracleLibrary.sol';
import './utils/Epoch.sol';
import './interfaces/IUniswapV2Pair.sol';
import './interfaces/IUniswapV2Factory.sol';
// fixed window oracle that recomputes the average price for the entire period once every period
// note that the price average is only guaranteed to be over at least 1 period, but may be over a longer period
contract Oracle is Epoch {
using FixedPoint for *;
using SafeMath for uint256;
/* ========== STATE VARIABLES ========== */
// uniswap
address public token0;
address public token1;
IUniswapV2Pair public pair;
// oracle
uint32 public blockTimestampLast;
uint256 public price0CumulativeLast;
uint256 public price1CumulativeLast;
FixedPoint.uq112x112 public price0Average;
FixedPoint.uq112x112 public price1Average;
/* ========== CONSTRUCTOR ========== */
constructor(
address _factory,
address _tokenA,
address _tokenB,
uint256 _period,
uint256 _startTime
) public Epoch(_period, _startTime, 0) {
IUniswapV2Pair _pair = IUniswapV2Pair(
UniswapV2Library.pairFor(_factory, _tokenA, _tokenB)
);
pair = _pair;
token0 = _pair.token0();
token1 = _pair.token1();
price0CumulativeLast = _pair.price0CumulativeLast(); // fetch the current accumulated price value (1 / 0)
price1CumulativeLast = _pair.price1CumulativeLast(); // fetch the current accumulated price value (0 / 1)
uint112 reserve0;
uint112 reserve1;
(reserve0, reserve1, blockTimestampLast) = _pair.getReserves();
require(reserve0 != 0 && reserve1 != 0, 'Oracle: NO_RESERVES'); // ensure that there's liquidity in the pair
}
/* ========== MUTABLE FUNCTIONS ========== */
/** @dev Updates 1-day EMA price from Uniswap. */
function update() external checkEpoch {
(
uint256 price0Cumulative,
uint256 price1Cumulative,
uint32 blockTimestamp
) = UniswapV2OracleLibrary.currentCumulativePrices(address(pair));
uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired
if (timeElapsed == 0) {
// prevent divided by zero
return;
}
// overflow is desired, casting never truncates
// cumulative price is in (uq112x112 price * seconds) units so we simply wrap it after division by time elapsed
price0Average = FixedPoint.uq112x112(
uint224((price0Cumulative - price0CumulativeLast) / timeElapsed)
);
price1Average = FixedPoint.uq112x112(
uint224((price1Cumulative - price1CumulativeLast) / timeElapsed)
);
price0CumulativeLast = price0Cumulative;
price1CumulativeLast = price1Cumulative;
blockTimestampLast = blockTimestamp;
emit Updated(price0Cumulative, price1Cumulative);
}
// note this will always return 0 before update has been called successfully for the first time.
function consult(address token, uint256 amountIn)
external
view
returns (uint144 amountOut)
{
if (token == token0) {
amountOut = price0Average.mul(amountIn).decode144();
} else {
require(token == token1, 'Oracle: INVALID_TOKEN');
amountOut = price1Average.mul(amountIn).decode144();
}
}
function pairFor(
address factory,
address tokenA,
address tokenB
) external pure returns (address lpt) {
return UniswapV2Library.pairFor(factory, tokenA, tokenB);
}
event Updated(uint256 price0CumulativeLast, uint256 price1CumulativeLast);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}pragma solidity ^0.6.0;
library Babylonian {
function sqrt(uint256 y) internal pure returns (uint256 z) {
if (y > 3) {
z = y;
uint256 x = y / 2 + 1;
while (x < z) {
z = x;
x = (y / x + x) / 2;
}
} else if (y != 0) {
z = 1;
}
// else z = 0
}
}pragma solidity ^0.6.0;
import './Babylonian.sol';
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
library FixedPoint {
// range: [0, 2**112 - 1]
// resolution: 1 / 2**112
struct uq112x112 {
uint224 _x;
}
// range: [0, 2**144 - 1]
// resolution: 1 / 2**112
struct uq144x112 {
uint256 _x;
}
uint8 private constant RESOLUTION = 112;
uint256 private constant Q112 = uint256(1) << RESOLUTION;
uint256 private constant Q224 = Q112 << RESOLUTION;
// encode a uint112 as a UQ112x112
function encode(uint112 x) internal pure returns (uq112x112 memory) {
return uq112x112(uint224(x) << RESOLUTION);
}
// encodes a uint144 as a UQ144x112
function encode144(uint144 x) internal pure returns (uq144x112 memory) {
return uq144x112(uint256(x) << RESOLUTION);
}
// divide a UQ112x112 by a uint112, returning a UQ112x112
function div(uq112x112 memory self, uint112 x)
internal
pure
returns (uq112x112 memory)
{
require(x != 0, 'FixedPoint: DIV_BY_ZERO');
return uq112x112(self._x / uint224(x));
}
// multiply a UQ112x112 by a uint, returning a UQ144x112
// reverts on overflow
function mul(uq112x112 memory self, uint256 y)
internal
pure
returns (uq144x112 memory)
{
uint256 z;
require(
y == 0 || (z = uint256(self._x) * y) / y == uint256(self._x),
'FixedPoint: MULTIPLICATION_OVERFLOW'
);
return uq144x112(z);
}
// returns a UQ112x112 which represents the ratio of the numerator to the denominator
// equivalent to encode(numerator).div(denominator)
function fraction(uint112 numerator, uint112 denominator)
internal
pure
returns (uq112x112 memory)
{
require(denominator > 0, 'FixedPoint: DIV_BY_ZERO');
return uq112x112((uint224(numerator) << RESOLUTION) / denominator);
}
// decode a UQ112x112 into a uint112 by truncating after the radix point
function decode(uq112x112 memory self) internal pure returns (uint112) {
return uint112(self._x >> RESOLUTION);
}
// decode a UQ144x112 into a uint144 by truncating after the radix point
function decode144(uq144x112 memory self) internal pure returns (uint144) {
return uint144(self._x >> RESOLUTION);
}
// take the reciprocal of a UQ112x112
function reciprocal(uq112x112 memory self)
internal
pure
returns (uq112x112 memory)
{
require(self._x != 0, 'FixedPoint: ZERO_RECIPROCAL');
return uq112x112(uint224(Q224 / self._x));
}
// square root of a UQ112x112
function sqrt(uq112x112 memory self)
internal
pure
returns (uq112x112 memory)
{
return uq112x112(uint224(Babylonian.sqrt(uint256(self._x)) << 56));
}
}pragma solidity ^0.6.0;
import '@openzeppelin/contracts/math/SafeMath.sol';
import '../interfaces/IUniswapV2Pair.sol';
library UniswapV2Library {
using SafeMath for uint256;
// 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 pure returns (address pair) {
(address token0, address token1) = sortTokens(tokenA, tokenB);
pair = address(
uint256(
keccak256(
abi.encodePacked(
hex'ff',
factory,
keccak256(abi.encodePacked(token0, token1)),
hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f'
// dev code hash - hex'a8965b4f267cbbb1629fb450908f7a3c5c848e2332dbca287688b5e1c31a0328'
// testnet code hash - hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f'
)
)
)
);
}
// fetches and sorts the reserves for a pair
function getReserves(
address factory,
address tokenA,
address tokenB
) internal view returns (uint256 reserveA, uint256 reserveB) {
(address token0, ) = sortTokens(tokenA, tokenB);
(uint256 reserve0, uint256 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(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) internal pure returns (uint256 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(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) internal pure returns (uint256 amountOut) {
require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');
require(
reserveIn > 0 && reserveOut > 0,
'UniswapV2Library: INSUFFICIENT_LIQUIDITY'
);
uint256 amountInWithFee = amountIn.mul(997);
uint256 numerator = amountInWithFee.mul(reserveOut);
uint256 denominator = reserveIn.mul(1000).add(amountInWithFee);
amountOut = numerator / denominator;
}
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) internal pure returns (uint256 amountIn) {
require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');
require(
reserveIn > 0 && reserveOut > 0,
'UniswapV2Library: INSUFFICIENT_LIQUIDITY'
);
uint256 numerator = reserveIn.mul(amountOut).mul(1000);
uint256 denominator = reserveOut.sub(amountOut).mul(997);
amountIn = (numerator / denominator).add(1);
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(
address factory,
uint256 amountIn,
address[] memory path
) internal view returns (uint256[] memory amounts) {
require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
amounts = new uint256[](path.length);
amounts[0] = amountIn;
for (uint256 i; i < path.length - 1; i++) {
(uint256 reserveIn, uint256 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,
uint256 amountOut,
address[] memory path
) internal view returns (uint256[] memory amounts) {
require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
amounts = new uint256[](path.length);
amounts[amounts.length - 1] = amountOut;
for (uint256 i = path.length - 1; i > 0; i--) {
(uint256 reserveIn, uint256 reserveOut) =
getReserves(factory, path[i - 1], path[i]);
amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
}
}
}pragma solidity ^0.6.0;
import './FixedPoint.sol';
import '../interfaces/IUniswapV2Pair.sol';
// library with helper methods for oracles that are concerned with computing average prices
library UniswapV2OracleLibrary {
using FixedPoint for *;
// helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1]
function currentBlockTimestamp() internal view returns (uint32) {
return uint32(block.timestamp % 2**32);
}
// produces the cumulative price using counterfactuals to save gas and avoid a call to sync.
function currentCumulativePrices(address pair)
internal
view
returns (
uint256 price0Cumulative,
uint256 price1Cumulative,
uint32 blockTimestamp
)
{
blockTimestamp = currentBlockTimestamp();
price0Cumulative = IUniswapV2Pair(pair).price0CumulativeLast();
price1Cumulative = IUniswapV2Pair(pair).price1CumulativeLast();
// if time has elapsed since the last update on the pair, mock the accumulated price values
(
uint112 reserve0,
uint112 reserve1,
uint32 blockTimestampLast
) = IUniswapV2Pair(pair).getReserves();
if (blockTimestampLast != blockTimestamp) {
// subtraction overflow is desired
uint32 timeElapsed = blockTimestamp - blockTimestampLast;
// addition overflow is desired
// counterfactual
price0Cumulative +=
uint256(FixedPoint.fraction(reserve1, reserve0)._x) *
timeElapsed;
// counterfactual
price1Cumulative +=
uint256(FixedPoint.fraction(reserve0, reserve1)._x) *
timeElapsed;
}
}
}pragma solidity ^0.6.0;
import '@openzeppelin/contracts/math/SafeMath.sol';
import '../owner/Operator.sol';
contract Epoch is Operator {
using SafeMath for uint256;
uint256 private period;
uint256 private startTime;
uint256 private epoch;
/* ========== CONSTRUCTOR ========== */
constructor(
uint256 _period,
uint256 _startTime,
uint256 _startEpoch
) public {
period = _period;
startTime = _startTime;
epoch = _startEpoch;
}
/* ========== Modifier ========== */
modifier checkStartTime {
require(now >= startTime, 'Epoch: not started yet');
_;
}
modifier checkEpoch {
require(now >= nextEpochPoint(), 'Epoch: not allowed');
_;
epoch = epoch.add(1);
}
/* ========== VIEW FUNCTIONS ========== */
function getCurrentEpoch() public view returns (uint256) {
return epoch;
}
function getPeriod() public view returns (uint256) {
return period;
}
function getStartTime() public view returns (uint256) {
return startTime;
}
function nextEpochPoint() public view returns (uint256) {
return startTime.add(epoch.mul(period));
}
/* ========== GOVERNANCE ========== */
function setPeriod(uint256 _period) external onlyOperator {
period = _period;
}
}pragma solidity ^0.6.0;
interface IUniswapV2Pair {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 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 (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 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 (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
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);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
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 (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function burn(address to)
external
returns (uint256 amount0, uint256 amount1);
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}pragma solidity ^0.6.0;
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
function getPair(address tokenA, address tokenB)
external
view
returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}pragma solidity ^0.6.0;
import '@openzeppelin/contracts/GSN/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() internal {
_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_;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.6.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;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "../GSN/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* 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.
*/
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 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;
}
}{
"optimizer": {
"enabled": true,
"runs": 999999
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_tokenA","type":"address"},{"internalType":"address","name":"_tokenB","type":"address"},{"internalType":"uint256","name":"_period","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"}],"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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price0CumulativeLast","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price1CumulativeLast","type":"uint256"}],"name":"Updated","type":"event"},{"inputs":[],"name":"blockTimestampLast","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"consult","outputs":[{"internalType":"uint144","name":"amountOut","type":"uint144"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStartTime","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":"nextEpochPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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 IUniswapV2Pair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"factory","type":"address"},{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"}],"name":"pairFor","outputs":[{"internalType":"address","name":"lpt","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"price0Average","outputs":[{"internalType":"uint224","name":"_x","type":"uint224"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price1Average","outputs":[{"internalType":"uint224","name":"_x","type":"uint224"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"setPeriod","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":[],"name":"update","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b5060405162001c5b38038062001c5b833981810160405260a08110156200003757600080fd5b5080516020820151604083015160608401516080909401519293919290919081816000806200006562000465565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620000b962000465565b600180546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a360029290925560035560045560006200012c86868662000469602090811b62000ca417901c565b905080600760006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156200018f57600080fd5b505afa158015620001a4573d6000803e3d6000fd5b505050506040513d6020811015620001bb57600080fd5b5051600580546001600160a01b0319166001600160a01b039283161790556040805163d21220a760e01b815290519183169163d21220a791600480820192602092909190829003018186803b1580156200021457600080fd5b505afa15801562000229573d6000803e3d6000fd5b505050506040513d60208110156200024057600080fd5b5051600680546001600160a01b0319166001600160a01b0392831617905560408051635909c0d560e01b8152905191831691635909c0d591600480820192602092909190829003018186803b1580156200029957600080fd5b505afa158015620002ae573d6000803e3d6000fd5b505050506040513d6020811015620002c557600080fd5b505160085560408051635a3d549360e01b815290516001600160a01b03831691635a3d5493916004808301926020929190829003018186803b1580156200030b57600080fd5b505afa15801562000320573d6000803e3d6000fd5b505050506040513d60208110156200033757600080fd5b505160095560408051630240bc6b60e21b8152905160009182916001600160a01b03851691630902f1ac916004808301926060929190829003018186803b1580156200038257600080fd5b505afa15801562000397573d6000803e3d6000fd5b505050506040513d6060811015620003ae57600080fd5b50805160208201516040909201516007805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055925090506001600160701b038216158015906200040557506001600160701b03811615155b62000457576040805162461bcd60e51b815260206004820152601360248201527f4f7261636c653a204e4f5f524553455256455300000000000000000000000000604482015290519081900360640190fd5b505050505050505062000620565b3390565b600080806200047985856200053d565b604080516001600160601b0319606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b600080826001600160a01b0316846001600160a01b03161415620005935760405162461bcd60e51b815260040180806020018281038252602581526020018062001c366025913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b031610620005b5578284620005b8565b83835b90925090506001600160a01b03821662000619576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b61160680620006306000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c8063715018a6116100d8578063b97dd9e21161008c578063c828371e11610066578063c828371e1461038f578063d21220a714610397578063f2fde38b1461039f57610182565b8063b97dd9e21461035e578063c5700a0214610366578063c5967c261461038757610182565b8063a2e62045116100bd578063a2e6204514610346578063a6bb45391461034e578063a8aa1b311461035657610182565b8063715018a6146103365780638da5cb5b1461033e57610182565b80634456eda21161013a5780635a3d5493116101145780635a3d5493146102b05780635e6aaf2c146102b85780636d91c0e2146102f157610182565b80634456eda214610284578063570ca735146102a05780635909c0d5146102a857610182565b80631ed241951161016b5780631ed24195146101d757806329605e77146101f15780633ddac9531461022457610182565b80630dfe1681146101875780630f3a9f65146101b8575b600080fd5b61018f6103d2565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101d5600480360360208110156101ce57600080fd5b50356103ee565b005b6101df610463565b60408051918252519081900360200190f35b6101d56004803603602081101561020757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610469565b61025d6004803603604081101561023a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610506565b6040805171ffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028c610642565b604080519115158252519081900360200190f35b61018f610682565b6101df61069e565b6101df6106a4565b6102c06106aa565b604080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61018f6004803603606081101561030757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135821691604090910135166106ce565b6101d56106e3565b61018f6107e3565b6101d56107ff565b6102c0610a64565b61018f610a88565b6101df610aa4565b61036e610aaa565b6040805163ffffffff9092168252519081900360200190f35b6101df610ace565b6101df610af8565b61018f610afe565b6101d5600480360360208110156103b557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b1a565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331461045e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061158a6024913960400191505060405180910390fd5b600255565b60025490565b610471610d8f565b60005473ffffffffffffffffffffffffffffffffffffffff9081169116146104fa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61050381610d93565b50565b60055460009073ffffffffffffffffffffffffffffffffffffffff84811691161415610574576040805160208101909152600a547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815261056d906105689084610e89565b610f36565b905061063c565b60065473ffffffffffffffffffffffffffffffffffffffff8481169116146105fd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4f7261636c653a20494e56414c49445f544f4b454e0000000000000000000000604482015290519081900360640190fd5b6040805160208101909152600b547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168152610639906105689084610e89565b90505b92915050565b60015460009073ffffffffffffffffffffffffffffffffffffffff16610666610d8f565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b60015473ffffffffffffffffffffffffffffffffffffffff1690565b60085481565b60095481565b600b547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681565b60006106db848484610ca4565b949350505050565b6106eb610d8f565b60005473ffffffffffffffffffffffffffffffffffffffff90811691161461077457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b610807610ace565b42101561087557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f45706f63683a206e6f7420616c6c6f7765640000000000000000000000000000604482015290519081900360640190fd5b6007546000908190819061089e9073ffffffffffffffffffffffffffffffffffffffff16610f3d565b600754929550909350915063ffffffff74010000000000000000000000000000000000000000909104811682039081166108db5750505050610a51565b60405180602001604052808263ffffffff166008548703816108f957fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169091529051600a80547fffffffff0000000000000000000000000000000000000000000000000000000016919092161790556040805160208101909152600954819063ffffffff84169086038161096d57fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169091529051600b80547fffffffff00000000000000000000000000000000000000000000000000000000169190921617905560088490556009839055600780547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff851602179055604080518581526020810185905281517fd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902929181900390910190a1505050505b600454610a5f90600161118f565b600455565b600a547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b60045490565b60075474010000000000000000000000000000000000000000900463ffffffff1681565b6000610af3610aea60025460045461120390919063ffffffff16565b6003549061118f565b905090565b60035490565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b610b22610d8f565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610bab57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116610c17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806114f16026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000806000610cb38585611276565b604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b3390565b73ffffffffffffffffffffffffffffffffffffffff8116610dff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018061153c602d913960400191505060405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff8216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610e916114cb565b6000821580610ecc57505082517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1682810290838281610ec957fe5b04145b610f21576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806115ae6023913960400191505060405180910390fd5b60408051602081019091529081529392505050565b5160701c90565b6000806000610f4a6113c9565b90508373ffffffffffffffffffffffffffffffffffffffff16635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b158015610f9257600080fd5b505afa158015610fa6573d6000803e3d6000fd5b505050506040513d6020811015610fbc57600080fd5b5051604080517f5a3d5493000000000000000000000000000000000000000000000000000000008152905191945073ffffffffffffffffffffffffffffffffffffffff861691635a3d549391600480820192602092909190829003018186803b15801561102857600080fd5b505afa15801561103c573d6000803e3d6000fd5b505050506040513d602081101561105257600080fd5b5051604080517f0902f1ac00000000000000000000000000000000000000000000000000000000815290519193506000918291829173ffffffffffffffffffffffffffffffffffffffff891691630902f1ac916004808301926060929190829003018186803b1580156110c457600080fd5b505afa1580156110d8573d6000803e3d6000fd5b505050506040513d60608110156110ee57600080fd5b5080516020820151604090920151909450909250905063ffffffff808216908516146111855780840363ffffffff811661112884866113d3565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1602969096019563ffffffff811661115e85856113d3565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16029590950194505b5050509193909250565b60008282018381101561063957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826112125750600061063c565b8282028284828161121f57fe5b0414610639576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806115696021913960400191505060405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156112fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806115176025913960400191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161061133857828461133b565b83835b909250905073ffffffffffffffffffffffffffffffffffffffff82166113c257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b63ffffffff421690565b6113db6114de565b6000826dffffffffffffffffffffffffffff161161145a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4669786564506f696e743a204449565f42595f5a45524f000000000000000000604482015290519081900360640190fd5b6040805160208101909152806dffffffffffffffffffffffffffff84167bffffffffffffffffffffffffffff0000000000000000000000000000607087901b16816114a157fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815250905092915050565b6040518060200160405280600081525090565b6040805160208101909152600081529056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373556e697377617056324c6962726172793a204944454e544943414c5f4144445245535345536f70657261746f723a207a65726f206164647265737320676976656e20666f72206e6577206f70657261746f72536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657261746f724669786564506f696e743a204d554c5449504c49434154494f4e5f4f564552464c4f57a26469706673582212205880c8570425f787caba2d89bd4239d04c9ffa1d0a06bb7bbf2ff241b00c53b264736f6c634300060c0033556e697377617056324c6962726172793a204944454e544943414c5f4144445245535345530000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f000000000000000000000000e6c3502997f97f9bde34cb165fbce191065e068f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000000000000000e10000000000000000000000000000000000000000000000000000000006016f020
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101825760003560e01c8063715018a6116100d8578063b97dd9e21161008c578063c828371e11610066578063c828371e1461038f578063d21220a714610397578063f2fde38b1461039f57610182565b8063b97dd9e21461035e578063c5700a0214610366578063c5967c261461038757610182565b8063a2e62045116100bd578063a2e6204514610346578063a6bb45391461034e578063a8aa1b311461035657610182565b8063715018a6146103365780638da5cb5b1461033e57610182565b80634456eda21161013a5780635a3d5493116101145780635a3d5493146102b05780635e6aaf2c146102b85780636d91c0e2146102f157610182565b80634456eda214610284578063570ca735146102a05780635909c0d5146102a857610182565b80631ed241951161016b5780631ed24195146101d757806329605e77146101f15780633ddac9531461022457610182565b80630dfe1681146101875780630f3a9f65146101b8575b600080fd5b61018f6103d2565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101d5600480360360208110156101ce57600080fd5b50356103ee565b005b6101df610463565b60408051918252519081900360200190f35b6101d56004803603602081101561020757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610469565b61025d6004803603604081101561023a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610506565b6040805171ffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028c610642565b604080519115158252519081900360200190f35b61018f610682565b6101df61069e565b6101df6106a4565b6102c06106aa565b604080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61018f6004803603606081101561030757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135821691604090910135166106ce565b6101d56106e3565b61018f6107e3565b6101d56107ff565b6102c0610a64565b61018f610a88565b6101df610aa4565b61036e610aaa565b6040805163ffffffff9092168252519081900360200190f35b6101df610ace565b6101df610af8565b61018f610afe565b6101d5600480360360208110156103b557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b1a565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331461045e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061158a6024913960400191505060405180910390fd5b600255565b60025490565b610471610d8f565b60005473ffffffffffffffffffffffffffffffffffffffff9081169116146104fa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61050381610d93565b50565b60055460009073ffffffffffffffffffffffffffffffffffffffff84811691161415610574576040805160208101909152600a547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815261056d906105689084610e89565b610f36565b905061063c565b60065473ffffffffffffffffffffffffffffffffffffffff8481169116146105fd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4f7261636c653a20494e56414c49445f544f4b454e0000000000000000000000604482015290519081900360640190fd5b6040805160208101909152600b547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168152610639906105689084610e89565b90505b92915050565b60015460009073ffffffffffffffffffffffffffffffffffffffff16610666610d8f565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b60015473ffffffffffffffffffffffffffffffffffffffff1690565b60085481565b60095481565b600b547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681565b60006106db848484610ca4565b949350505050565b6106eb610d8f565b60005473ffffffffffffffffffffffffffffffffffffffff90811691161461077457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b610807610ace565b42101561087557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f45706f63683a206e6f7420616c6c6f7765640000000000000000000000000000604482015290519081900360640190fd5b6007546000908190819061089e9073ffffffffffffffffffffffffffffffffffffffff16610f3d565b600754929550909350915063ffffffff74010000000000000000000000000000000000000000909104811682039081166108db5750505050610a51565b60405180602001604052808263ffffffff166008548703816108f957fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169091529051600a80547fffffffff0000000000000000000000000000000000000000000000000000000016919092161790556040805160208101909152600954819063ffffffff84169086038161096d57fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169091529051600b80547fffffffff00000000000000000000000000000000000000000000000000000000169190921617905560088490556009839055600780547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff851602179055604080518581526020810185905281517fd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902929181900390910190a1505050505b600454610a5f90600161118f565b600455565b600a547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b60045490565b60075474010000000000000000000000000000000000000000900463ffffffff1681565b6000610af3610aea60025460045461120390919063ffffffff16565b6003549061118f565b905090565b60035490565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b610b22610d8f565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610bab57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116610c17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806114f16026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000806000610cb38585611276565b604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b3390565b73ffffffffffffffffffffffffffffffffffffffff8116610dff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018061153c602d913960400191505060405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff8216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610e916114cb565b6000821580610ecc57505082517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1682810290838281610ec957fe5b04145b610f21576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806115ae6023913960400191505060405180910390fd5b60408051602081019091529081529392505050565b5160701c90565b6000806000610f4a6113c9565b90508373ffffffffffffffffffffffffffffffffffffffff16635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b158015610f9257600080fd5b505afa158015610fa6573d6000803e3d6000fd5b505050506040513d6020811015610fbc57600080fd5b5051604080517f5a3d5493000000000000000000000000000000000000000000000000000000008152905191945073ffffffffffffffffffffffffffffffffffffffff861691635a3d549391600480820192602092909190829003018186803b15801561102857600080fd5b505afa15801561103c573d6000803e3d6000fd5b505050506040513d602081101561105257600080fd5b5051604080517f0902f1ac00000000000000000000000000000000000000000000000000000000815290519193506000918291829173ffffffffffffffffffffffffffffffffffffffff891691630902f1ac916004808301926060929190829003018186803b1580156110c457600080fd5b505afa1580156110d8573d6000803e3d6000fd5b505050506040513d60608110156110ee57600080fd5b5080516020820151604090920151909450909250905063ffffffff808216908516146111855780840363ffffffff811661112884866113d3565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1602969096019563ffffffff811661115e85856113d3565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16029590950194505b5050509193909250565b60008282018381101561063957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826112125750600061063c565b8282028284828161121f57fe5b0414610639576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806115696021913960400191505060405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156112fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806115176025913960400191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161061133857828461133b565b83835b909250905073ffffffffffffffffffffffffffffffffffffffff82166113c257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b63ffffffff421690565b6113db6114de565b6000826dffffffffffffffffffffffffffff161161145a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4669786564506f696e743a204449565f42595f5a45524f000000000000000000604482015290519081900360640190fd5b6040805160208101909152806dffffffffffffffffffffffffffff84167bffffffffffffffffffffffffffff0000000000000000000000000000607087901b16816114a157fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815250905092915050565b6040518060200160405280600081525090565b6040805160208101909152600081529056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373556e697377617056324c6962726172793a204944454e544943414c5f4144445245535345536f70657261746f723a207a65726f206164647265737320676976656e20666f72206e6577206f70657261746f72536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657261746f724669786564506f696e743a204d554c5449504c49434154494f4e5f4f564552464c4f57a26469706673582212205880c8570425f787caba2d89bd4239d04c9ffa1d0a06bb7bbf2ff241b00c53b264736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f000000000000000000000000e6c3502997f97f9bde34cb165fbce191065e068f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000000000000000e10000000000000000000000000000000000000000000000000000000006016f020
-----Decoded View---------------
Arg [0] : _factory (address): 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
Arg [1] : _tokenA (address): 0xE6C3502997f97F9BDe34CB165fBce191065E068f
Arg [2] : _tokenB (address): 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599
Arg [3] : _period (uint256): 3600
Arg [4] : _startTime (uint256): 1612116000
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f
Arg [1] : 000000000000000000000000e6c3502997f97f9bde34cb165fbce191065e068f
Arg [2] : 0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000e10
Arg [4] : 000000000000000000000000000000000000000000000000000000006016f020
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 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.