ETH Price: $2,455.64 (-0.97%)

Contract

0xCfCF4Bb472Aa2AD6c82Ebef2377a20829b6356ad
Transaction Hash
Method
Block
From
To
Approve1262059182024-10-04 2:56:5330 days ago1728010613IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000000922450.0022696
Approve1210771312024-06-07 9:37:19149 days ago1717753039IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000015408650.0619813
Approve1210771242024-06-07 9:37:05149 days ago1717753025IN
0xCfCF4Bb4...29b6356ad
0 ETH0.000001530250.061661
Approve1150857162024-01-20 17:03:29287 days ago1705770209IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000313757430.0056032
Approve1125663802023-11-23 9:25:37346 days ago1700731537IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000421916130.0106335
Approve1073089122023-07-24 16:36:41467 days ago1690216601IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0001065565480.17004375
Claim Fees1073088572023-07-24 16:34:51467 days ago1690216491IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000913040090.18958364
Approve1065557142023-07-07 6:10:05485 days ago1688710205IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000471235420.00050005
Approve1064982982023-07-05 22:16:13486 days ago1688595373IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000768566650.00050005
Approve1063930892023-07-03 11:49:15489 days ago1688384955IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000291203090.00000007
Approve1061940942023-06-28 21:16:05493 days ago1687986965IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000572420550.00000487
Approve1061359582023-06-27 12:58:13495 days ago1687870693IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000255188220.00000177
Claim Fees1061359192023-06-27 12:56:55495 days ago1687870615IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000206196230.00000165
Approve1060845912023-06-26 8:25:59496 days ago1687767959IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000248971350.00000034
Approve1041966612023-06-03 13:33:17518 days ago1685799197IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0001272266930.001
Approve888885962023-04-11 6:25:00572 days ago1681194300IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000826776330.001
Approve876202762023-04-08 9:39:48575 days ago1680946788IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000877809520.001
Approve855373752023-04-02 7:51:00581 days ago1680421860IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000787367360.001
Approve850531482023-03-31 6:05:17583 days ago1680242717IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000909077570.001
Approve843002712023-03-28 11:21:23586 days ago1680002483IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0001001219960.001
Approve840336722023-03-27 11:23:48587 days ago1679916228IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0001029072220.001
Approve840336562023-03-27 11:23:48587 days ago1679916228IN
0xCfCF4Bb4...29b6356ad
0 ETH0.000103193550.001
Approve826754582023-03-21 13:58:37592 days ago1679407117IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0001074966460.001
Approve819982802023-03-18 22:32:07595 days ago1679178727IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000658005340.001
Approve816362032023-03-17 11:43:45597 days ago1679053425IN
0xCfCF4Bb4...29b6356ad
0 ETH0.0000890248290.001
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
1075562142023-07-30 10:00:05462 days ago1690711205
0xCfCF4Bb4...29b6356ad
0 ETH
1075562142023-07-30 10:00:05462 days ago1690711205
0xCfCF4Bb4...29b6356ad
0 ETH
1075562142023-07-30 10:00:05462 days ago1690711205
0xCfCF4Bb4...29b6356ad
0 ETH
1075562142023-07-30 10:00:05462 days ago1690711205
0xCfCF4Bb4...29b6356ad
0 ETH
1075544142023-07-30 9:00:05462 days ago1690707605
0xCfCF4Bb4...29b6356ad
0 ETH
1075544142023-07-30 9:00:05462 days ago1690707605
0xCfCF4Bb4...29b6356ad
0 ETH
1075544142023-07-30 9:00:05462 days ago1690707605
0xCfCF4Bb4...29b6356ad
0 ETH
1075544142023-07-30 9:00:05462 days ago1690707605
0xCfCF4Bb4...29b6356ad
0 ETH
1075485442023-07-30 5:44:25462 days ago1690695865
0xCfCF4Bb4...29b6356ad
0 ETH
1075485442023-07-30 5:44:25462 days ago1690695865
0xCfCF4Bb4...29b6356ad
0 ETH
1075485442023-07-30 5:44:25462 days ago1690695865
0xCfCF4Bb4...29b6356ad
0 ETH
1075485442023-07-30 5:44:25462 days ago1690695865
0xCfCF4Bb4...29b6356ad
0 ETH
1075485442023-07-30 5:44:25462 days ago1690695865
0xCfCF4Bb4...29b6356ad
0 ETH
1075485442023-07-30 5:44:25462 days ago1690695865
0xCfCF4Bb4...29b6356ad
0 ETH
1075485442023-07-30 5:44:25462 days ago1690695865
0xCfCF4Bb4...29b6356ad
0 ETH
1075485442023-07-30 5:44:25462 days ago1690695865
0xCfCF4Bb4...29b6356ad
0 ETH
1075485442023-07-30 5:44:25462 days ago1690695865
0xCfCF4Bb4...29b6356ad
0 ETH
1075485442023-07-30 5:44:25462 days ago1690695865
0xCfCF4Bb4...29b6356ad
0 ETH
1075485442023-07-30 5:44:25462 days ago1690695865
0xCfCF4Bb4...29b6356ad
0 ETH
1075485442023-07-30 5:44:25462 days ago1690695865
0xCfCF4Bb4...29b6356ad
0 ETH
1075485442023-07-30 5:44:25462 days ago1690695865
0xCfCF4Bb4...29b6356ad
0 ETH
1075456512023-07-30 4:07:59462 days ago1690690079
0xCfCF4Bb4...29b6356ad
0 ETH
1075456512023-07-30 4:07:59462 days ago1690690079
0xCfCF4Bb4...29b6356ad
0 ETH
1075454142023-07-30 4:00:05462 days ago1690689605
0xCfCF4Bb4...29b6356ad
0 ETH
1075454142023-07-30 4:00:05462 days ago1690689605
0xCfCF4Bb4...29b6356ad
0 ETH
View All Internal Transactions

Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x335Bd4ff...41E7456c6
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Pair

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : Pair.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import 'contracts/libraries/Math.sol';
import 'contracts/interfaces/IERC20.sol';
import 'contracts/interfaces/IPair.sol';
import 'contracts/interfaces/IPairCallee.sol';
import 'contracts/factories/PairFactory.sol';
import 'contracts/PairFees.sol';

