Contract
0x2423d642c53939a463f84e14c6a9ffc6fd8f4334
6
Contract Overview
My Name Tag:
Not Available
TokenTracker:
Latest 25 internal transaction
[ Download CSV Export ]
Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x280113525Ef52e245BD8b048D6BB52021F0ac65F
Contract Name:
LizardPair
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "../../interface/IERC20.sol"; import "../../interface/IERC721Metadata.sol"; import "../../interface/IPair.sol"; import "../../interface/IFactory.sol"; import "../../interface/ICallee.sol"; import "../../interface/IUnderlying.sol"; import "./PairFees.sol"; import "../../lib/Math.sol"; import "../../lib/SafeERC20.sol"; import "../Reentrancy.sol"; // The base pair of pools, either stable or volatile contract LizardPair is IERC20, IPair, Reentrancy { using SafeERC20 for IERC20; string public name; string public symbol; uint8 public constant decimals = 18; /// @dev Used to denote stable or volatile pair bool public immutable stable; uint public override totalSupply = 0; mapping(address => mapping(address => uint)) public override allowance; mapping(address => uint) public override balanceOf; bytes32 public immutable DOMAIN_SEPARATOR; // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; uint internal constant _FEE_PRECISION = 1e32; mapping(address => uint) public nonces; uint public immutable chainId; uint internal constant MINIMUM_LIQUIDITY = 10 ** 3; /// @dev 0.02% swap fee uint internal constant SWAP_FEE_STABLE = 5_000; /// @dev 0.4% swap fee uint internal constant SWAP_FEE_VOLATILE = 250; /// @dev 1% max allowed swap fee uint internal constant SWAP_FEE_MAX = 100; /// @dev 50% of swap fee uint internal constant TREASURY_FEE = 2; /// @dev Capture oracle reading every 30 minutes uint internal constant PERIOD_SIZE = 1800; address public immutable override token0; address public immutable override token1; address public immutable fees; address public immutable factory; address public immutable treasury; Observation[] public observations; uint public swapFee; uint internal immutable decimals0; uint internal immutable decimals1; uint public reserve0; uint public reserve1; uint public blockTimestampLast; uint public reserve0CumulativeLast; uint public reserve1CumulativeLast; // index0 and index1 are used to accumulate fees, // this is split out from normal trades to keep the swap "clean" // this further allows LP holders to easily claim fees for tokens they have/staked uint public index0 = 0; uint public index1 = 0; // position assigned to each LP to track their current index0 & index1 vs the global position mapping(address => uint) public supplyIndex0; mapping(address => uint) public supplyIndex1; // tracks the amount of unclaimed, but claimable tokens off of fees for token0 and token1 mapping(address => uint) public claimable0; mapping(address => uint) public claimable1; event Treasury(address indexed sender, uint amount0, uint amount1); event Fees(address indexed sender, uint amount0, uint amount1); event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint reserve0, uint reserve1); event Claim(address indexed sender, address indexed recipient, uint amount0, uint amount1); event FeesChanged(uint newValue); constructor() { factory = msg.sender; treasury = IFactory(msg.sender).treasury(); (address _token0, address _token1, bool _stable) = IFactory(msg.sender).getInitializable(); (token0, token1, stable) = (_token0, _token1, _stable); fees = address(new PairFees(_token0, _token1)); swapFee = _stable ? SWAP_FEE_STABLE : SWAP_FEE_VOLATILE; if (_stable) { name = string(abi.encodePacked("Stable AMM - ", IERC721Metadata(_token0).symbol(), "/", IERC721Metadata(_token1).symbol())); symbol = string(abi.encodePacked("sAMM-", IERC721Metadata(_token0).symbol(), "/", IERC721Metadata(_token1).symbol())); } else { name = string(abi.encodePacked("Volatile AMM - ", IERC721Metadata(_token0).symbol(), "/", IERC721Metadata(_token1).symbol())); symbol = string(abi.encodePacked("vAMM-", IERC721Metadata(_token0).symbol(), "/", IERC721Metadata(_token1).symbol())); } decimals0 = 10 ** IUnderlying(_token0).decimals(); decimals1 = 10 ** IUnderlying(_token1).decimals(); observations.push(Observation(block.timestamp, 0, 0)); DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'), keccak256(bytes(name)), keccak256('1'), block.chainid, address(this) ) ); chainId = block.chainid; } function setSwapFee(uint value) external { require(msg.sender == factory, "!factory"); require(value >= SWAP_FEE_MAX, "max"); swapFee = value; emit FeesChanged(value); } function observationLength() external view returns (uint) { return observations.length; } function lastObservation() public view returns (Observation memory) { return observations[observations.length - 1]; } function metadata() external view returns ( uint dec0, uint dec1, uint r0, uint r1, bool st, address t0, address t1 ) { return (decimals0, decimals1, reserve0, reserve1, stable, token0, token1); } function tokens() external view override returns (address, address) { return (token0, token1); } /// @dev Claim accumulated but unclaimed fees (viewable via claimable0 and claimable1) function claimFees() external override returns (uint claimed0, uint claimed1) { _updateFor(msg.sender); claimed0 = claimable0[msg.sender]; claimed1 = claimable1[msg.sender]; if (claimed0 > 0 || claimed1 > 0) { claimable0[msg.sender] = 0; claimable1[msg.sender] = 0; PairFees(fees).claimFeesFor(msg.sender, claimed0, claimed1); emit Claim(msg.sender, msg.sender, claimed0, claimed1); } } /// @dev Accrue fees on token0 function _update0(uint amount) internal { uint toTreasury = amount / TREASURY_FEE; uint toFees = amount - toTreasury; // transfer the fees out to PairFees and Treasury IERC20(token0).safeTransfer(treasury, toTreasury); IERC20(token0).safeTransfer(fees, toFees); // 1e32 adjustment is removed during claim uint _ratio = toFees * _FEE_PRECISION / totalSupply; if (_ratio > 0) { index0 += _ratio; } // keep the same structure of events for compatability emit Treasury(msg.sender, toTreasury, 0); emit Fees(msg.sender, toFees, 0); } /// @dev Accrue fees on token1 function _update1(uint amount) internal { uint toTreasury = amount / TREASURY_FEE; uint toFees = amount - toTreasury; IERC20(token1).safeTransfer(treasury, toTreasury); IERC20(token1).safeTransfer(fees, toFees); uint _ratio = toFees * _FEE_PRECISION / totalSupply; if (_ratio > 0) { index1 += _ratio; } // keep the same structure of events for compatability emit Treasury(msg.sender, 0, toTreasury); emit Fees(msg.sender, 0, toFees); } /// @dev This function MUST be called on any balance changes, /// otherwise can be used to infinitely claim fees // Fees are segregated from core funds, so fees can never put liquidity at risk function _updateFor(address recipient) internal { uint _supplied = balanceOf[recipient]; // get LP balance of `recipient` if (_supplied > 0) { uint _supplyIndex0 = supplyIndex0[recipient]; // get last adjusted index0 for recipient uint _supplyIndex1 = supplyIndex1[recipient]; uint _index0 = index0; // get global index0 for accumulated fees uint _index1 = index1; supplyIndex0[recipient] = _index0; // update user current position to global position supplyIndex1[recipient] = _index1; uint _delta0 = _index0 - _supplyIndex0; // see if there is any difference that need to be accrued uint _delta1 = _index1 - _supplyIndex1; if (_delta0 > 0) { uint _share = _supplied * _delta0 / _FEE_PRECISION; // add accrued difference for each supplied token claimable0[recipient] += _share; } if (_delta1 > 0) { uint _share = _supplied * _delta1 / _FEE_PRECISION; claimable1[recipient] += _share; } } else { supplyIndex0[recipient] = index0; // new users are set to the default global state supplyIndex1[recipient] = index1; } } function getReserves() public view override returns ( uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast ) { _reserve0 = uint112(reserve0); _reserve1 = uint112(reserve1); _blockTimestampLast = uint32(blockTimestampLast); } /// @dev Update reserves and, on the first call per block, price accumulators function _update(uint balance0, uint balance1, uint _reserve0, uint _reserve1) internal { uint blockTimestamp = block.timestamp; uint timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired if (timeElapsed > 0 && _reserve0 != 0 && _reserve1 != 0) { unchecked { reserve0CumulativeLast += _reserve0 * timeElapsed; reserve1CumulativeLast += _reserve1 * timeElapsed; } } Observation memory _point = lastObservation(); timeElapsed = blockTimestamp - _point.timestamp; // compare the last observation with current timestamp, // if greater than 30 minutes, record a new event if (timeElapsed > PERIOD_SIZE) { observations.push(Observation(blockTimestamp, reserve0CumulativeLast, reserve1CumulativeLast)); } reserve0 = balance0; reserve1 = balance1; blockTimestampLast = blockTimestamp; emit Sync(reserve0, reserve1); } /// @dev Produces the cumulative price using counterfactuals to save gas and avoid a call to sync. function currentCumulativePrices() public view returns ( uint reserve0Cumulative, uint reserve1Cumulative, uint blockTimestamp ) { blockTimestamp = block.timestamp; reserve0Cumulative = reserve0CumulativeLast; reserve1Cumulative = reserve1CumulativeLast; // if time has elapsed since the last update on the pair, mock the accumulated price values (uint _reserve0, uint _reserve1, uint _blockTimestampLast) = getReserves(); if (_blockTimestampLast != blockTimestamp) { // subtraction overflow is desired uint timeElapsed = blockTimestamp - _blockTimestampLast; unchecked { reserve0Cumulative += _reserve0 * timeElapsed; reserve1Cumulative += _reserve1 * timeElapsed; } } } /// @dev Gives the current twap price measured from amountIn * tokenIn gives amountOut function current(address tokenIn, uint amountIn) external view returns (uint amountOut) { Observation memory _observation = lastObservation(); (uint reserve0Cumulative, uint reserve1Cumulative,) = currentCumulativePrices(); if (block.timestamp == _observation.timestamp) { _observation = observations[observations.length - 2]; } uint timeElapsed = block.timestamp - _observation.timestamp; uint _reserve0 = (reserve0Cumulative - _observation.reserve0Cumulative) / timeElapsed; uint _reserve1 = (reserve1Cumulative - _observation.reserve1Cumulative) / timeElapsed; amountOut = _getAmountOut(amountIn, tokenIn, _reserve0, _reserve1); } /// @dev As per `current`, however allows user configured granularity, up to the full window size function quote(address tokenIn, uint amountIn, uint granularity) external view returns (uint amountOut) { uint [] memory _prices = sample(tokenIn, amountIn, granularity, 1); uint priceAverageCumulative; for (uint i = 0; i < _prices.length; i++) { priceAverageCumulative += _prices[i]; } return priceAverageCumulative / granularity; } /// @dev Returns a memory set of twap prices function prices(address tokenIn, uint amountIn, uint points) external view returns (uint[] memory) { return sample(tokenIn, amountIn, points, 1); } function sample(address tokenIn, uint amountIn, uint points, uint window) public view returns (uint[] memory) { uint[] memory _prices = new uint[](points); uint length = observations.length - 1; uint i = length - (points * window); uint nextIndex = 0; uint index = 0; for (; i < length; i += window) { nextIndex = i + window; uint timeElapsed = observations[nextIndex].timestamp - observations[i].timestamp; uint _reserve0 = (observations[nextIndex].reserve0Cumulative - observations[i].reserve0Cumulative) / timeElapsed; uint _reserve1 = (observations[nextIndex].reserve1Cumulative - observations[i].reserve1Cumulative) / timeElapsed; _prices[index] = _getAmountOut(amountIn, tokenIn, _reserve0, _reserve1); index = index + 1; } return _prices; } /// @dev This low-level function should be called from a contract which performs important safety checks /// standard uniswap v2 implementation function mint(address to) external lock override returns (uint liquidity) { (uint _reserve0, uint _reserve1) = (reserve0, reserve1); uint _balance0 = IERC20(token0).balanceOf(address(this)); uint _balance1 = IERC20(token1).balanceOf(address(this)); uint _amount0 = _balance0 - _reserve0; uint _amount1 = _balance1 - _reserve1; uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee if (_totalSupply == 0) { liquidity = Math.sqrt(_amount0 * _amount1) - MINIMUM_LIQUIDITY; // permanently lock the first MINIMUM_LIQUIDITY tokens _mint(address(0), MINIMUM_LIQUIDITY); } else { liquidity = Math.min(_amount0 * _totalSupply / _reserve0, _amount1 * _totalSupply / _reserve1); } require(liquidity > 0, 'LizardPair: INSUFFICIENT_LIQUIDITY_MINTED'); _mint(to, liquidity); _update(_balance0, _balance1, _reserve0, _reserve1); emit Mint(msg.sender, _amount0, _amount1); } /// @dev This low-level function should be called from a contract which performs important safety checks /// standard uniswap v2 implementation function burn(address to) external lock override returns (uint amount0, uint amount1) { (uint _reserve0, uint _reserve1) = (reserve0, reserve1); (address _token0, address _token1) = (token0, token1); uint _balance0 = IERC20(_token0).balanceOf(address(this)); uint _balance1 = IERC20(_token1).balanceOf(address(this)); uint _liquidity = balanceOf[address(this)]; // gas savings, must be defined here since totalSupply can update in _mintFee uint _totalSupply = totalSupply; // using balances ensures pro-rata distribution amount0 = _liquidity * _balance0 / _totalSupply; // using balances ensures pro-rata distribution amount1 = _liquidity * _balance1 / _totalSupply; require(amount0 > 0 && amount1 > 0, 'LizardPair: INSUFFICIENT_LIQUIDITY_BURNED'); _burn(address(this), _liquidity); IERC20(_token0).safeTransfer(to, amount0); IERC20(_token1).safeTransfer(to, amount1); _balance0 = IERC20(_token0).balanceOf(address(this)); _balance1 = IERC20(_token1).balanceOf(address(this)); _update(_balance0, _balance1, _reserve0, _reserve1); emit Burn(msg.sender, amount0, amount1, to); } /// @dev This low-level function should be called from a contract which performs important safety checks function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external override lock { require(!IFactory(factory).isPaused(), "LizardPair: PAUSE"); require(amount0Out > 0 || amount1Out > 0, 'LizardPair: INSUFFICIENT_OUTPUT_AMOUNT'); (uint _reserve0, uint _reserve1) = (reserve0, reserve1); require(amount0Out < _reserve0 && amount1Out < _reserve1, 'LizardPair: INSUFFICIENT_LIQUIDITY'); uint _balance0; uint _balance1; {// scope for _token{0,1}, avoids stack too deep errors (address _token0, address _token1) = (token0, token1); require(to != _token0 && to != _token1, 'LizardPair: INVALID_TO'); // optimistically transfer tokens if (amount0Out > 0) IERC20(_token0).safeTransfer(to, amount0Out); // optimistically transfer tokens if (amount1Out > 0) IERC20(_token1).safeTransfer(to, amount1Out); // callback, used for flash loans if (data.length > 0) ICallee(to).hook(msg.sender, amount0Out, amount1Out, data); _balance0 = IERC20(_token0).balanceOf(address(this)); _balance1 = IERC20(_token1).balanceOf(address(this)); } uint amount0In = _balance0 > _reserve0 - amount0Out ? _balance0 - (_reserve0 - amount0Out) : 0; uint amount1In = _balance1 > _reserve1 - amount1Out ? _balance1 - (_reserve1 - amount1Out) : 0; require(amount0In > 0 || amount1In > 0, 'LizardPair: INSUFFICIENT_INPUT_AMOUNT'); {// scope for reserve{0,1}Adjusted, avoids stack too deep errors (address _token0, address _token1) = (token0, token1); // accrue fees for token0 and move them out of pool if (amount0In > 0) _update0(amount0In / swapFee); // accrue fees for token1 and move them out of pool if (amount1In > 0) _update1(amount1In / swapFee); // since we removed tokens, we need to reconfirm balances, // can also simply use previous balance - amountIn/ SWAP_FEE, // but doing balanceOf again as safety check _balance0 = IERC20(_token0).balanceOf(address(this)); _balance1 = IERC20(_token1).balanceOf(address(this)); // The curve, either x3y+y3x for stable pools, or x*y for volatile pools require(_k(_balance0, _balance1) >= _k(_reserve0, _reserve1), 'LizardPair: K'); } _update(_balance0, _balance1, _reserve0, _reserve1); emit Swap(msg.sender, amount0In, amount1In, amount0Out, amount1Out, to); } /// @dev Force balances to match reserves function skim(address to) external lock { (address _token0, address _token1) = (token0, token1); IERC20(_token0).safeTransfer(to, IERC20(_token0).balanceOf(address(this)) - (reserve0)); IERC20(_token1).safeTransfer(to, IERC20(_token1).balanceOf(address(this)) - (reserve1)); } // force reserves to match balances function sync() external lock { _update( IERC20(token0).balanceOf(address(this)), IERC20(token1).balanceOf(address(this)), reserve0, reserve1 ); } function _f(uint x0, uint y) internal pure returns (uint) { return x0 * (y * y / 1e18 * y / 1e18) / 1e18 + (x0 * x0 / 1e18 * x0 / 1e18) * y / 1e18; } function _d(uint x0, uint y) internal pure returns (uint) { return 3 * x0 * (y * y / 1e18) / 1e18 + (x0 * x0 / 1e18 * x0 / 1e18); } function _getY(uint x0, uint xy, uint y) internal pure returns (uint) { for (uint i = 0; i < 255; i++) { uint yPrev = y; uint k = _f(x0, y); if (k < xy) { uint dy = (xy - k) * 1e18 / _d(x0, y); y = y + dy; } else { uint dy = (k - xy) * 1e18 / _d(x0, y); y = y - dy; } if (Math.closeTo(y, yPrev, 1)) { break; } } return y; } function getAmountOut(uint amountIn, address tokenIn) external view override returns (uint) { (uint _reserve0, uint _reserve1) = (reserve0, reserve1); // remove fee from amount received amountIn -= amountIn / swapFee; return _getAmountOut(amountIn, tokenIn, _reserve0, _reserve1); } function _getAmountOut(uint amountIn, address tokenIn, uint _reserve0, uint _reserve1) internal view returns (uint) { if (stable) { uint xy = _k(_reserve0, _reserve1); _reserve0 = _reserve0 * 1e18 / decimals0; _reserve1 = _reserve1 * 1e18 / decimals1; (uint reserveA, uint reserveB) = tokenIn == token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0); amountIn = tokenIn == token0 ? amountIn * 1e18 / decimals0 : amountIn * 1e18 / decimals1; uint y = reserveB - _getY(amountIn + reserveA, xy, reserveB); return y * (tokenIn == token0 ? decimals1 : decimals0) / 1e18; } else { (uint reserveA, uint reserveB) = tokenIn == token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0); return amountIn * reserveB / (reserveA + amountIn); } } function _k(uint x, uint y) internal view returns (uint) { if (stable) { uint _x = x * 1e18 / decimals0; uint _y = y * 1e18 / decimals1; uint _a = (_x * _y) / 1e18; uint _b = ((_x * _x) / 1e18 + (_y * _y) / 1e18); // x3y+y3x >= k return _a * _b / 1e18; } else { // xy >= k return x * y; } } //**************************************************************************** //**************************** ERC20 ***************************************** //**************************************************************************** function _mint(address dst, uint amount) internal { // balances must be updated on mint/burn/transfer _updateFor(dst); totalSupply += amount; balanceOf[dst] += amount; emit Transfer(address(0), dst, amount); } function _burn(address dst, uint amount) internal { _updateFor(dst); totalSupply -= amount; balanceOf[dst] -= amount; emit Transfer(dst, address(0), amount); } function approve(address spender, uint amount) external override returns (bool) { require(spender != address(0), "LizardPair: Approve to the zero address"); allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function permit( address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s ) external override { require(deadline >= block.timestamp, 'LizardPair: EXPIRED'); bytes32 digest = keccak256( abi.encodePacked( '\x19\x01', DOMAIN_SEPARATOR, keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline)) ) ); address recoveredAddress = ecrecover(digest, v, r, s); require(recoveredAddress != address(0) && recoveredAddress == owner, 'LizardPair: INVALID_SIGNATURE'); allowance[owner][spender] = value; emit Approval(owner, spender, value); } function transfer(address dst, uint amount) external override returns (bool) { _transferTokens(msg.sender, dst, amount); return true; } function transferFrom(address src, address dst, uint amount) external override returns (bool) { address spender = msg.sender; uint spenderAllowance = allowance[src][spender]; if (spender != src && spenderAllowance != type(uint).max) { require(spenderAllowance >= amount, "LizardPair: Insufficient allowance"); unchecked { uint newAllowance = spenderAllowance - amount; allowance[src][spender] = newAllowance; emit Approval(src, spender, newAllowance); } } _transferTokens(src, dst, amount); return true; } function _transferTokens(address src, address dst, uint amount) internal { require(dst != address(0), "LizardPair: Transfer to the zero address"); // update fee position for src _updateFor(src); // update fee position for dst _updateFor(dst); uint srcBalance = balanceOf[src]; require(srcBalance >= amount, "LizardPair: Transfer amount exceeds balance"); unchecked { balanceOf[src] = srcBalance - amount; } balanceOf[dst] += amount; emit Transfer(src, dst, amount); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "./IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; interface IPair { // Structure to capture time period obervations every 30 minutes, used for local oracles struct Observation { uint timestamp; uint reserve0Cumulative; uint reserve1Cumulative; } function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function burn(address to) external returns (uint amount0, uint amount1); function mint(address to) external returns (uint liquidity); function getReserves() external view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast); function getAmountOut(uint, address) external view returns (uint); function claimFees() external returns (uint, uint); function tokens() external view returns (address, address); function token0() external view returns (address); function token1() external view returns (address); function stable() external view returns (bool); function metadata() external view returns ( uint dec0, uint dec1, uint r0, uint r1, bool st, address t0, address t1 ); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; interface IFactory { function treasury() external view returns (address); function isPair(address pair) external view returns (bool); function getInitializable() external view returns (address, address, bool); function isPaused() external view returns (bool); function pairCodeHash() external pure returns (bytes32); function getPair(address tokenA, address token, bool stable) external view returns (address); function createPair(address tokenA, address tokenB, bool stable) external returns (address pair); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; interface ICallee { function hook(address sender, uint amount0, uint amount1, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; interface IUnderlying { function approve(address spender, uint value) external returns (bool); function mint(address, uint) external; function totalSupply() external view returns (uint); function balanceOf(address) external view returns (uint); function transfer(address, uint) external returns (bool); function decimals() external returns (uint8); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "../../interface/IERC20.sol"; import "../../lib/SafeERC20.sol"; /// @title Base V1 Fees contract is used as a 1:1 pair relationship to split out fees, /// this ensures that the curve does not need to be modified for LP shares contract PairFees { using SafeERC20 for IERC20; /// @dev The pair it is bonded to address internal immutable pair; /// @dev Token0 of pair, saved localy and statically for gas optimization address internal immutable token0; /// @dev Token1 of pair, saved localy and statically for gas optimization address internal immutable token1; constructor(address _token0, address _token1) { pair = msg.sender; token0 = _token0; token1 = _token1; } // Allow the pair to transfer fees to users function claimFeesFor(address recipient, uint amount0, uint amount1) external { require(msg.sender == pair, "Not pair"); if (amount0 > 0) { IERC20(token0).safeTransfer(recipient, amount0); } if (amount1 > 0) { IERC20(token1).safeTransfer(recipient, amount1); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; library Math { function max(uint a, uint b) internal pure returns (uint) { return a >= b ? a : b; } function min(uint a, uint b) internal pure returns (uint) { return a < b ? a : b; } function positiveInt128(int128 value) internal pure returns (int128) { return value < 0 ? int128(0) : value; } function closeTo(uint a, uint b, uint target) internal pure returns (bool) { if (a > b) { if (a - b <= target) { return true; } } else { if (b - a <= target) { return true; } } return false; } function sqrt(uint y) internal pure returns (uint z) { if (y > 3) { z = y; uint x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity 0.8.15; import "../interface/IERC20.sol"; import "./Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint value ) internal { uint newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; abstract contract Reentrancy { /// @dev simple re-entrancy check uint internal _unlocked = 1; modifier lock() { require(_unlocked == 1, "Reentrant call"); _unlocked = 2; _; _unlocked = 1; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "./IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity 0.8.15; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Fees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"FeesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reserve0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reserve1","type":"uint256"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Treasury","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockTimestampLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"chainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimFees","outputs":[{"internalType":"uint256","name":"claimed0","type":"uint256"},{"internalType":"uint256","name":"claimed1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimable0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimable1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"current","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentCumulativePrices","outputs":[{"internalType":"uint256","name":"reserve0Cumulative","type":"uint256"},{"internalType":"uint256","name":"reserve1Cumulative","type":"uint256"},{"internalType":"uint256","name":"blockTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fees","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"_reserve0","type":"uint112"},{"internalType":"uint112","name":"_reserve1","type":"uint112"},{"internalType":"uint32","name":"_blockTimestampLast","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"index0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"index1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastObservation","outputs":[{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"reserve0Cumulative","type":"uint256"},{"internalType":"uint256","name":"reserve1Cumulative","type":"uint256"}],"internalType":"struct IPair.Observation","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadata","outputs":[{"internalType":"uint256","name":"dec0","type":"uint256"},{"internalType":"uint256","name":"dec1","type":"uint256"},{"internalType":"uint256","name":"r0","type":"uint256"},{"internalType":"uint256","name":"r1","type":"uint256"},{"internalType":"bool","name":"st","type":"bool"},{"internalType":"address","name":"t0","type":"address"},{"internalType":"address","name":"t1","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"observationLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"observations","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"reserve0Cumulative","type":"uint256"},{"internalType":"uint256","name":"reserve1Cumulative","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"points","type":"uint256"}],"name":"prices","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"granularity","type":"uint256"}],"name":"quote","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserve0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserve0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserve1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserve1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"points","type":"uint256"},{"internalType":"uint256","name":"window","type":"uint256"}],"name":"sample","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setSwapFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supplyIndex0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supplyIndex1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sync","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":[],"name":"tokens","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6101c0604052600160005560006003556000600e556000600f553480156200002657600080fd5b5033610140819052604080516361d027b360e01b815290516361d027b3916004808201926020929091908290030181865afa1580156200006a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000090919062000827565b6001600160a01b0316610160816001600160a01b0316815250506000806000336001600160a01b031663eb13c4cf6040518163ffffffff1660e01b8152600401606060405180830381865afa158015620000ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011491906200084c565b8015156080526001600160a01b0380831661010052831660e0526040519295509093509150839083906200014890620007fc565b6001600160a01b03928316815291166020820152604001604051809103906000f0801580156200017c573d6000803e3d6000fd5b506001600160a01b03166101205280620001985760fa6200019c565b6113885b6008558015620003b657826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620001e5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200020f9190810190620008e7565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156200024e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620002789190810190620008e7565b6040516020016200028b9291906200099f565b60405160208183030381529060405260019081620002aa919062000a87565b50826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620002ea573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620003149190810190620008e7565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000353573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200037d9190810190620008e7565b6040516020016200039092919062000b53565b60405160208183030381529060405260029081620003af919062000a87565b50620005c1565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620003f5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200041f9190810190620008e7565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156200045e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620004889190810190620008e7565b6040516020016200049b92919062000ba4565b60405160208183030381529060405260019081620004ba919062000a87565b50826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620004fa573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620005249190810190620008e7565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000563573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200058d9190810190620008e7565b604051602001620005a092919062000bff565b60405160208183030381529060405260029081620005bf919062000a87565b505b826001600160a01b031663313ce5676040518163ffffffff1660e01b81526004016020604051808303816000875af115801562000602573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000628919062000c21565b6200063590600a62000d5b565b6101808181525050816001600160a01b031663313ce5676040518163ffffffff1660e01b81526004016020604051808303816000875af11580156200067e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006a4919062000c21565b620006b190600a62000d5b565b6101a0526040805160608101825242815260006020820181815282840182815260078054600180820183559190945293517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68860039094029384015590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a9091015590517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f91620007879162000d6c565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f19818403018152919052805160209091012060a05250504660c0525062000dea565b61051b8062004b1883390190565b80516001600160a01b03811681146200082257600080fd5b919050565b6000602082840312156200083a57600080fd5b62000845826200080a565b9392505050565b6000806000606084860312156200086257600080fd5b6200086d846200080a565b92506200087d602085016200080a565b9150604084015180151581146200089357600080fd5b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620008d1578181015183820152602001620008b7565b83811115620008e1576000848401525b50505050565b600060208284031215620008fa57600080fd5b81516001600160401b03808211156200091257600080fd5b818401915084601f8301126200092757600080fd5b8151818111156200093c576200093c6200089e565b604051601f8201601f19908116603f011681019083821181831017156200096757620009676200089e565b816040528281528760208487010111156200098157600080fd5b62000994836020830160208801620008b4565b979650505050505050565b6c029ba30b136329020a6a690169609d1b815260008351620009c981600d850160208801620008b4565b602f60f81b600d918401918201528351620009ec81600e840160208801620008b4565b01600e01949350505050565b600181811c9082168062000a0d57607f821691505b60208210810362000a2e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000a8257600081815260208120601f850160051c8101602086101562000a5d5750805b601f850160051c820191505b8181101562000a7e5782815560010162000a69565b5050505b505050565b81516001600160401b0381111562000aa35762000aa36200089e565b62000abb8162000ab48454620009f8565b8462000a34565b602080601f83116001811462000af3576000841562000ada5750858301515b600019600386901b1c1916600185901b17855562000a7e565b600085815260208120601f198616915b8281101562000b245788860151825594840194600190910190840162000b03565b508582101562000b435787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6473414d4d2d60d81b81526000835162000b75816005850160208801620008b4565b602f60f81b600591840191820152835162000b98816006840160208801620008b4565b01600601949350505050565b6e02b37b630ba34b6329020a6a690169608d1b81526000835162000bd081600f850160208801620008b4565b602f60f81b600f91840191820152835162000bf3816010840160208801620008b4565b01601001949350505050565b6476414d4d2d60d81b81526000835162000b75816005850160208801620008b4565b60006020828403121562000c3457600080fd5b815160ff811681146200084557600080fd5b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000c9d57816000190482111562000c815762000c8162000c46565b8085161562000c8f57918102915b93841c939080029062000c61565b509250929050565b60008262000cb65750600162000d55565b8162000cc55750600062000d55565b816001811462000cde576002811462000ce95762000d09565b600191505062000d55565b60ff84111562000cfd5762000cfd62000c46565b50506001821b62000d55565b5060208310610133831016604e8410600b841016171562000d2e575081810a62000d55565b62000d3a838362000c5c565b806000190482111562000d515762000d5162000c46565b0290505b92915050565b60006200084560ff84168362000ca5565b600080835462000d7c81620009f8565b6001828116801562000d97576001811462000dad5762000dde565b60ff198416875282151583028701945062000dde565b8760005260208060002060005b8581101562000dd55781548a82015290840190820162000dba565b50505082870194505b50929695505050505050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a051613b8562000f936000396000818161053a0152818161289101528181612b4e01528181612c100152612d1b0152600081816105170152818161285001528181612b0f01528181612c520152612cf50152600081816106570152818161256401526126ee01526000818161086b0152818161095b01526115220152600081816107520152818161201c015281816125b801526127420152600081816105c4015281816107a70152818161089b01528181610b1701528181610e0d015281816117c2015281816119f201528181611e670152818161243c015281816126cc01526127200152600081816103860152818161059c0152818161078201528181610af601528181610dec0152818161172c015281816119d001528181611e45015281816123b4015281816125420152818161259601528181612b9001528181612bd701528181612cbc0152612d5f0152600061072b0152600081816104e9015261211c01526000818161043f0152818161056c015281816128280152612adb0152613b856000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c80636a6278421161019d578063bc25cf77116100e9578063d21220a7116100a2578063dd62ed3e1161007c578063dd62ed3e146108d8578063ebeb31db14610903578063f140a35a1461090b578063fff6cae91461091e57600080fd5b8063d21220a714610896578063d294f093146108bd578063d505accf146108c557600080fd5b8063bc25cf7714610838578063bda39cad1461084b578063bf944dbc14610854578063c245febc1461085d578063c45a015514610866578063c5700a021461088d57600080fd5b80639a8a0592116101565780639e8cc04b116101305780639e8cc04b146107d25780639f767c88146107e5578063a1ac4d1314610805578063a9059cbb1461082557600080fd5b80639a8a0592146107265780639af1d35a1461074d5780639d63848a1461077457600080fd5b80636a6278421461067957806370a082311461068c5780637ecebe00146106ac57806389afcb44146106cc5780638a7b8cf2146106f457806395d89b411461071e57600080fd5b806330adf81f1161025c578063443cb4bc1161021557806354cf2aeb116101ef57806354cf2aeb1461062d5780635881c475146106365780635a76f25e1461064957806361d027b31461065257600080fd5b8063443cb4bc146105f15780634d5a9f8a146105fa578063517b3f821461061a57600080fd5b806330adf81f14610487578063313ce567146104ae57806332c0defd146104c857806334e19907146104d15780633644e515146104e4578063392f37e91461050b57600080fd5b806318160ddd116102ae57806318160ddd146103e05780631df8c717146103f7578063205aabf11461041a57806322be3de11461043a57806323b872dd14610461578063252c09d71461047457600080fd5b8063022c0d9f146102f657806306fdde031461030b5780630902f1ac14610329578063095ea7b31461035e5780630dfe16811461038157806313345fe1146103c0575b600080fd5b61030961030436600461367b565b610926565b005b610313611000565b604051610320919061373f565b60405180910390f35b600954600a54600b54604080516001600160701b03948516815293909216602084015263ffffffff1690820152606001610320565b61037161036c366004613772565b61108e565b6040519015158152602001610320565b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610320565b6103d36103ce36600461379c565b61115b565b60405161032091906137d5565b6103e960035481565b604051908152602001610320565b6103ff611363565b60408051938452602084019290925290820152606001610320565b6103e9610428366004613819565b60116020526000908152604090205481565b6103717f000000000000000000000000000000000000000000000000000000000000000081565b61037161046f366004613834565b6113cb565b6103ff610482366004613870565b6114e4565b6103e97f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b6104b6601281565b60405160ff9091168152602001610320565b6103e9600e5481565b6103096104df366004613870565b611517565b6103e97f000000000000000000000000000000000000000000000000000000000000000081565b600954600a54604080517f000000000000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060208201529081019290925260608201527f0000000000000000000000000000000000000000000000000000000000000000151560808201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660a08301527f00000000000000000000000000000000000000000000000000000000000000001660c082015260e001610320565b6103e960095481565b6103e9610608366004613819565b60126020526000908152604090205481565b6103e9610628366004613772565b6115ec565b6103e960085481565b6103d3610644366004613889565b6116d4565b6103e9600a5481565b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b6103e9610687366004613819565b6116e3565b6103e961069a366004613819565b60056020526000908152604090205481565b6103e96106ba366004613819565b60066020526000908152604090205481565b6106df6106da366004613819565b611985565b60408051928352602083019190915201610320565b6106fc611cf6565b6040805182518152602080840151908201529181015190820152606001610320565b610313611d76565b6103e97f000000000000000000000000000000000000000000000000000000000000000081565b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f000000000000000000000000000000000000000000000000000000000000000016602082015201610320565b6103e96107e0366004613889565b611d83565b6103e96107f3366004613819565b60106020526000908152604090205481565b6103e9610813366004613819565b60136020526000908152604090205481565b610371610833366004613772565b611df0565b610309610846366004613819565b611e06565b6103e9600f5481565b6103e9600c5481565b6103e9600d5481565b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b6103e9600b5481565b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b6106df611f93565b6103096108d33660046138bc565b6120ba565b6103e96108e636600461392f565b600460209081526000928352604080842090915290825290205481565b6007546103e9565b6103e9610919366004613962565b61233b565b610309612374565b6000546001146109515760405162461bcd60e51b815260040161094890613985565b60405180910390fd5b60026000819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b187bd266040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db91906139ad565b15610a1c5760405162461bcd60e51b81526020600482015260116024820152704c697a617264506169723a20504155534560781b6044820152606401610948565b6000851180610a2b5750600084115b610a865760405162461bcd60e51b815260206004820152602660248201527f4c697a617264506169723a20494e53554646494349454e545f4f55545055545f604482015265105353d5539560d21b6064820152608401610948565b600954600a548187108015610a9a57508086105b610af15760405162461bcd60e51b815260206004820152602260248201527f4c697a617264506169723a20494e53554646494349454e545f4c495155494449604482015261545960f01b6064820152608401610948565b6000807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0389811690831614801590610b645750806001600160a01b0316896001600160a01b031614155b610ba95760405162461bcd60e51b81526020600482015260166024820152754c697a617264506169723a20494e56414c49445f544f60501b6044820152606401610948565b8a15610bc357610bc36001600160a01b0383168a8d6124c1565b8915610bdd57610bdd6001600160a01b0382168a8c6124c1565b8615610c4a57604051639a7bff7960e01b81526001600160a01b038a1690639a7bff7990610c179033908f908f908e908e906004016139cf565b600060405180830381600087803b158015610c3157600080fd5b505af1158015610c45573d6000803e3d6000fd5b505050505b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610c8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb29190613a1b565b6040516370a0823160e01b81523060048201529094506001600160a01b038216906370a0823190602401602060405180830381865afa158015610cf9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1d9190613a1b565b9250505060008985610d2f9190613a4a565b8311610d3c576000610d50565b610d468a86613a4a565b610d509084613a4a565b90506000610d5e8a86613a4a565b8311610d6b576000610d7f565b610d758a86613a4a565b610d7f9084613a4a565b90506000821180610d905750600081115b610dea5760405162461bcd60e51b815260206004820152602560248201527f4c697a617264506169723a20494e53554646494349454e545f494e5055545f416044820152641353d5539560da1b6064820152608401610948565b7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000008315610e4857610e4860085485610e439190613a61565b612518565b8215610e6457610e6460085484610e5f9190613a61565b6126a2565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610ea8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ecc9190613a1b565b6040516370a0823160e01b81523060048201529096506001600160a01b038216906370a0823190602401602060405180830381865afa158015610f13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f379190613a1b565b9450610f438888612824565b610f4d8787612824565b1015610f8b5760405162461bcd60e51b815260206004820152600d60248201526c4c697a617264506169723a204b60981b6044820152606401610948565b5050610f9984848888612970565b60408051838152602081018390529081018c9052606081018b90526001600160a01b038a169033907fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229060800160405180910390a350506001600055505050505050505050565b6001805461100d90613a83565b80601f016020809104026020016040519081016040528092919081815260200182805461103990613a83565b80156110865780601f1061105b57610100808354040283529160200191611086565b820191906000526020600020905b81548152906001019060200180831161106957829003601f168201915b505050505081565b60006001600160a01b0383166110f65760405162461bcd60e51b815260206004820152602760248201527f4c697a617264506169723a20417070726f766520746f20746865207a65726f206044820152666164647265737360c81b6064820152608401610948565b3360008181526004602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35060015b92915050565b606060008367ffffffffffffffff81111561117857611178613ab7565b6040519080825280602002602001820160405280156111a1578160200160208202803683370190505b506007549091506000906111b790600190613a4a565b905060006111c58587613acd565b6111cf9083613a4a565b90506000805b83831015611353576111e78784613aec565b91506000600784815481106111fe576111fe613b04565b9060005260206000209060030201600001546007848154811061122357611223613b04565b90600052602060002090600302016000015461123f9190613a4a565b90506000816007868154811061125757611257613b04565b9060005260206000209060030201600101546007868154811061127c5761127c613b04565b9060005260206000209060030201600101546112989190613a4a565b6112a29190613a61565b9050600082600787815481106112ba576112ba613b04565b906000526020600020906003020160020154600787815481106112df576112df613b04565b9060005260206000209060030201600201546112fb9190613a4a565b6113059190613a61565b90506113138c8e8484612ad7565b88858151811061132557611325613b04565b602090810291909101015261133b846001613aec565b9350505050868361134c9190613aec565b92506111d5565b509293505050505b949350505050565b600c54600d544260008080611381600954600a54600b549192909190565b63ffffffff1692506001600160701b031692506001600160701b031692508381146113c35760006113b28286613a4a565b848102979097019683029590950194505b505050909192565b6001600160a01b03831660008181526004602090815260408083203380855292528220549192909190821480159061140557506000198114155b156114cb57838110156114655760405162461bcd60e51b815260206004820152602260248201527f4c697a617264506169723a20496e73756666696369656e7420616c6c6f77616e604482015261636560f01b6064820152608401610948565b6001600160a01b03868116600081815260046020908152604080832094871680845294825291829020888603908190559151828152919392917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b6114d6868686612dcc565b6001925050505b9392505050565b600781815481106114f457600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461157a5760405162461bcd60e51b815260206004820152600860248201526721666163746f727960c01b6044820152606401610948565b60648110156115b15760405162461bcd60e51b81526020600482015260036024820152620dac2f60eb1b6044820152606401610948565b60088190556040518181527f3dda580d2b9d92da338ef46ec718e7b1dd0a2c505e3df4aa8d40360192a0f8229060200160405180910390a150565b6000806115f7611cf6565b9050600080611604611363565b5084519193509150420361166c576007805461162290600290613a4a565b8154811061163257611632613b04565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505092505b825160009061167b9042613a4a565b90506000818560200151856116909190613a4a565b61169a9190613a61565b90506000828660400151856116af9190613a4a565b6116b99190613a61565b90506116c7888a8484612ad7565b9998505050505050505050565b606061135b848484600161115b565b600080546001146117065760405162461bcd60e51b815260040161094890613985565b60026000908155600954600a546040516370a0823160e01b8152306004820152919290917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561177b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179f9190613a1b565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611809573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182d9190613a1b565b9050600061183b8584613a4a565b905060006118498584613a4a565b600354909150600081900361188b576103e861186d6118688486613acd565b612f53565b6118779190613a4a565b975061188660006103e8612fc3565b6118c0565b6118bd876118998386613acd565b6118a39190613a61565b876118ae8486613acd565b6118b89190613a61565b613056565b97505b600088116119225760405162461bcd60e51b815260206004820152602960248201527f4c697a617264506169723a20494e53554646494349454e545f4c495155494449604482015268151657d3525395115160ba1b6064820152608401610948565b61192c8989612fc3565b61193885858989612970565b604080518481526020810184905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a250506001600055509395945050505050565b6000806000546001146119aa5760405162461bcd60e51b815260040161094890613985565b60026000908155600954600a546040516370a0823160e01b8152306004820152919290917f0000000000000000000000000000000000000000000000000000000000000000917f0000000000000000000000000000000000000000000000000000000000000000916001600160a01b038416906370a0823190602401602060405180830381865afa158015611a43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a679190613a1b565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a0823190602401602060405180830381865afa158015611ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad59190613a1b565b306000908152600560205260409020546003549192509080611af78584613acd565b611b019190613a61565b995080611b0e8484613acd565b611b189190613a61565b985060008a118015611b2a5750600089115b611b885760405162461bcd60e51b815260206004820152602960248201527f4c697a617264506169723a20494e53554646494349454e545f4c495155494449604482015268151657d0955493915160ba1b6064820152608401610948565b611b92308361306c565b611ba66001600160a01b0387168c8c6124c1565b611bba6001600160a01b0386168c8b6124c1565b6040516370a0823160e01b81523060048201526001600160a01b038716906370a0823190602401602060405180830381865afa158015611bfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c229190613a1b565b6040516370a0823160e01b81523060048201529094506001600160a01b038616906370a0823190602401602060405180830381865afa158015611c69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8d9190613a1b565b9250611c9b84848a8a612970565b604080518b8152602081018b90526001600160a01b038d169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a350505050505050506001600081905550915091565b611d1a60405180606001604052806000815260200160008152602001600081525090565b60078054611d2a90600190613a4a565b81548110611d3a57611d3a613b04565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b6002805461100d90613a83565b600080611d93858585600161115b565b90506000805b8251811015611ddb57828181518110611db457611db4613b04565b602002602001015182611dc79190613aec565b915080611dd381613b1a565b915050611d99565b50611de68482613a61565b9695505050505050565b6000611dfd338484612dcc565b50600192915050565b600054600114611e285760405162461bcd60e51b815260040161094890613985565b60026000556009546040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000917f000000000000000000000000000000000000000000000000000000000000000091611efd9185916001600160a01b038616906370a0823190602401602060405180830381865afa158015611ebe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee29190613a1b565b611eec9190613a4a565b6001600160a01b03851691906124c1565b600a546040516370a0823160e01b8152306004820152611f899185916001600160a01b038516906370a0823190602401602060405180830381865afa158015611f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6e9190613a1b565b611f789190613a4a565b6001600160a01b03841691906124c1565b5050600160005550565b600080611f9f336130f7565b50503360009081526012602090815260408083205460139092529091205481151580611fcb5750600081115b156120b6573360008181526012602090815260408083208390556013909152808220919091555163299e7ae760e11b8152600481019190915260248101839052604481018290526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063533cf5ce90606401600060405180830381600087803b15801561206057600080fd5b505af1158015612074573d6000803e3d6000fd5b505060408051858152602081018590523393508392507f865ca08d59f5cb456e85cd2f7ef63664ea4f73327414e9d8152c4158b0e94645910160405180910390a35b9091565b428410156121005760405162461bcd60e51b8152602060048201526013602482015272131a5e985c9914185a5c8e8811561412549151606a1b6044820152606401610948565b6001600160a01b038716600090815260066020526040812080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b918761216e83613b1a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e001604051602081830303815290604052805190602001206040516020016121e792919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015612252573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906122885750886001600160a01b0316816001600160a01b0316145b6122d45760405162461bcd60e51b815260206004820152601d60248201527f4c697a617264506169723a20494e56414c49445f5349474e41545552450000006044820152606401610948565b6001600160a01b038981166000818152600460209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b600954600a5460085460009291906123539086613a61565b61235d9086613a4a565b945061236b85858484612ad7565b95945050505050565b6000546001146123965760405162461bcd60e51b815260040161094890613985565b60026000556040516370a0823160e01b81523060048201526124ba907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015612403573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124279190613a1b565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561248b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124af9190613a1b565b600954600a54612970565b6001600055565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612513908490613263565b505050565b6000612525600283613a61565b905060006125338284613a4a565b90506125896001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000846124c1565b6125dd6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836124c1565b6003546000906125fb6d04ee2d6d415b85acef810000000084613acd565b6126059190613a61565b905080156126255780600e600082825461261f9190613aec565b90915550505b604080518481526000602082015233917ffd26d3e0e8324438b2b556a62f87e2e5864535089e691e5119466433de1ebc61910160405180910390a2604080518381526000602082015233917f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a860291015b60405180910390a250505050565b60006126af600283613a61565b905060006126bd8284613a4a565b90506127136001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000846124c1565b6127676001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836124c1565b6003546000906127856d04ee2d6d415b85acef810000000084613acd565b61278f9190613a61565b905080156127af5780600f60008282546127a99190613aec565b90915550505b60408051600081526020810185905233917ffd26d3e0e8324438b2b556a62f87e2e5864535089e691e5119466433de1ebc61910160405180910390a260408051600081526020810184905233917f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a86029101612694565b60007f00000000000000000000000000000000000000000000000000000000000000001561295f5760007f000000000000000000000000000000000000000000000000000000000000000061288185670de0b6b3a7640000613acd565b61288b9190613a61565b905060007f00000000000000000000000000000000000000000000000000000000000000006128c285670de0b6b3a7640000613acd565b6128cc9190613a61565b90506000670de0b6b3a76400006128e38385613acd565b6128ed9190613a61565b90506000670de0b6b3a76400006129048480613acd565b61290e9190613a61565b670de0b6b3a76400006129218680613acd565b61292b9190613a61565b6129359190613aec565b9050670de0b6b3a764000061294a8284613acd565b6129549190613a61565b945050505050611155565b6129698284613acd565b9050611155565b600b5442906000906129829083613a4a565b905060008111801561299357508315155b801561299e57508215155b156129b857600c8054858302019055600d80548483020190555b60006129c2611cf6565b80519091506129d19084613a4a565b9150610708821115612a865760408051606081018252848152600c5460208201908152600d549282019283526007805460018101825560009190915291517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600390930292830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68982015590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101555b6009879055600a869055600b83905560408051888152602081018890527fcf2aa50876cdfbb541206f89af0ee78d44a2abf8d328e37fa4917f982149848a910160405180910390a150505050505050565b60007f000000000000000000000000000000000000000000000000000000000000000015612d5a576000612b0b8484612824565b90507f0000000000000000000000000000000000000000000000000000000000000000612b4085670de0b6b3a7640000613acd565b612b4a9190613a61565b93507f0000000000000000000000000000000000000000000000000000000000000000612b7f84670de0b6b3a7640000613acd565b612b899190613a61565b92506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b031614612bce578486612bd1565b85855b915091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b031614612c50577f0000000000000000000000000000000000000000000000000000000000000000612c4189670de0b6b3a7640000613acd565b612c4b9190613a61565b612c8d565b7f0000000000000000000000000000000000000000000000000000000000000000612c8389670de0b6b3a7640000613acd565b612c8d9190613a61565b97506000612ca5612c9e848b613aec565b8584613335565b612caf9083613a4a565b9050670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316896001600160a01b031614612d19577f0000000000000000000000000000000000000000000000000000000000000000612d3b565b7f00000000000000000000000000000000000000000000000000000000000000005b612d459083613acd565b612d4f9190613a61565b94505050505061135b565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316866001600160a01b031614612d9d578385612da0565b84845b9092509050612daf8783613aec565b612db98289613acd565b612dc39190613a61565b9250505061135b565b6001600160a01b038216612e335760405162461bcd60e51b815260206004820152602860248201527f4c697a617264506169723a205472616e7366657220746f20746865207a65726f604482015267206164647265737360c01b6064820152608401610948565b612e3c836130f7565b612e45826130f7565b6001600160a01b03831660009081526005602052604090205481811015612ec25760405162461bcd60e51b815260206004820152602b60248201527f4c697a617264506169723a205472616e7366657220616d6f756e74206578636560448201526a6564732062616c616e636560a81b6064820152608401610948565b6001600160a01b03808516600090815260056020526040808220858503905591851681529081208054849290612ef9908490613aec565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612f4591815260200190565b60405180910390a350505050565b60006003821115612fb45750806000612f6d600283613a61565b612f78906001613aec565b90505b81811015612fae57905080600281612f938186613a61565b612f9d9190613aec565b612fa79190613a61565b9050612f7b565b50919050565b8115612fbe575060015b919050565b612fcc826130f7565b8060036000828254612fde9190613aec565b90915550506001600160a01b0382166000908152600560205260408120805483929061300b908490613aec565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b600081831061306557816114dd565b5090919050565b613075826130f7565b80600360008282546130879190613a4a565b90915550506001600160a01b038216600090815260056020526040812080548392906130b4908490613a4a565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200161304a565b6001600160a01b0381166000908152600560205260409020548015613231576001600160a01b0382166000908152601060209081526040808320805460118085529285208054600e54600f549481905594909552829055936131598584613a4a565b905060006131678584613a4a565b905081156131c85760006d04ee2d6d415b85acef810000000061318a848a613acd565b6131949190613a61565b6001600160a01b038a166000908152601260205260408120805492935083929091906131c1908490613aec565b9091555050505b80156132275760006d04ee2d6d415b85acef81000000006131e9838a613acd565b6131f39190613a61565b6001600160a01b038a16600090815260136020526040812080549293508392909190613220908490613aec565b9091555050505b5050505050505050565b600e546001600160a01b038316600090815260106020908152604080832093909355600f546011909152919020555050565b60006132b8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134179092919063ffffffff16565b80519091501561251357808060200190518101906132d691906139ad565b6125135760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610948565b6000805b60ff81101561340e5782600061334f87836134dd565b90508581101561339f576000613365888761357a565b61336f8389613a4a565b61338190670de0b6b3a7640000613acd565b61338b9190613a61565b90506133978187613aec565b9550506133e1565b60006133ab888761357a565b6133b58884613a4a565b6133c790670de0b6b3a7640000613acd565b6133d19190613a61565b90506133dd8187613a4a565b9550505b6133ed858360016135e2565b156133f957505061340e565b5050808061340690613b1a565b915050613339565b50909392505050565b60606001600160a01b0384163b6134705760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610948565b600080856001600160a01b03168560405161348b9190613b33565b6000604051808303816000865af19150503d80600081146134c8576040519150601f19603f3d011682016040523d82523d6000602084013e6134cd565b606091505b5091509150611de682828661362b565b6000670de0b6b3a7640000828185816134f68280613acd565b6135009190613a61565b61350a9190613acd565b6135149190613a61565b61351e9190613acd565b6135289190613a61565b670de0b6b3a764000080848161353e8280613acd565b6135489190613a61565b6135529190613acd565b61355c9190613a61565b6135669086613acd565b6135709190613a61565b6114dd9190613aec565b6000670de0b6b3a764000083816135918280613acd565b61359b9190613a61565b6135a59190613acd565b6135af9190613a61565b670de0b6b3a7640000806135c38580613acd565b6135cd9190613a61565b6135d8866003613acd565b6135669190613acd565b60008284111561360957816135f78486613a4a565b11613604575060016114dd565b613621565b816136148585613a4a565b11613621575060016114dd565b5060009392505050565b6060831561363a5750816114dd565b82511561364a5782518084602001fd5b8160405162461bcd60e51b8152600401610948919061373f565b80356001600160a01b0381168114612fbe57600080fd5b60008060008060006080868803121561369357600080fd5b85359450602086013593506136aa60408701613664565b9250606086013567ffffffffffffffff808211156136c757600080fd5b818801915088601f8301126136db57600080fd5b8135818111156136ea57600080fd5b8960208285010111156136fc57600080fd5b9699959850939650602001949392505050565b60005b8381101561372a578181015183820152602001613712565b83811115613739576000848401525b50505050565b602081526000825180602084015261375e81604085016020870161370f565b601f01601f19169190910160400192915050565b6000806040838503121561378557600080fd5b61378e83613664565b946020939093013593505050565b600080600080608085870312156137b257600080fd5b6137bb85613664565b966020860135965060408601359560600135945092505050565b6020808252825182820181905260009190848201906040850190845b8181101561380d578351835292840192918401916001016137f1565b50909695505050505050565b60006020828403121561382b57600080fd5b6114dd82613664565b60008060006060848603121561384957600080fd5b61385284613664565b925061386060208501613664565b9150604084013590509250925092565b60006020828403121561388257600080fd5b5035919050565b60008060006060848603121561389e57600080fd5b6138a784613664565b95602085013595506040909401359392505050565b600080600080600080600060e0888a0312156138d757600080fd5b6138e088613664565b96506138ee60208901613664565b95506040880135945060608801359350608088013560ff8116811461391257600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561394257600080fd5b61394b83613664565b915061395960208401613664565b90509250929050565b6000806040838503121561397557600080fd5b8235915061395960208401613664565b6020808252600e908201526d1499595b9d1c985b9d0818d85b1b60921b604082015260600190565b6000602082840312156139bf57600080fd5b815180151581146114dd57600080fd5b60018060a01b038616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f909201601f19160101949350505050565b600060208284031215613a2d57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015613a5c57613a5c613a34565b500390565b600082613a7e57634e487b7160e01b600052601260045260246000fd5b500490565b600181811c90821680613a9757607f821691505b602082108103612fae57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6000816000190483118215151615613ae757613ae7613a34565b500290565b60008219821115613aff57613aff613a34565b500190565b634e487b7160e01b600052603260045260246000fd5b600060018201613b2c57613b2c613a34565b5060010190565b60008251613b4581846020870161370f565b919091019291505056fea26469706673582212203f16ac9ef192542c5fd64b8c8a1b6e41eb9ed9c2a32b9e709fe750d8c0e435ba64736f6c634300080f003360e060405234801561001057600080fd5b5060405161051b38038061051b83398101604081905261002f91610066565b336080526001600160a01b0391821660a0521660c052610099565b80516001600160a01b038116811461006157600080fd5b919050565b6000806040838503121561007957600080fd5b6100828361004a565b91506100906020840161004a565b90509250929050565b60805160a05160c0516104566100c5600039600060fa0152600060c001526000605001526104566000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063533cf5ce14610030575b600080fd5b61004361003e36600461033e565b610045565b005b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100ad5760405162461bcd60e51b81526020600482015260086024820152672737ba103830b4b960c11b60448201526064015b60405180910390fd5b81156100e7576100e76001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168484610126565b8015610121576101216001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483610126565b505050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610121928692916000916101b6918516908490610233565b80519091501561012157808060200190518101906101d4919061037f565b6101215760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016100a4565b60606001600160a01b0384163b61028c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016100a4565b600080856001600160a01b0316856040516102a791906103d1565b6000604051808303816000865af19150503d80600081146102e4576040519150601f19603f3d011682016040523d82523d6000602084013e6102e9565b606091505b50915091506102f9828286610305565b925050505b9392505050565b606083156103145750816102fe565b8251156103245782518084602001fd5b8160405162461bcd60e51b81526004016100a491906103ed565b60008060006060848603121561035357600080fd5b83356001600160a01b038116811461036a57600080fd5b95602085013595506040909401359392505050565b60006020828403121561039157600080fd5b815180151581146102fe57600080fd5b60005b838110156103bc5781810151838201526020016103a4565b838111156103cb576000848401525b50505050565b600082516103e38184602087016103a1565b9190910192915050565b602081526000825180602084015261040c8160408501602087016103a1565b601f01601f1916919091016040019291505056fea26469706673582212207a4157177a2dffe7860905f06f9f3d530af8f3c47b24e6b30b45e801bc80d17064736f6c634300080f0033
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.