// The base pair of pools, either stable or volatile
contract Pair is IPair {

    string public name;
    string public symbol;
    uint8 public constant decimals = 18;

    // Used to denote stable or volatile pair, not immutable since construction happens in the initialize method for CREATE2 deterministic addresses
    bool public immutable stable;

    uint public totalSupply = 0;

    mapping(address => mapping (address => uint)) public allowance;
    mapping(address => uint) public balanceOf;

    bytes32 internal DOMAIN_SEPARATOR;
    // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    bytes32 internal constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
    mapping(address => uint) public nonces;

    uint internal constant MINIMUM_LIQUIDITY = 10**3;

    address public immutable token0;
    address public immutable token1;
    address public immutable fees;
    address immutable factory;

    // Structure to capture time period obervations every 30 minutes, used for local oracles
    struct Observation {
        uint timestamp;
        uint reserve0Cumulative;
        uint reserve1Cumulative;
    }

    // Capture oracle reading every 30 minutes
    uint constant periodSize = 1800;

    Observation[] public observations;

    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 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 Transfer(address indexed from, address indexed to, uint amount);
    event Approval(address indexed owner, address indexed spender, uint amount);

    constructor() {
        factory = msg.sender;
        (address _token0, address _token1, bool _stable) = PairFactory(msg.sender).getInitializable();
        (token0, token1, stable) = (_token0, _token1, _stable);
        fees = address(new PairFees(_token0, _token1));
        if (_stable) {
            name = string(abi.encodePacked("StableV1 AMM - ", IERC20(_token0).symbol(), "/", IERC20(_token1).symbol()));
            symbol = string(abi.encodePacked("sAMM-", IERC20(_token0).symbol(), "/", IERC20(_token1).symbol()));
        } else {
            name = string(abi.encodePacked("VolatileV1 AMM - ", IERC20(_token0).symbol(), "/", IERC20(_token1).symbol()));
            symbol = string(abi.encodePacked("vAMM-", IERC20(_token0).symbol(), "/", IERC20(_token1).symbol()));
        }

        decimals0 = 10**IERC20(_token0).decimals();
        decimals1 = 10**IERC20(_token1).decimals();

        observations.push(Observation(block.timestamp, 0, 0));
    }

    // simple re-entrancy check
    uint internal _unlocked = 1;
    modifier lock() {
        require(_unlocked == 1);
        _unlocked = 2;
        _;
        _unlocked = 1;
    }

    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 returns (address, address) {
        return (token0, token1);
    }

    // claim accumulated but unclaimed fees (viewable via claimable0 and claimable1)
    function claimFees() external 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);
        }
    }

    // Accrue fees on token0
    function _update0(uint amount) internal {
        _safeTransfer(token0, fees, amount); // transfer the fees out to PairFees
        uint256 _ratio = amount * 1e18 / totalSupply; // 1e18 adjustment is removed during claim
        if (_ratio > 0) {
            index0 += _ratio;
        }
        emit Fees(msg.sender, amount, 0);
    }

    // Accrue fees on token1
    function _update1(uint amount) internal {
        _safeTransfer(token1, fees, amount);
        uint256 _ratio = amount * 1e18 / totalSupply;
        if (_ratio > 0) {
            index1 += _ratio;
        }
        emit Fees(msg.sender, 0, amount);
    }

    // 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 / 1e18; // add accrued difference for each supplied token
                claimable0[recipient] += _share;
            }
            if (_delta1 > 0) {
                uint _share = _supplied * _delta1 / 1e18;
                claimable1[recipient] += _share;
            }
        } else {
            supplyIndex0[recipient] = index0; // new users are set to the default global state
            supplyIndex1[recipient] = index1;
        }
    }

    function getReserves() public view returns (uint _reserve0, uint _reserve1, uint _blockTimestampLast) {
        _reserve0 = reserve0;
        _reserve1 = reserve1;
        _blockTimestampLast = blockTimestampLast;
    }

    // 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) {
            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 > periodSize) {
            observations.push(Observation(blockTimestamp, reserve0CumulativeLast, reserve1CumulativeLast));
        }
        reserve0 = balance0;
        reserve1 = balance1;
        blockTimestampLast = blockTimestamp;
        emit Sync(reserve0, reserve1);
    }

    // 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;
            reserve0Cumulative += _reserve0 * timeElapsed;
            reserve1Cumulative += _reserve1 * timeElapsed;
        }
    }

    // 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);
    }

    // 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;
    }

    // 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 < length; length cannot overflow
            unchecked {
                index = index + 1;
            }
        }
        return _prices;
    }

    // this low-level function should be called by addLiquidity functions in Router.sol, which performs important safety checks
    // standard uniswap v2 implementation
    function mint(address to) external lock 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;
            _mint(address(0), MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens
        } else {
            liquidity = Math.min(_amount0 * _totalSupply / _reserve0, _amount1 * _totalSupply / _reserve1);
        }
        require(liquidity > 0, 'ILM'); // Pair: INSUFFICIENT_LIQUIDITY_MINTED
        _mint(to, liquidity);

        _update(_balance0, _balance1, _reserve0, _reserve1);
        emit Mint(msg.sender, _amount0, _amount1);
    }

    // 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 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)];

        uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
        amount0 = _liquidity * _balance0 / _totalSupply; // using balances ensures pro-rata distribution
        amount1 = _liquidity * _balance1 / _totalSupply; // using balances ensures pro-rata distribution
        require(amount0 > 0 && amount1 > 0, 'ILB'); // Pair: INSUFFICIENT_LIQUIDITY_BURNED
        _burn(address(this), _liquidity);
        _safeTransfer(_token0, to, amount0);
        _safeTransfer(_token1, 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);
    }

    // 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 lock {
        require(!PairFactory(factory).isPaused());
        require(amount0Out > 0 || amount1Out > 0, 'IOA'); // Pair: INSUFFICIENT_OUTPUT_AMOUNT
        (uint _reserve0, uint _reserve1) =  (reserve0, reserve1);
        require(amount0Out < _reserve0 && amount1Out < _reserve1, 'IL'); // Pair: 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, 'IT'); // Pair: INVALID_TO
        if (amount0Out > 0) _safeTransfer(_token0, to, amount0Out); // optimistically transfer tokens
        if (amount1Out > 0) _safeTransfer(_token1, to, amount1Out); // optimistically transfer tokens
        if (data.length > 0) IPairCallee(to).hook(msg.sender, amount0Out, amount1Out, data); // callback, used for flash loans
        _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, 'IIA'); // Pair: INSUFFICIENT_INPUT_AMOUNT
        { // scope for reserve{0,1}Adjusted, avoids stack too deep errors
        (address _token0, address _token1) = (token0, token1);
        if (amount0In > 0) _update0(amount0In * PairFactory(factory).getFee(stable) / 10000); // accrue fees for token0 and move them out of pool
        if (amount1In > 0) _update1(amount1In * PairFactory(factory).getFee(stable) / 10000); // accrue fees for token1 and move them out of pool
        _balance0 = IERC20(_token0).balanceOf(address(this)); // since we removed tokens, we need to reconfirm balances, can also simply use previous balance - amountIn/ 10000, but doing balanceOf again as safety check
        _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), 'K'); // Pair: K
        }

        _update(_balance0, _balance1, _reserve0, _reserve1);
        emit Swap(msg.sender, amount0In, amount1In, amount0Out, amount1Out, to);
    }

    // force balances to match reserves
    function skim(address to) external lock {
        (address _token0, address _token1) = (token0, token1);
        _safeTransfer(_token0, to, IERC20(_token0).balanceOf(address(this)) - (reserve0));
        _safeTransfer(_token1, 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 _get_y(uint x0, uint xy, uint y) internal pure returns (uint) {
        for (uint i = 0; i < 255; i++) {
            uint y_prev = 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 (y > y_prev) {
                if (y - y_prev <= 1) {
                    return y;
                }
            } else {
                if (y_prev - y <= 1) {
                    return y;
                }
            }
        }
        return y;
    }

    function getAmountOut(uint amountIn, address tokenIn) external view returns (uint) {
        (uint _reserve0, uint _reserve1) = (reserve0, reserve1);
        amountIn -= amountIn * PairFactory(factory).getFee(stable) / 10000; // remove fee from amount received
        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 - _get_y(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);
            return _a * _b / 1e18;  // x3y+y3x >= k
        } else {
            return x * y; // xy >= k
        }
    }

    function _mint(address dst, uint amount) internal {
        _updateFor(dst); // balances must be updated on mint/burn/transfer
        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 returns (bool) {
        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 {
        require(deadline >= block.timestamp, 'Pair: EXPIRED');
        DOMAIN_SEPARATOR = keccak256(
            abi.encode(
                keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'),
                keccak256(bytes(name)),
                keccak256(bytes('1')),
                block.chainid,
                address(this)
            )
        );
        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, 'Pair: INVALID_SIGNATURE');
        allowance[owner][spender] = value;

        emit Approval(owner, spender, value);
    }

    function transfer(address dst, uint amount) external returns (bool) {
        _transferTokens(msg.sender, dst, amount);
        return true;
    }

    function transferFrom(address src, address dst, uint amount) external returns (bool) {
        address spender = msg.sender;
        uint spenderAllowance = allowance[src][spender];

        if (spender != src && spenderAllowance != type(uint).max) {
            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 {
        _updateFor(src); // update fee position for src
        _updateFor(dst); // update fee position for dst

        balanceOf[src] -= amount;
        balanceOf[dst] += amount;

        emit Transfer(src, dst, amount);
    }

    function _safeTransfer(address token,address to,uint256 value) internal {
        require(token.code.length > 0);
        (bool success, bytes memory data) =
        token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))));
    }
}

File 2 of 8 : Math.sol
pragma solidity 0.8.13;

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 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;
        }
    }
    function cbrt(uint256 n) internal pure returns (uint256) { unchecked {
        uint256 x = 0;
        for (uint256 y = 1 << 255; y > 0; y >>= 3) {
            x <<= 1;
            uint256 z = 3 * x * (x + 1) + 1;
            if (n / y >= z) {
                n -= y * z;
                x += 1;
            }
        }
        return x;
    }}
}

File 3 of 8 : IERC20.sol
pragma solidity 0.8.13;

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function transfer(address recipient, uint amount) external returns (bool);
    function decimals() external view returns (uint8);
    function symbol() external view returns (string memory);
    function balanceOf(address) external view returns (uint);
    function transferFrom(address sender, address recipient, uint amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint);
    function approve(address spender, uint value) external returns (bool);

    event Transfer(address indexed from, address indexed to, uint value);
    event Approval(address indexed owner, address indexed spender, uint value);
}

File 4 of 8 : IPair.sol
pragma solidity 0.8.13;

interface IPair {
    function metadata() external view returns (uint dec0, uint dec1, uint r0, uint r1, bool st, address t0, address t1);
    function claimFees() external returns (uint, uint);
    function tokens() external returns (address, address);
    function transferFrom(address src, address dst, uint amount) external returns (bool);
    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 (uint _reserve0, uint _reserve1, uint _blockTimestampLast);
    function getAmountOut(uint, address) external view returns (uint);
}

File 5 of 8 : IPairCallee.sol
pragma solidity 0.8.13;

interface IPairCallee {
    function hook(address sender, uint amount0, uint amount1, bytes calldata data) external;
}

File 6 of 8 : PairFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import 'contracts/interfaces/IPairFactory.sol';
import 'contracts/Pair.sol';

contract PairFactory is IPairFactory {

    bool public isPaused;
    address public pauser;
    address public pendingPauser;

    uint256 public stableFee;
    uint256 public volatileFee;
    uint256 public constant MAX_FEE = 5; // 0.05%
    address public feeManager;
    address public pendingFeeManager;

    mapping(address => mapping(address => mapping(bool => address))) public getPair;
    address[] public allPairs;
    mapping(address => bool) public isPair; // simplified check if its a pair, given that `stable` flag might not be available in peripherals

    address internal _temp0;
    address internal _temp1;
    bool internal _temp;

    event PairCreated(address indexed token0, address indexed token1, bool stable, address pair, uint);

    constructor() {
        pauser = msg.sender;
        isPaused = false;
        feeManager = msg.sender;
        stableFee = 2; // 0.02%
        volatileFee = 2;
    }

    function allPairsLength() external view returns (uint) {
        return allPairs.length;
    }

    function setPauser(address _pauser) external {
        require(msg.sender == pauser);
        pendingPauser = _pauser;
    }

    function acceptPauser() external {
        require(msg.sender == pendingPauser);
        pauser = pendingPauser;
    }

    function setPause(bool _state) external {
        require(msg.sender == pauser);
        isPaused = _state;
    }

    function setFeeManager(address _feeManager) external {
        require(msg.sender == feeManager, 'not fee manager');
        pendingFeeManager = _feeManager;
    }

    function acceptFeeManager() external {
        require(msg.sender == pendingFeeManager, 'not pending fee manager');
        feeManager = pendingFeeManager;
    }

    function setFee(bool _stable, uint256 _fee) external {
        require(msg.sender == feeManager, 'not fee manager');
        require(_fee <= MAX_FEE, 'fee too high');
        require(_fee != 0, 'fee must be nonzero');
        if (_stable) {
            stableFee = _fee;
        } else {
            volatileFee = _fee;
        }
    }

    function getFee(bool _stable) public view returns(uint256) {
        return _stable ? stableFee : volatileFee;
    }

    function pairCodeHash() external pure returns (bytes32) {
        return keccak256(type(Pair).creationCode);
    }

    function getInitializable() external view returns (address, address, bool) {
        return (_temp0, _temp1, _temp);
    }

    function createPair(address tokenA, address tokenB, bool stable) external returns (address pair) {
        require(tokenA != tokenB, 'IA'); // Pair: IDENTICAL_ADDRESSES
        (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), 'ZA'); // Pair: ZERO_ADDRESS
        require(getPair[token0][token1][stable] == address(0), 'PE'); // Pair: PAIR_EXISTS - single check is sufficient
        bytes32 salt = keccak256(abi.encodePacked(token0, token1, stable)); // notice salt includes stable as well, 3 parameters
        (_temp0, _temp1, _temp) = (token0, token1, stable);
        pair = address(new Pair{salt:salt}());
        getPair[token0][token1][stable] = pair;
        getPair[token1][token0][stable] = pair; // populate mapping in the reverse direction
        allPairs.push(pair);
        isPair[pair] = true;
        emit PairCreated(token0, token1, stable, pair, allPairs.length);
    }
}

File 7 of 8 : PairFees.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import 'contracts/interfaces/IERC20.sol';

// Pair 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 {

    address internal immutable pair; // The pair it is bonded to
    address internal immutable token0; // token0 of pair, saved localy and statically for gas optimization
    address internal immutable token1; // Token1 of pair, saved localy and statically for gas optimization

    constructor(address _token0, address _token1) {
        pair = msg.sender;
        token0 = _token0;
        token1 = _token1;
    }

    function _safeTransfer(address token,address to,uint256 value) internal {
        require(token.code.length > 0);
        (bool success, bytes memory data) =
        token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))));
    }

    // Allow the pair to transfer fees to users
    function claimFeesFor(address recipient, uint amount0, uint amount1) external {
        require(msg.sender == pair);
        if (amount0 > 0) _safeTransfer(token0, recipient, amount0);
        if (amount1 > 0) _safeTransfer(token1, recipient, amount1);
    }

}

File 8 of 8 : IPairFactory.sol
pragma solidity 0.8.13;

interface IPairFactory {
    function allPairsLength() external view returns (uint);
    function isPair(address pair) 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);
}

Settings
{
  "remappings": [
    "LayerZero/=lib/LayerZero/contracts/",
    "ds-test/=lib/ds-test/src/",
    "forge-optimism/=lib/rollcall/lib/forge-optimism/src/",
    "forge-std/=lib/forge-std/src/",
    "lib/=lib/rollcall/src/lib/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "rollcall/=lib/rollcall/src/",
    "solmate/=lib/solmate/src/",
    "utils/=test/utils/",
    "contracts/=contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london"
}

Contract Security Audit

Contract ABI

[{"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":"amount","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":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":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"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":"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":"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":"uint256","name":"_reserve0","type":"uint256"},{"internalType":"uint256","name":"_reserve1","type":"uint256"},{"internalType":"uint256","name":"_blockTimestampLast","type":"uint256"}],"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 Pair.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":"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":"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"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102745760003560e01c80637ecebe0011610151578063bda39cad116100c3578063d294f09311610087578063d294f09314610736578063d505accf1461073e578063dd62ed3e14610751578063ebeb31db1461077c578063f140a35a14610784578063fff6cae91461079757600080fd5b8063bda39cad146106eb578063bf944dbc146106f4578063c245febc146106fd578063c5700a0214610706578063d21220a71461070f57600080fd5b80639d63848a116101155780639d63848a146106145780639e8cc04b146106725780639f767c8814610685578063a1ac4d13146106a5578063a9059cbb146106c5578063bc25cf77146106d857600080fd5b80637ecebe001461057357806389afcb44146105935780638a7b8cf2146105bb57806395d89b41146105e55780639af1d35a146105ed57600080fd5b8063252c09d7116101ea5780634d5a9f8a116101ae5780634d5a9f8a146104f1578063517b3f82146105115780635881c475146105245780635a76f25e146105375780636a6278421461054057806370a082311461055357600080fd5b8063252c09d7146103cc578063313ce567146103df57806332c0defd146103f9578063392f37e914610402578063443cb4bc146104e857600080fd5b806313345fe11161023c57806313345fe11461033357806318160ddd146103535780631df8c7171461036a578063205aabf11461037257806322be3de11461039257806323b872dd146103b957600080fd5b8063022c0d9f1461027957806306fdde031461028e5780630902f1ac146102ac578063095ea7b3146102d15780630dfe1681146102f4575b600080fd5b61028c61028736600461308e565b61079f565b005b610296610eec565b6040516102a39190613152565b60405180910390f35b600854600954600a545b604080519384526020840192909252908201526060016102a3565b6102e46102df366004613185565b610f7a565b60405190151581526020016102a3565b61031b7f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a0581565b6040516001600160a01b0390911681526020016102a3565b6103466103413660046131af565b610fe7565b6040516102a391906131e8565b61035c60025481565b6040519081526020016102a3565b6102b66111e3565b61035c61038036600461322c565b60106020526000908152604090205481565b6102e47f000000000000000000000000000000000000000000000000000000000000000181565b6102e46103c7366004613247565b611252565b6102b66103da366004613283565b61131b565b6103e7601281565b60405160ff90911681526020016102a3565b61035c600d5481565b600854600954604080517f0000000000000000000000000000000000000000000000000de0b6b3a764000081527f0000000000000000000000000000000000000000000000000de0b6b3a764000060208201529081019290925260608201527f0000000000000000000000000000000000000000000000000000000000000001151560808201526001600160a01b037f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a05811660a08301527f00000000000000000000000042000000000000000000000000000000000000061660c082015260e0016102a3565b61035c60085481565b61035c6104ff36600461322c565b60116020526000908152604090205481565b61035c61051f366004613185565b61134e565b61034661053236600461329c565b611436565b61035c60095481565b61035c61054e36600461322c565b611445565b61035c61056136600461322c565b60046020526000908152604090205481565b61035c61058136600461322c565b60066020526000908152604090205481565b6105a66105a136600461322c565b6116a6565b604080519283526020830191909152016102a3565b6105c36119c3565b60408051825181526020808401519082015291810151908201526060016102a3565b610296611a43565b61031b7f0000000000000000000000004a77295815dc3fae34a34ff1a61d2e668d6e8c4981565b604080516001600160a01b037f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a05811682527f0000000000000000000000004200000000000000000000000000000000000006166020820152016102a3565b61035c61068036600461329c565b611a50565b61035c61069336600461322c565b600f6020526000908152604090205481565b61035c6106b336600461322c565b60126020526000908152604090205481565b6102e46106d3366004613185565b611abd565b61028c6106e636600461322c565b611ad3565b61035c600e5481565b61035c600b5481565b61035c600c5481565b61035c600a5481565b61031b7f000000000000000000000000420000000000000000000000000000000000000681565b6105a6611bf1565b61028c61074c3660046132cf565b611d18565b61035c61075f366004613342565b600360209081526000928352604080842090915290825290205481565b60075461035c565b61035c610792366004613375565b612020565b61028c61210e565b6013546001146107ae57600080fd5b60026013819055507f00000000000000000000000025cbddb98b35ab1ff77413456b31ec81a6b6b7466001600160a01b031663b187bd266040518163ffffffff1660e01b8152600401602060405180830381865afa158015610814573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108389190613398565b1561084257600080fd5b60008511806108515750600084115b6108885760405162461bcd60e51b8152602060048201526003602482015262494f4160e81b60448201526064015b60405180910390fd5b600854600954818710801561089c57508086105b6108cd5760405162461bcd60e51b8152602060048201526002602482015261125360f21b604482015260640161087f565b6000807f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a057f00000000000000000000000042000000000000000000000000000000000000066001600160a01b03898116908316148015906109405750806001600160a01b0316896001600160a01b031614155b6109715760405162461bcd60e51b8152602060048201526002602482015261125560f21b604482015260640161087f565b8a1561098257610982828a8d612248565b891561099357610993818a8c612248565b8615610a0057604051639a7bff7960e01b81526001600160a01b038a1690639a7bff79906109cd9033908f908f908e908e906004016133ba565b600060405180830381600087803b1580156109e757600080fd5b505af11580156109fb573d6000803e3d6000fd5b505050505b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610a44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a689190613406565b6040516370a0823160e01b81523060048201529094506001600160a01b038216906370a0823190602401602060405180830381865afa158015610aaf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad39190613406565b9250505060008985610ae59190613435565b8311610af2576000610b06565b610afc8a86613435565b610b069084613435565b90506000610b148a86613435565b8311610b21576000610b35565b610b2b8a86613435565b610b359084613435565b90506000821180610b465750600081115b610b785760405162461bcd60e51b815260206004820152600360248201526249494160e81b604482015260640161087f565b7f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a057f00000000000000000000000042000000000000000000000000000000000000068315610c8b57604051632895a2f560e11b81527f000000000000000000000000000000000000000000000000000000000000000115156004820152610c8b90612710906001600160a01b037f00000000000000000000000025cbddb98b35ab1ff77413456b31ec81a6b6b746169063512b45ea90602401602060405180830381865afa158015610c4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c729190613406565b610c7c908761344c565b610c86919061346b565b612337565b8215610d5c57604051632895a2f560e11b81527f000000000000000000000000000000000000000000000000000000000000000115156004820152610d5c90612710906001600160a01b037f00000000000000000000000025cbddb98b35ab1ff77413456b31ec81a6b6b746169063512b45ea90602401602060405180830381865afa158015610d1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d439190613406565b610d4d908661344c565b610d57919061346b565b612404565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610da0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc49190613406565b6040516370a0823160e01b81523060048201529096506001600160a01b038216906370a0823190602401602060405180830381865afa158015610e0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2f9190613406565b9450610e3b88886124ca565b610e4587876124ca565b1015610e775760405162461bcd60e51b81526020600482015260016024820152604b60f81b604482015260640161087f565b5050610e8584848888612616565b60408051838152602081018390529081018c9052606081018b90526001600160a01b038a169033907fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229060800160405180910390a350506001601355505050505050505050565b60008054610ef99061348d565b80601f0160208091040260200160405190810160405280929190818152602001828054610f259061348d565b8015610f725780601f10610f4757610100808354040283529160200191610f72565b820191906000526020600020905b815481529060010190602001808311610f5557829003601f168201915b505050505081565b3360008181526003602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fd59086815260200190565b60405180910390a35060015b92915050565b606060008367ffffffffffffffff811115611004576110046134c1565b60405190808252806020026020018201604052801561102d578160200160208202803683370190505b5060075490915060009061104390600190613435565b90506000611051858761344c565b61105b9083613435565b90506000805b838310156111d35761107387846134d7565b915060006007848154811061108a5761108a6134ef565b906000526020600020906003020160000154600784815481106110af576110af6134ef565b9060005260206000209060030201600001546110cb9190613435565b9050600081600786815481106110e3576110e36134ef565b90600052602060002090600302016001015460078681548110611108576111086134ef565b9060005260206000209060030201600101546111249190613435565b61112e919061346b565b905060008260078781548110611146576111466134ef565b9060005260206000209060030201600201546007878154811061116b5761116b6134ef565b9060005260206000209060030201600201546111879190613435565b611191919061346b565b905061119f8c8e84846127aa565b8885815181106111b1576111b16134ef565b60209081029190910101525050506001016111cc87846134d7565b9250611061565b509293505050505b949350505050565b600b54600c544260008080611201600854600954600a549192909190565b92509250925083811461124a57600061121a8286613435565b9050611226818561344c565b61123090886134d7565b965061123c818461344c565b61124690876134d7565b9550505b505050909192565b6001600160a01b03831660008181526003602090815260408083203380855292528220549192909190821480159061128c57506000198114155b1561130257600061129d8583613435565b6001600160a01b038881166000818152600360209081526040808320948916808452948252918290208590559051848152939450919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b61130d868686612a9f565b6001925050505b9392505050565b6007818154811061132b57600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6000806113596119c3565b90506000806113666111e3565b508451919350915042036113ce576007805461138490600290613435565b81548110611394576113946134ef565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505092505b82516000906113dd9042613435565b90506000818560200151856113f29190613435565b6113fc919061346b565b90506000828660400151856114119190613435565b61141b919061346b565b9050611429888a84846127aa565b9998505050505050505050565b60606111db8484846001610fe7565b600060135460011461145657600080fd5b60026013556008546009546040516370a0823160e01b81523060048201526000907f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a056001600160a01b0316906370a0823190602401602060405180830381865afa1580156114c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ec9190613406565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000420000000000000000000000000000000000000616906370a0823190602401602060405180830381865afa158015611556573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157a9190613406565b905060006115888584613435565b905060006115968584613435565b60025490915060008190036115d8576103e86115ba6115b5848661344c565b612b5f565b6115c49190613435565b97506115d360006103e8612bcf565b61160d565b61160a876115e6838661344c565b6115f0919061346b565b876115fb848661344c565b611605919061346b565b612c62565b97505b600088116116435760405162461bcd60e51b8152602060048201526003602482015262494c4d60e81b604482015260640161087f565b61164d8989612bcf565b61165985858989612616565b604080518481526020810184905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a250506001601355509395945050505050565b6000806013546001146116b857600080fd5b60026013556008546009546040516370a0823160e01b81523060048201527f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a05907f0000000000000000000000004200000000000000000000000000000000000006906000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561174e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117729190613406565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156117bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e09190613406565b306000908152600460205260409020546002549192509080611802858461344c565b61180c919061346b565b995080611819848461344c565b611823919061346b565b985060008a1180156118355750600089115b6118675760405162461bcd60e51b815260206004820152600360248201526224a62160e91b604482015260640161087f565b6118713083612c78565b61187c868c8c612248565b611887858c8b612248565b6040516370a0823160e01b81523060048201526001600160a01b038716906370a0823190602401602060405180830381865afa1580156118cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ef9190613406565b6040516370a0823160e01b81523060048201529094506001600160a01b038616906370a0823190602401602060405180830381865afa158015611936573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195a9190613406565b925061196884848a8a612616565b604080518b8152602081018b90526001600160a01b038d169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a350505050505050506001601381905550915091565b6119e760405180606001604052806000815260200160008152602001600081525090565b600780546119f790600190613435565b81548110611a0757611a076134ef565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b60018054610ef99061348d565b600080611a608585856001610fe7565b90506000805b8251811015611aa857828181518110611a8157611a816134ef565b602002602001015182611a9491906134d7565b915080611aa081613505565b915050611a66565b50611ab3848261346b565b9695505050505050565b6000611aca338484612a9f565b50600192915050565b601354600114611ae257600080fd5b60026013556008546040516370a0823160e01b81523060048201527f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a05917f000000000000000000000000420000000000000000000000000000000000000691611baf9184918691906001600160a01b038416906370a08231906024015b602060405180830381865afa158015611b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba09190613406565b611baa9190613435565b612248565b6009546040516370a0823160e01b8152306004820152611be79183918691906001600160a01b038416906370a0823190602401611b5f565b5050600160135550565b600080611bfd33612d03565b50503360009081526011602090815260408083205460129092529091205481151580611c295750600081115b15611d14573360008181526011602090815260408083208390556012909152808220919091555163299e7ae760e11b8152600481019190915260248101839052604481018290526001600160a01b037f0000000000000000000000004a77295815dc3fae34a34ff1a61d2e668d6e8c49169063533cf5ce90606401600060405180830381600087803b158015611cbe57600080fd5b505af1158015611cd2573d6000803e3d6000fd5b505060408051858152602081018590523393508392507f865ca08d59f5cb456e85cd2f7ef63664ea4f73327414e9d8152c4158b0e94645910160405180910390a35b9091565b42841015611d585760405162461bcd60e51b815260206004820152600d60248201526c14185a5c8e8811561412549151609a1b604482015260640161087f565b7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051611d88919061351e565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f19818403018152918152815160209283012060058190556001600160a01b038a166000908152600690935290822080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b919087611e5383613505565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001611ecc92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015611f37573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590611f6d5750886001600160a01b0316816001600160a01b0316145b611fb95760405162461bcd60e51b815260206004820152601760248201527f506169723a20494e56414c49445f5349474e4154555245000000000000000000604482015260640161087f565b6001600160a01b038981166000818152600360209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b600854600954604051632895a2f560e11b81527f0000000000000000000000000000000000000000000000000000000000000001151560048201526000929190612710907f00000000000000000000000025cbddb98b35ab1ff77413456b31ec81a6b6b7466001600160a01b03169063512b45ea90602401602060405180830381865afa1580156120b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d99190613406565b6120e3908761344c565b6120ed919061346b565b6120f79086613435565b9450612105858584846127aa565b95945050505050565b60135460011461211d57600080fd5b60026013556040516370a0823160e01b8152306004820152612241907f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a056001600160a01b0316906370a0823190602401602060405180830381865afa15801561218a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ae9190613406565b6040516370a0823160e01b81523060048201527f00000000000000000000000042000000000000000000000000000000000000066001600160a01b0316906370a0823190602401602060405180830381865afa158015612212573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122369190613406565b600854600954612616565b6001601355565b6000836001600160a01b03163b1161225f57600080fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916122bb91906135b9565b6000604051808303816000865af19150503d80600081146122f8576040519150601f19603f3d011682016040523d82523d6000602084013e6122fd565b606091505b50915091508180156123275750805115806123275750808060200190518101906123279190613398565b61233057600080fd5b5050505050565b6123827f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a057f0000000000000000000000004a77295815dc3fae34a34ff1a61d2e668d6e8c4983612248565b60025460009061239a83670de0b6b3a764000061344c565b6123a4919061346b565b905080156123c45780600d60008282546123be91906134d7565b90915550505b604080518381526000602082015233917f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a860291015b60405180910390a25050565b61244f7f00000000000000000000000042000000000000000000000000000000000000067f0000000000000000000000004a77295815dc3fae34a34ff1a61d2e668d6e8c4983612248565b60025460009061246783670de0b6b3a764000061344c565b612471919061346b565b905080156124915780600e600082825461248b91906134d7565b90915550505b60408051600081526020810184905233917f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a860291016123f8565b60007f0000000000000000000000000000000000000000000000000000000000000001156126055760007f0000000000000000000000000000000000000000000000000de0b6b3a764000061252785670de0b6b3a764000061344c565b612531919061346b565b905060007f0000000000000000000000000000000000000000000000000de0b6b3a764000061256885670de0b6b3a764000061344c565b612572919061346b565b90506000670de0b6b3a7640000612589838561344c565b612593919061346b565b90506000670de0b6b3a76400006125aa848061344c565b6125b4919061346b565b670de0b6b3a76400006125c7868061344c565b6125d1919061346b565b6125db91906134d7565b9050670de0b6b3a76400006125f0828461344c565b6125fa919061346b565b945050505050610fe1565b61260f828461344c565b9050610fe1565b600a5442906000906126289083613435565b905060008111801561263957508315155b801561264457508215155b1561268b57612653818561344c565b600b600082825461266491906134d7565b909155506126749050818461344c565b600c600082825461268591906134d7565b90915550505b60006126956119c3565b80519091506126a49084613435565b91506107088211156127595760408051606081018252848152600b5460208201908152600c549282019283526007805460018101825560009190915291517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600390930292830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68982015590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101555b60088790556009869055600a83905560408051888152602081018890527fcf2aa50876cdfbb541206f89af0ee78d44a2abf8d328e37fa4917f982149848a910160405180910390a150505050505050565b60007f000000000000000000000000000000000000000000000000000000000000000115612a2d5760006127de84846124ca565b90507f0000000000000000000000000000000000000000000000000de0b6b3a764000061281385670de0b6b3a764000061344c565b61281d919061346b565b93507f0000000000000000000000000000000000000000000000000de0b6b3a764000061285284670de0b6b3a764000061344c565b61285c919061346b565b92506000807f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a056001600160a01b0316876001600160a01b0316146128a15784866128a4565b85855b915091507f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a056001600160a01b0316876001600160a01b031614612923577f0000000000000000000000000000000000000000000000000de0b6b3a764000061291489670de0b6b3a764000061344c565b61291e919061346b565b612960565b7f0000000000000000000000000000000000000000000000000de0b6b3a764000061295689670de0b6b3a764000061344c565b612960919061346b565b97506000612978612971848b6134d7565b8584612e63565b6129829083613435565b9050670de0b6b3a76400007f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a056001600160a01b0316896001600160a01b0316146129ec577f0000000000000000000000000000000000000000000000000de0b6b3a7640000612a0e565b7f0000000000000000000000000000000000000000000000000de0b6b3a76400005b612a18908361344c565b612a22919061346b565b9450505050506111db565b6000807f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a056001600160a01b0316866001600160a01b031614612a70578385612a73565b84845b9092509050612a8287836134d7565b612a8c828961344c565b612a96919061346b565b925050506111db565b612aa883612d03565b612ab182612d03565b6001600160a01b03831660009081526004602052604081208054839290612ad9908490613435565b90915550506001600160a01b03821660009081526004602052604081208054839290612b069084906134d7565b92505081905550816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612b5291815260200190565b60405180910390a3505050565b60006003821115612bc05750806000612b7960028361346b565b612b849060016134d7565b90505b81811015612bba57905080600281612b9f818661346b565b612ba991906134d7565b612bb3919061346b565b9050612b87565b50919050565b8115612bca575060015b919050565b612bd882612d03565b8060026000828254612bea91906134d7565b90915550506001600160a01b03821660009081526004602052604081208054839290612c179084906134d7565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b6000818310612c715781611314565b5090919050565b612c8182612d03565b8060026000828254612c939190613435565b90915550506001600160a01b03821660009081526004602052604081208054839290612cc0908490613435565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001612c56565b6001600160a01b0381166000908152600460205260409020548015612e31576001600160a01b0382166000908152600f60209081526040808320805460108085529285208054600d54600e54948190559490955282905593612d658584613435565b90506000612d738584613435565b90508115612dce576000670de0b6b3a7640000612d90848a61344c565b612d9a919061346b565b6001600160a01b038a16600090815260116020526040812080549293508392909190612dc79084906134d7565b9091555050505b8015612e27576000670de0b6b3a7640000612de9838a61344c565b612df3919061346b565b6001600160a01b038a16600090815260126020526040812080549293508392909190612e209084906134d7565b9091555050505b5050505050505050565b600d546001600160a01b0383166000908152600f6020908152604080832093909355600e546010909152919020555050565b6000805b60ff811015612f6957826000612e7d8783612f72565b905085811015612ecd576000612e93888761300f565b612e9d8389613435565b612eaf90670de0b6b3a764000061344c565b612eb9919061346b565b9050612ec581876134d7565b955050612f0f565b6000612ed9888761300f565b612ee38884613435565b612ef590670de0b6b3a764000061344c565b612eff919061346b565b9050612f0b8187613435565b9550505b81851115612f38576001612f238387613435565b11612f3357849350505050611314565b612f54565b6001612f448684613435565b11612f5457849350505050611314565b50508080612f6190613505565b915050612e67565b50909392505050565b6000670de0b6b3a764000082818581612f8b828061344c565b612f95919061346b565b612f9f919061344c565b612fa9919061346b565b612fb3919061344c565b612fbd919061346b565b670de0b6b3a7640000808481612fd3828061344c565b612fdd919061346b565b612fe7919061344c565b612ff1919061346b565b612ffb908661344c565b613005919061346b565b61131491906134d7565b6000670de0b6b3a76400008381613026828061344c565b613030919061346b565b61303a919061344c565b613044919061346b565b670de0b6b3a764000080613058858061344c565b613062919061346b565b61306d86600361344c565b612ffb919061344c565b80356001600160a01b0381168114612bca57600080fd5b6000806000806000608086880312156130a657600080fd5b85359450602086013593506130bd60408701613077565b9250606086013567ffffffffffffffff808211156130da57600080fd5b818801915088601f8301126130ee57600080fd5b8135818111156130fd57600080fd5b89602082850101111561310f57600080fd5b9699959850939650602001949392505050565b60005b8381101561313d578181015183820152602001613125565b8381111561314c576000848401525b50505050565b6020815260008251806020840152613171816040850160208701613122565b601f01601f19169190910160400192915050565b6000806040838503121561319857600080fd5b6131a183613077565b946020939093013593505050565b600080600080608085870312156131c557600080fd5b6131ce85613077565b966020860135965060408601359560600135945092505050565b6020808252825182820181905260009190848201906040850190845b8181101561322057835183529284019291840191600101613204565b50909695505050505050565b60006020828403121561323e57600080fd5b61131482613077565b60008060006060848603121561325c57600080fd5b61326584613077565b925061327360208501613077565b9150604084013590509250925092565b60006020828403121561329557600080fd5b5035919050565b6000806000606084860312156132b157600080fd5b6132ba84613077565b95602085013595506040909401359392505050565b600080600080600080600060e0888a0312156132ea57600080fd5b6132f388613077565b965061330160208901613077565b95506040880135945060608801359350608088013560ff8116811461332557600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561335557600080fd5b61335e83613077565b915061336c60208401613077565b90509250929050565b6000806040838503121561338857600080fd5b8235915061336c60208401613077565b6000602082840312156133aa57600080fd5b8151801515811461131457600080fd5b60018060a01b038616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f909201601f19160101949350505050565b60006020828403121561341857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156134475761344761341f565b500390565b60008160001904831182151516156134665761346661341f565b500290565b60008261348857634e487b7160e01b600052601260045260246000fd5b500490565b600181811c908216806134a157607f821691505b602082108103612bba57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600082198211156134ea576134ea61341f565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600182016135175761351761341f565b5060010190565b600080835481600182811c91508083168061353a57607f831692505b6020808410820361355957634e487b7160e01b86526022600452602486fd5b81801561356d576001811461357e576135ab565b60ff198616895284890196506135ab565b60008a81526020902060005b868110156135a35781548b82015290850190830161358a565b505084890196505b509498975050505050505050565b600082516135cb818460208701613122565b919091019291505056fea2646970667358221220a19e3ae5a8be50d3f0214f26cdfbbf27d23d06d04049400f5246a73b9288278264736f6c634300080d0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.