Contract 0xadf902b11e4ad36b227b84d856b229258b0b0465

 
Txn Hash Method
Block
From
To
Value
0x1ae2c7ff0f1cdad24bc5a89966a87cdb7497aba585d52c3c95acb184b4292e41Approve461087452022-12-06 16:45:272 days 13 hrs ago0xbc5fba1fef0ba69e401cdf97197d75a5f9d9d4c6 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000794431170.001
0x3d05838226f7f320e8a162c4fa34c16da4d91f50ba016b95c8b311d7962255feApprove446535312022-12-02 14:23:306 days 16 hrs ago0x3b6d9cb250d9abe90df81ff4c85a652020d67aa9 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000603837670.001
0xf6d6b7237e7d1e38608807fe4c6d4c2220176bb9e8c4c47bc96d8893a9b484ceApprove446531272022-12-02 14:22:006 days 16 hrs ago0x3b6d9cb250d9abe90df81ff4c85a652020d67aa9 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000603837670.001
0x964a9447b7a95fb03b4057dfb39ee1682304651d1191ca1410a02b77f8417a80Approve438831592022-11-30 12:32:338 days 18 hrs ago0x49fd1607a0b93334f090ebaf42c72babb38a0f76 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000472069350.001
0x8a0d03567ff6cb89729ec8f87a8999c00f140daf4b1593491d646dda2a2109bfApprove435608672022-11-29 13:07:379 days 17 hrs ago0x49fd1607a0b93334f090ebaf42c72babb38a0f76 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000532035670.001
0xed7465c13f652b1ce5243d645a7c8fde6e528b3422a0712264a62afbf2ebd992Approve415732702022-11-24 5:29:3015 days 1 hr ago0x561097f3d0f193f53e56899555218e3e88d1ee38 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000506512320.001
0xffddb822165e9e1388cc8342106ec7721a47e05b2aedc205fd6b4455e4486f5bApprove415726442022-11-24 5:27:0015 days 1 hr ago0x5ab404ab63831bfcf824f53b4ac3737b9d155d90 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000417863140.0012
0x7487dad259f906df72857acbe1f9d7e8aa924892157695c748dd1c4130b7dfc5Approve385350852022-11-15 23:22:2823 days 7 hrs ago0xb8f57ab602b15f8841fd3e76e43f45e393e69925 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000586062930.001
0x13e7892de719e0609e003614615638f4ed52ba107fbf792839d42e2ed54d5722Approve383566212022-11-15 9:11:2523 days 21 hrs ago0x27ab111c7348081f404fd66729fa10a29f6d7ba7 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000696087060.0012
0xc46a383e8cf2d414d32dfc3ce6a45cfb992d4794f33723ab37ae42e816241950Approve380780842022-11-14 10:26:2324 days 20 hrs ago0x1d7021444d7c054af212ec483001c9b93cc58b87 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000545109370.001
0x7b4cbf7755277c938ac5ebbe31a2277af429ac4dec9407c51df856ca73de5115Approve375492252022-11-12 17:20:0526 days 13 hrs ago0xb3a51666de59c038b7c9f969a2d0b900af0f18c9 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000608522840.001
0xf9d7d6388321635d274c02f8a2c00482756377c515f7af00fdfa2538773f7ef8Approve371308972022-11-11 13:51:3227 days 16 hrs ago0x3b6d9cb250d9abe90df81ff4c85a652020d67aa9 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000743122270.001
0xd5652d68e154f3fa43477bab030aa674a0b79f4b2a2f6944ae81d0207e5ee46bApprove371166792022-11-11 13:09:1627 days 17 hrs ago0xd180dd68759a1570a66439548319b94240f309c0 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0001192894870.001
0xaec98858bbb43d0daa89196a65575d3672f713a22b691f10e2d5f5ee87a10a83Approve369416502022-11-11 4:51:0828 days 1 hr ago0x2d76220bdd99902a2e085252010ba3e092ae7124 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000765939090.0012
0x994f165ad54eb805cf4b0781ac2d095f9448b9df0ba9e3b0024a11ffcaa30a4eApprove369401002022-11-11 4:46:3828 days 1 hr ago0x2d76220bdd99902a2e085252010ba3e092ae7124 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000832759330.001
0xb774e0acc2de6b5bd3d1fb43d6bdcccdb8e255c4425ec744ee1b6549934ccd11Approve368741382022-11-11 0:14:1328 days 6 hrs ago0x472091bc98fe1ef24097c3c3c5db9a9775a5d3b5 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.000071612870.001
0xc630c26ade4c9251258c8015631bf8fe2733a27726fdd3610a9e0f258011e1c2Approve363872842022-11-09 16:28:0229 days 14 hrs ago 0xa9f078b3b6dd6c04308f19def394b6d5a1b8b732 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0004222621840.001
0xbda47f73d8003bf08eb0a1223fafec003067905b9a8f3ab40b4289d5fbf5a0d5Approve361191082022-11-09 4:58:2330 days 1 hr ago0x171e659aba00c78e0e08c2c5e9c6b58c81199f16 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000619660560.001
0x272f29ea83ca1faccc7dbf802ab19cb4ab53590bcdb51503dec919c5b7654c6dApprove355614622022-11-08 0:16:3331 days 6 hrs ago0xaef4baa66318f4821402998272678274b6123fcc IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000580549970.001
0xf97ca23f929e72581c3c80bbc7029f0027b148a553f386c3ad7bb108027c45d3Approve352166042022-11-07 0:42:2032 days 6 hrs ago0xaef4baa66318f4821402998272678274b6123fcc IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000442658630.001
0x25bf8e995370dbbf88c22deeae060fc87d1b2c60541cd6deeae64e2400434effApprove351928182022-11-06 23:01:3332 days 7 hrs ago0x35a807f9dd68c7b03a992477f85cf5a08ee9a69e IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000550485720.001
0x6f0e452623c33e49bdd8b32cb2724f6eebcdb20fc42cae61bda5c948c13a860eApprove344851692022-11-05 2:08:3934 days 4 hrs ago0xa77e0be155c36e9e0f4b85fd5fcf86440d619913 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000641121470.001
0xa34098ed593c806e287d83c1cff7792b0d7d67eae21620bcad4dad3afcec9c07Approve334934722022-11-01 22:48:5537 days 7 hrs ago0xf69f081e630e95a407789935f14ce8ed5cb4a749 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.000039854170.0012
0x8a1b3083a99b0ad51c8fa5394275950e67ae315b591096a9d34689410b5288cfApprove332852832022-11-01 6:32:5538 days 10 mins ago0x2cc0006529b8013f7dde01b7bd31ab7053545a12 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000349264970.001
0x2fdf871ca0692a542e041c2c4e1d8abaecf04422877e5a132a749dd02111e927Approve329710142022-10-31 2:32:3139 days 4 hrs ago0x2cc0006529b8013f7dde01b7bd31ab7053545a12 IN  0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether0.0000383707060.001
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x861a8e7b53121c943dd639998f3d2c9fb5283a948895a8a8e2789f31261e9878470306472022-12-09 6:30:1313 mins ago 0xadf902b11e4ad36b227b84d856b229258b0b0465 0x25cbddb98b35ab1ff77413456b31ec81a6b6b7460 Ether
0x861a8e7b53121c943dd639998f3d2c9fb5283a948895a8a8e2789f31261e9878470306472022-12-09 6:30:1313 mins ago 0xee29dc49b97f17e2e1c071ecfa82c4bee5620db1 0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether
0x861a8e7b53121c943dd639998f3d2c9fb5283a948895a8a8e2789f31261e9878470306472022-12-09 6:30:1313 mins ago 0xadf902b11e4ad36b227b84d856b229258b0b0465 0x25cbddb98b35ab1ff77413456b31ec81a6b6b7460 Ether
0x861a8e7b53121c943dd639998f3d2c9fb5283a948895a8a8e2789f31261e9878470306472022-12-09 6:30:1313 mins ago 0xee29dc49b97f17e2e1c071ecfa82c4bee5620db1 0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether
0x9932ddae1566ac9c3991076d8b96bc0251015a7edecd029a83368a71a2e48d8f470304522022-12-09 6:29:4314 mins ago 0xadf902b11e4ad36b227b84d856b229258b0b0465 0x25cbddb98b35ab1ff77413456b31ec81a6b6b7460 Ether
0x9932ddae1566ac9c3991076d8b96bc0251015a7edecd029a83368a71a2e48d8f470304522022-12-09 6:29:4314 mins ago 0xbcc9dd149985c1fa642801da3807620adb9bd5e7 0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether
0x9932ddae1566ac9c3991076d8b96bc0251015a7edecd029a83368a71a2e48d8f470304522022-12-09 6:29:4314 mins ago 0xadf902b11e4ad36b227b84d856b229258b0b0465 0x25cbddb98b35ab1ff77413456b31ec81a6b6b7460 Ether
0x9932ddae1566ac9c3991076d8b96bc0251015a7edecd029a83368a71a2e48d8f470304522022-12-09 6:29:4314 mins ago 0xbcc9dd149985c1fa642801da3807620adb9bd5e7 0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether
0x7fce53a036af091c336b690c25183cf7e1f56927bc5a738d9528cd5c88ee2cf1470230902022-12-09 6:11:4332 mins ago 0xadf902b11e4ad36b227b84d856b229258b0b0465 0x25cbddb98b35ab1ff77413456b31ec81a6b6b7460 Ether
0x7fce53a036af091c336b690c25183cf7e1f56927bc5a738d9528cd5c88ee2cf1470230902022-12-09 6:11:4332 mins ago 0xee29dc49b97f17e2e1c071ecfa82c4bee5620db1 0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether
0x7fce53a036af091c336b690c25183cf7e1f56927bc5a738d9528cd5c88ee2cf1470230902022-12-09 6:11:4332 mins ago 0xadf902b11e4ad36b227b84d856b229258b0b0465 0x25cbddb98b35ab1ff77413456b31ec81a6b6b7460 Ether
0x7fce53a036af091c336b690c25183cf7e1f56927bc5a738d9528cd5c88ee2cf1470230902022-12-09 6:11:4332 mins ago 0xee29dc49b97f17e2e1c071ecfa82c4bee5620db1 0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether
0x2d7655d79629ed86d675a705fab358f8fe94b5a54dc303dd3cbaa949b65848cb470219872022-12-09 6:09:1334 mins ago 0xadf902b11e4ad36b227b84d856b229258b0b0465 0x25cbddb98b35ab1ff77413456b31ec81a6b6b7460 Ether
0x2d7655d79629ed86d675a705fab358f8fe94b5a54dc303dd3cbaa949b65848cb470219872022-12-09 6:09:1334 mins ago 0xb7c496afea8c74b181568074d9bd7850a5b3a52d 0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether
0x2d7655d79629ed86d675a705fab358f8fe94b5a54dc303dd3cbaa949b65848cb470219872022-12-09 6:09:1334 mins ago 0xadf902b11e4ad36b227b84d856b229258b0b0465 0x25cbddb98b35ab1ff77413456b31ec81a6b6b7460 Ether
0x2d7655d79629ed86d675a705fab358f8fe94b5a54dc303dd3cbaa949b65848cb470219872022-12-09 6:09:1334 mins ago 0xb7c496afea8c74b181568074d9bd7850a5b3a52d 0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether
0x825eb65c02ef8bcc4fe717021e1d3fa0af59562b3b3d092ccef5e5c0fcd338c5470219812022-12-09 6:09:1334 mins ago 0xadf902b11e4ad36b227b84d856b229258b0b0465 0x25cbddb98b35ab1ff77413456b31ec81a6b6b7460 Ether
0x825eb65c02ef8bcc4fe717021e1d3fa0af59562b3b3d092ccef5e5c0fcd338c5470219812022-12-09 6:09:1334 mins ago 0xe14ca391ede16fa879c91a55463489dbb5a5ff06 0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether
0x825eb65c02ef8bcc4fe717021e1d3fa0af59562b3b3d092ccef5e5c0fcd338c5470219812022-12-09 6:09:1334 mins ago 0xadf902b11e4ad36b227b84d856b229258b0b0465 0x25cbddb98b35ab1ff77413456b31ec81a6b6b7460 Ether
0x825eb65c02ef8bcc4fe717021e1d3fa0af59562b3b3d092ccef5e5c0fcd338c5470219812022-12-09 6:09:1334 mins ago 0xe14ca391ede16fa879c91a55463489dbb5a5ff06 0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether
0xb03dd6f2f42a9e378ae120c98669eb11e17213b38e0b2fb314a3b16e50b76322470215702022-12-09 6:08:1335 mins ago 0xadf902b11e4ad36b227b84d856b229258b0b0465 0x25cbddb98b35ab1ff77413456b31ec81a6b6b7460 Ether
0xb03dd6f2f42a9e378ae120c98669eb11e17213b38e0b2fb314a3b16e50b76322470215702022-12-09 6:08:1335 mins ago 0xb7c496afea8c74b181568074d9bd7850a5b3a52d 0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether
0xb03dd6f2f42a9e378ae120c98669eb11e17213b38e0b2fb314a3b16e50b76322470215702022-12-09 6:08:1335 mins ago 0xadf902b11e4ad36b227b84d856b229258b0b0465 0x25cbddb98b35ab1ff77413456b31ec81a6b6b7460 Ether
0xb03dd6f2f42a9e378ae120c98669eb11e17213b38e0b2fb314a3b16e50b76322470215702022-12-09 6:08:1335 mins ago 0xb7c496afea8c74b181568074d9bd7850a5b3a52d 0xadf902b11e4ad36b227b84d856b229258b0b04650 Ether
0xb03dd6f2f42a9e378ae120c98669eb11e17213b38e0b2fb314a3b16e50b76322470215702022-12-09 6:08:1335 mins ago 0xadf902b11e4ad36b227b84d856b229258b0b0465 0xb7c496afea8c74b181568074d9bd7850a5b3a52d0 Ether
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x335bd4ffa921160fc86ce3843f80a9941e7456c6

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"}]

61016060405260006002556000600d556000600e5560016013553480156200002657600080fd5b50336001600160a01b0316610100816001600160a01b0316815250506000806000336001600160a01b031663eb13c4cf6040518163ffffffff1660e01b8152600401606060405180830381865afa15801562000086573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ac9190620007c8565b8015156080526001600160a01b0380831660c052831660a052604051929550909350915083908390620000df90620006f7565b6001600160a01b03928316815291166020820152604001604051809103906000f08015801562000113573d6000803e3d6000fd5b506001600160a01b031660e05280156200034557826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000166573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000190919081019062000863565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620001cf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620001f9919081019062000863565b6040516020016200020c9291906200091b565b604051602081830303815290604052600090805190602001906200023292919062000705565b50826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000272573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200029c919081019062000863565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620002db573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000305919081019062000863565b6040516020016200031892919062000976565b604051602081830303815290604052600190805190602001906200033e92919062000705565b506200055e565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000384573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620003ae919081019062000863565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620003ed573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000417919081019062000863565b6040516020016200042a929190620009c7565b604051602081830303815290604052600090805190602001906200045092919062000705565b50826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000490573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620004ba919081019062000863565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620004f9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000523919081019062000863565b6040516020016200053692919062000a24565b604051602081830303815290604052600190805190602001906200055c92919062000705565b505b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200059d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005c3919062000a46565b620005d090600a62000b87565b6101208181525050816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000617573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200063d919062000a46565b6200064a90600a62000b87565b6101405250506040805160608101825242815260006020820181815292820181815260078054600181018255925291517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68860039092029182015591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101555062000bd4565b610370806200436083390190565b828054620007139062000b98565b90600052602060002090601f01602090048101928262000737576000855562000782565b82601f106200075257805160ff191683800117855562000782565b8280016001018555821562000782579182015b828111156200078257825182559160200191906001019062000765565b506200079092915062000794565b5090565b5b8082111562000790576000815560010162000795565b80516001600160a01b0381168114620007c357600080fd5b919050565b600080600060608486031215620007de57600080fd5b620007e984620007ab565b9250620007f960208501620007ab565b9150604084015180151581146200080f57600080fd5b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200084d57818101518382015260200162000833565b838111156200085d576000848401525b50505050565b6000602082840312156200087657600080fd5b81516001600160401b03808211156200088e57600080fd5b818401915084601f830112620008a357600080fd5b815181811115620008b857620008b86200081a565b604051601f8201601f19908116603f01168101908382118183101715620008e357620008e36200081a565b81604052828152876020848701011115620008fd57600080fd5b6200091083602083016020880162000830565b979650505050505050565b6e029ba30b13632ab189020a6a690169608d1b8152600083516200094781600f85016020880162000830565b602f60f81b600f9184019182015283516200096a81601084016020880162000830565b01601001949350505050565b6473414d4d2d60d81b8152600083516200099881600585016020880162000830565b602f60f81b6005918401918201528351620009bb81600684016020880162000830565b01600601949350505050565b7002b37b630ba34b632ab189020a6a690169607d1b815260008351620009f581601185016020880162000830565b602f60f81b601191840191820152835162000a1881601284016020880162000830565b01601201949350505050565b6476414d4d2d60d81b8152600083516200099881600585016020880162000830565b60006020828403121562000a5957600080fd5b815160ff8116811462000a6b57600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000ac957816000190482111562000aad5762000aad62000a72565b8085161562000abb57918102915b93841c939080029062000a8d565b509250929050565b60008262000ae25750600162000b81565b8162000af15750600062000b81565b816001811462000b0a576002811462000b155762000b35565b600191505062000b81565b60ff84111562000b295762000b2962000a72565b50506001821b62000b81565b5060208310610133831016604e8410600b841016171562000b5a575081810a62000b81565b62000b66838362000a88565b806000190482111562000b7d5762000b7d62000a72565b0290505b92915050565b600062000a6b60ff84168362000ad1565b600181811c9082168062000bad57607f821691505b60208210810362000bce57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e05161010051610120516101405161360b62000d55600039600081816104310152818161253701528181612821015281816128e301526129ee01526000818161040e015281816124f6015281816127e20152818161292501526129c80152600081816107b801528181610c0701528181610cd801526120660152600081816105f201528181611c7a0152818161235d015261242a0152600081816104bb0152818161064701528181610714015281816108f301528181610b9b0152818161150f015281816116fa01528181611b21015281816121c301526124090152600081816102f90152818161049301528181610622015281816108d201528181610b7a01528181611479015281816116d801528181611aff0152818161213b0152818161233c01528181612863015281816128aa0152818161298f0152612a320152600081816103970152818161046301528181610bcf01528181610ca001528181612035015281816124ce01526127ae015261360b6000f3fe608060405234801561001057600080fd5b50600436106102745760003560e01c80637ecebe0011610151578063bda39cad116100c3578063d294f09311610087578063d294f09314610736578063d505accf1461073e578063dd62ed3e14610751578063ebeb31db1461077c578063f140a35a14610784578063fff6cae91461079757600080fd5b8063bda39cad146106eb578063bf944dbc146106f4578063c245febc146106fd578063c5700a0214610706578063d21220a71461070f57600080fd5b80639d63848a116101155780639d63848a146106145780639e8cc04b146106725780639f767c8814610685578063a1ac4d13146106a5578063a9059cbb146106c5578063bc25cf77146106d857600080fd5b80637ecebe001461057357806389afcb44146105935780638a7b8cf2146105bb57806395d89b41146105e55780639af1d35a146105ed57600080fd5b8063252c09d7116101ea5780634d5a9f8a116101ae5780634d5a9f8a146104f1578063517b3f82146105115780635881c475146105245780635a76f25e146105375780636a6278421461054057806370a082311461055357600080fd5b8063252c09d7146103cc578063313ce567146103df57806332c0defd146103f9578063392f37e914610402578063443cb4bc146104e857600080fd5b806313345fe11161023c57806313345fe11461033357806318160ddd146103535780631df8c7171461036a578063205aabf11461037257806322be3de11461039257806323b872dd146103b957600080fd5b8063022c0d9f1461027957806306fdde031461028e5780630902f1ac146102ac578063095ea7b3146102d15780630dfe1681146102f4575b600080fd5b61028c61028736600461308e565b61079f565b005b610296610eec565b6040516102a39190613152565b60405180910390f35b600854600954600a545b604080519384526020840192909252908201526060016102a3565b6102e46102df366004613185565b610f7a565b60405190151581526020016102a3565b61031b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102a3565b6103466103413660046131af565b610fe7565b6040516102a391906131e8565b61035c60025481565b6040519081526020016102a3565b6102b66111e3565b61035c61038036600461322c565b60106020526000908152604090205481565b6102e47f000000000000000000000000000000000000000000000000000000000000000081565b6102e46103c7366004613247565b611252565b6102b66103da366004613283565b61131b565b6103e7601281565b60405160ff90911681526020016102a3565b61035c600d5481565b600854600954604080517f000000000000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060208201529081019290925260608201527f0000000000000000000000000000000000000000000000000000000000000000151560808201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660a08301527f00000000000000000000000000000000000000000000000000000000000000001660c082015260e0016102a3565b61035c60085481565b61035c6104ff36600461322c565b60116020526000908152604090205481565b61035c61051f366004613185565b61134e565b61034661053236600461329c565b611436565b61035c60095481565b61035c61054e36600461322c565b611445565b61035c61056136600461322c565b60046020526000908152604090205481565b61035c61058136600461322c565b60066020526000908152604090205481565b6105a66105a136600461322c565b6116a6565b604080519283526020830191909152016102a3565b6105c36119c3565b60408051825181526020808401519082015291810151908201526060016102a3565b610296611a43565b61031b7f000000000000000000000000000000000000000000000000000000000000000081565b604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f0000000000000000000000000000000000000000000000000000000000000000166020820152016102a3565b61035c61068036600461329c565b611a50565b61035c61069336600461322c565b600f6020526000908152604090205481565b61035c6106b336600461322c565b60126020526000908152604090205481565b6102e46106d3366004613185565b611abd565b61028c6106e636600461322c565b611ad3565b61035c600e5481565b61035c600b5481565b61035c600c5481565b61035c600a5481565b61031b7f000000000000000000000000000000000000000000000000000000000000000081565b6105a6611bf1565b61028c61074c3660046132cf565b611d18565b61035c61075f366004613342565b600360209081526000928352604080842090915290825290205481565b60075461035c565b61035c610792366004613375565b612020565b61028c61210e565b6013546001146107ae57600080fd5b60026013819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b187bd266040518163ffffffff1660e01b8152600401602060405180830381865afa158015610814573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108389190613398565b1561084257600080fd5b60008511806108515750600084115b6108885760405162461bcd60e51b8152602060048201526003602482015262494f4160e81b60448201526064015b60405180910390fd5b600854600954818710801561089c57508086105b6108cd5760405162461bcd60e51b8152602060048201526002602482015261125360f21b604482015260640161087f565b6000807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03898116908316148015906109405750806001600160a01b0316896001600160a01b031614155b6109715760405162461bcd60e51b8152602060048201526002602482015261125560f21b604482015260640161087f565b8a1561098257610982828a8d612248565b891561099357610993818a8c612248565b8615610a0057604051639a7bff7960e01b81526001600160a01b038a1690639a7bff79906109cd9033908f908f908e908e906004016133ba565b600060405180830381600087803b1580156109e757600080fd5b505af11580156109fb573d6000803e3d6000fd5b505050505b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610a44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a689190613406565b6040516370a0823160e01b81523060048201529094506001600160a01b038216906370a0823190602401602060405180830381865afa158015610aaf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad39190613406565b9250505060008985610ae59190613435565b8311610af2576000610b06565b610afc8a86613435565b610b069084613435565b90506000610b148a86613435565b8311610b21576000610b35565b610b2b8a86613435565b610b359084613435565b90506000821180610b465750600081115b610b785760405162461bcd60e51b815260206004820152600360248201526249494160e81b604482015260640161087f565b7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000008315610c8b57604051632895a2f560e11b81527f000000000000000000000000000000000000000000000000000000000000000015156004820152610c8b90612710906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063512b45ea90602401602060405180830381865afa158015610c4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c729190613406565b610c7c908761344c565b610c86919061346b565b612337565b8215610d5c57604051632895a2f560e11b81527f000000000000000000000000000000000000000000000000000000000000000015156004820152610d5c90612710906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063512b45ea90602401602060405180830381865afa158015610d1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d439190613406565b610d4d908661344c565b610d57919061346b565b612404565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610da0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc49190613406565b6040516370a0823160e01b81523060048201529096506001600160a01b038216906370a0823190602401602060405180830381865afa158015610e0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2f9190613406565b9450610e3b88886124ca565b610e4587876124ca565b1015610e775760405162461bcd60e51b81526020600482015260016024820152604b60f81b604482015260640161087f565b5050610e8584848888612616565b60408051838152602081018390529081018c9052606081018b90526001600160a01b038a169033907fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229060800160405180910390a350506001601355505050505050505050565b60008054610ef99061348d565b80601f0160208091040260200160405190810160405280929190818152602001828054610f259061348d565b8015610f725780601f10610f4757610100808354040283529160200191610f72565b820191906000526020600020905b815481529060010190602001808311610f5557829003601f168201915b505050505081565b3360008181526003602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fd59086815260200190565b60405180910390a35060015b92915050565b606060008367ffffffffffffffff811115611004576110046134c1565b60405190808252806020026020018201604052801561102d578160200160208202803683370190505b5060075490915060009061104390600190613435565b90506000611051858761344c565b61105b9083613435565b90506000805b838310156111d35761107387846134d7565b915060006007848154811061108a5761108a6134ef565b906000526020600020906003020160000154600784815481106110af576110af6134ef565b9060005260206000209060030201600001546110cb9190613435565b9050600081600786815481106110e3576110e36134ef565b90600052602060002090600302016001015460078681548110611108576111086134ef565b9060005260206000209060030201600101546111249190613435565b61112e919061346b565b905060008260078781548110611146576111466134ef565b9060005260206000209060030201600201546007878154811061116b5761116b6134ef565b9060005260206000209060030201600201546111879190613435565b611191919061346b565b905061119f8c8e84846127aa565b8885815181106111b1576111b16134ef565b60209081029190910101525050506001016111cc87846134d7565b9250611061565b509293505050505b949350505050565b600b54600c544260008080611201600854600954600a549192909190565b92509250925083811461124a57600061121a8286613435565b9050611226818561344c565b61123090886134d7565b965061123c818461344c565b61124690876134d7565b9550505b505050909192565b6001600160a01b03831660008181526003602090815260408083203380855292528220549192909190821480159061128c57506000198114155b1561130257600061129d8583613435565b6001600160a01b038881166000818152600360209081526040808320948916808452948252918290208590559051848152939450919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b61130d868686612a9f565b6001925050505b9392505050565b6007818154811061132b57600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6000806113596119c3565b90506000806113666111e3565b508451919350915042036113ce576007805461138490600290613435565b81548110611394576113946134ef565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505092505b82516000906113dd9042613435565b90506000818560200151856113f29190613435565b6113fc919061346b565b90506000828660400151856114119190613435565b61141b919061346b565b9050611429888a84846127aa565b9998505050505050505050565b60606111db8484846001610fe7565b600060135460011461145657600080fd5b60026013556008546009546040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156114c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ec9190613406565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611556573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157a9190613406565b905060006115888584613435565b905060006115968584613435565b60025490915060008190036115d8576103e86115ba6115b5848661344c565b612b5f565b6115c49190613435565b97506115d360006103e8612bcf565b61160d565b61160a876115e6838661344c565b6115f0919061346b565b876115fb848661344c565b611605919061346b565b612c62565b97505b600088116116435760405162461bcd60e51b8152602060048201526003602482015262494c4d60e81b604482015260640161087f565b61164d8989612bcf565b61165985858989612616565b604080518481526020810184905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a250506001601355509395945050505050565b6000806013546001146116b857600080fd5b60026013556008546009546040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000906000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561174e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117729190613406565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156117bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e09190613406565b306000908152600460205260409020546002549192509080611802858461344c565b61180c919061346b565b995080611819848461344c565b611823919061346b565b985060008a1180156118355750600089115b6118675760405162461bcd60e51b815260206004820152600360248201526224a62160e91b604482015260640161087f565b6118713083612c78565b61187c868c8c612248565b611887858c8b612248565b6040516370a0823160e01b81523060048201526001600160a01b038716906370a0823190602401602060405180830381865afa1580156118cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ef9190613406565b6040516370a0823160e01b81523060048201529094506001600160a01b038616906370a0823190602401602060405180830381865afa158015611936573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195a9190613406565b925061196884848a8a612616565b604080518b8152602081018b90526001600160a01b038d169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a350505050505050506001601381905550915091565b6119e760405180606001604052806000815260200160008152602001600081525090565b600780546119f790600190613435565b81548110611a0757611a076134ef565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b60018054610ef99061348d565b600080611a608585856001610fe7565b90506000805b8251811015611aa857828181518110611a8157611a816134ef565b602002602001015182611a9491906134d7565b915080611aa081613505565b915050611a66565b50611ab3848261346b565b9695505050505050565b6000611aca338484612a9f565b50600192915050565b601354600114611ae257600080fd5b60026013556008546040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000917f000000000000000000000000000000000000000000000000000000000000000091611baf9184918691906001600160a01b038416906370a08231906024015b602060405180830381865afa158015611b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba09190613406565b611baa9190613435565b612248565b6009546040516370a0823160e01b8152306004820152611be79183918691906001600160a01b038416906370a0823190602401611b5f565b5050600160135550565b600080611bfd33612d03565b50503360009081526011602090815260408083205460129092529091205481151580611c295750600081115b15611d14573360008181526011602090815260408083208390556012909152808220919091555163299e7ae760e11b8152600481019190915260248101839052604481018290526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063533cf5ce90606401600060405180830381600087803b158015611cbe57600080fd5b505af1158015611cd2573d6000803e3d6000fd5b505060408051858152602081018590523393508392507f865ca08d59f5cb456e85cd2f7ef63664ea4f73327414e9d8152c4158b0e94645910160405180910390a35b9091565b42841015611d585760405162461bcd60e51b815260206004820152600d60248201526c14185a5c8e8811561412549151609a1b604482015260640161087f565b7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051611d88919061351e565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f19818403018152918152815160209283012060058190556001600160a01b038a166000908152600690935290822080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b919087611e5383613505565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001611ecc92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015611f37573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590611f6d5750886001600160a01b0316816001600160a01b0316145b611fb95760405162461bcd60e51b815260206004820152601760248201527f506169723a20494e56414c49445f5349474e4154555245000000000000000000604482015260640161087f565b6001600160a01b038981166000818152600360209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b600854600954604051632895a2f560e11b81527f0000000000000000000000000000000000000000000000000000000000000000151560048201526000929190612710907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063512b45ea90602401602060405180830381865afa1580156120b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d99190613406565b6120e3908761344c565b6120ed919061346b565b6120f79086613435565b9450612105858584846127aa565b95945050505050565b60135460011461211d57600080fd5b60026013556040516370a0823160e01b8152306004820152612241907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561218a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ae9190613406565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015612212573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122369190613406565b600854600954612616565b6001601355565b6000836001600160a01b03163b1161225f57600080fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916122bb91906135b9565b6000604051808303816000865af19150503d80600081146122f8576040519150601f19603f3d011682016040523d82523d6000602084013e6122fd565b606091505b50915091508180156123275750805115806123275750808060200190518101906123279190613398565b61233057600080fd5b5050505050565b6123827f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000083612248565b60025460009061239a83670de0b6b3a764000061344c565b6123a4919061346b565b905080156123c45780600d60008282546123be91906134d7565b90915550505b604080518381526000602082015233917f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a860291015b60405180910390a25050565b61244f7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000083612248565b60025460009061246783670de0b6b3a764000061344c565b612471919061346b565b905080156124915780600e600082825461248b91906134d7565b90915550505b60408051600081526020810184905233917f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a860291016123f8565b60007f0000000000000000000000000000000000000000000000000000000000000000156126055760007f000000000000000000000000000000000000000000000000000000000000000061252785670de0b6b3a764000061344c565b612531919061346b565b905060007f000000000000000000000000000000000000000000000000000000000000000061256885670de0b6b3a764000061344c565b612572919061346b565b90506000670de0b6b3a7640000612589838561344c565b612593919061346b565b90506000670de0b6b3a76400006125aa848061344c565b6125b4919061346b565b670de0b6b3a76400006125c7868061344c565b6125d1919061346b565b6125db91906134d7565b9050670de0b6b3a76400006125f0828461344c565b6125fa919061346b565b945050505050610fe1565b61260f828461344c565b9050610fe1565b600a5442906000906126289083613435565b905060008111801561263957508315155b801561264457508215155b1561268b57612653818561344c565b600b600082825461266491906134d7565b909155506126749050818461344c565b600c600082825461268591906134d7565b90915550505b60006126956119c3565b80519091506126a49084613435565b91506107088211156127595760408051606081018252848152600b5460208201908152600c549282019283526007805460018101825560009190915291517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600390930292830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68982015590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101555b60088790556009869055600a83905560408051888152602081018890527fcf2aa50876cdfbb541206f89af0ee78d44a2abf8d328e37fa4917f982149848a910160405180910390a150505050505050565b60007f000000000000000000000000000000000000000000000000000000000000000015612a2d5760006127de84846124ca565b90507f000000000000000000000000000000000000000000000000000000000000000061281385670de0b6b3a764000061344c565b61281d919061346b565b93507f000000000000000000000000000000000000000000000000000000000000000061285284670de0b6b3a764000061344c565b61285c919061346b565b92506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b0316146128a15784866128a4565b85855b915091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b031614612923577f000000000000000000000000000000000000000000000000000000000000000061291489670de0b6b3a764000061344c565b61291e919061346b565b612960565b7f000000000000000000000000000000000000000000000000000000000000000061295689670de0b6b3a764000061344c565b612960919061346b565b97506000612978612971848b6134d7565b8584612e63565b6129829083613435565b9050670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316896001600160a01b0316146129ec577f0000000000000000000000000000000000000000000000000000000000000000612a0e565b7f00000000000000000000000000000000000000000000000000000000000000005b612a18908361344c565b612a22919061346b565b9450505050506111db565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316866001600160a01b031614612a70578385612a73565b84845b9092509050612a8287836134d7565b612a8c828961344c565b612a96919061346b565b925050506111db565b612aa883612d03565b612ab182612d03565b6001600160a01b03831660009081526004602052604081208054839290612ad9908490613435565b90915550506001600160a01b03821660009081526004602052604081208054839290612b069084906134d7565b92505081905550816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612b5291815260200190565b60405180910390a3505050565b60006003821115612bc05750806000612b7960028361346b565b612b849060016134d7565b90505b81811015612bba57905080600281612b9f818661346b565b612ba991906134d7565b612bb3919061346b565b9050612b87565b50919050565b8115612bca575060015b919050565b612bd882612d03565b8060026000828254612bea91906134d7565b90915550506001600160a01b03821660009081526004602052604081208054839290612c179084906134d7565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b6000818310612c715781611314565b5090919050565b612c8182612d03565b8060026000828254612c939190613435565b90915550506001600160a01b03821660009081526004602052604081208054839290612cc0908490613435565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001612c56565b6001600160a01b0381166000908152600460205260409020548015612e31576001600160a01b0382166000908152600f60209081526040808320805460108085529285208054600d54600e54948190559490955282905593612d658584613435565b90506000612d738584613435565b90508115612dce576000670de0b6b3a7640000612d90848a61344c565b612d9a919061346b565b6001600160a01b038a16600090815260116020526040812080549293508392909190612dc79084906134d7565b9091555050505b8015612e27576000670de0b6b3a7640000612de9838a61344c565b612df3919061346b565b6001600160a01b038a16600090815260126020526040812080549293508392909190612e209084906134d7565b9091555050505b5050505050505050565b600d546001600160a01b0383166000908152600f6020908152604080832093909355600e546010909152919020555050565b6000805b60ff811015612f6957826000612e7d8783612f72565b905085811015612ecd576000612e93888761300f565b612e9d8389613435565b612eaf90670de0b6b3a764000061344c565b612eb9919061346b565b9050612ec581876134d7565b955050612f0f565b6000612ed9888761300f565b612ee38884613435565b612ef590670de0b6b3a764000061344c565b612eff919061346b565b9050612f0b8187613435565b9550505b81851115612f38576001612f238387613435565b11612f3357849350505050611314565b612f54565b6001612f448684613435565b11612f5457849350505050611314565b50508080612f6190613505565b915050612e67565b50909392505050565b6000670de0b6b3a764000082818581612f8b828061344c565b612f95919061346b565b612f9f919061344c565b612fa9919061346b565b612fb3919061344c565b612fbd919061346b565b670de0b6b3a7640000808481612fd3828061344c565b612fdd919061346b565b612fe7919061344c565b612ff1919061346b565b612ffb908661344c565b613005919061346b565b61131491906134d7565b6000670de0b6b3a76400008381613026828061344c565b613030919061346b565b61303a919061344c565b613044919061346b565b670de0b6b3a764000080613058858061344c565b613062919061346b565b61306d86600361344c565b612ffb919061344c565b80356001600160a01b0381168114612bca57600080fd5b6000806000806000608086880312156130a657600080fd5b85359450602086013593506130bd60408701613077565b9250606086013567ffffffffffffffff808211156130da57600080fd5b818801915088601f8301126130ee57600080fd5b8135818111156130fd57600080fd5b89602082850101111561310f57600080fd5b9699959850939650602001949392505050565b60005b8381101561313d578181015183820152602001613125565b8381111561314c576000848401525b50505050565b6020815260008251806020840152613171816040850160208701613122565b601f01601f19169190910160400192915050565b6000806040838503121561319857600080fd5b6131a183613077565b946020939093013593505050565b600080600080608085870312156131c557600080fd5b6131ce85613077565b966020860135965060408601359560600135945092505050565b6020808252825182820181905260009190848201906040850190845b8181101561322057835183529284019291840191600101613204565b50909695505050505050565b60006020828403121561323e57600080fd5b61131482613077565b60008060006060848603121561325c57600080fd5b61326584613077565b925061327360208501613077565b9150604084013590509250925092565b60006020828403121561329557600080fd5b5035919050565b6000806000606084860312156132b157600080fd5b6132ba84613077565b95602085013595506040909401359392505050565b600080600080600080600060e0888a0312156132ea57600080fd5b6132f388613077565b965061330160208901613077565b95506040880135945060608801359350608088013560ff8116811461332557600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561335557600080fd5b61335e83613077565b915061336c60208401613077565b90509250929050565b6000806040838503121561338857600080fd5b8235915061336c60208401613077565b6000602082840312156133aa57600080fd5b8151801515811461131457600080fd5b60018060a01b038616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f909201601f19160101949350505050565b60006020828403121561341857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156134475761344761341f565b500390565b60008160001904831182151516156134665761346661341f565b500290565b60008261348857634e487b7160e01b600052601260045260246000fd5b500490565b600181811c908216806134a157607f821691505b602082108103612bba57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600082198211156134ea576134ea61341f565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600182016135175761351761341f565b5060010190565b600080835481600182811c91508083168061353a57607f831692505b6020808410820361355957634e487b7160e01b86526022600452602486fd5b81801561356d576001811461357e576135ab565b60ff198616895284890196506135ab565b60008a81526020902060005b868110156135a35781548b82015290850190830161358a565b505084890196505b509498975050505050505050565b600082516135cb818460208701613122565b919091019291505056fea2646970667358221220a19e3ae5a8be50d3f0214f26cdfbbf27d23d06d04049400f5246a73b9288278264736f6c634300080d003360e060405234801561001057600080fd5b5060405161037038038061037083398101604081905261002f91610066565b336080526001600160a01b0391821660a0521660c052610099565b80516001600160a01b038116811461006157600080fd5b919050565b6000806040838503121561007957600080fd5b6100828361004a565b91506100906020840161004a565b90509250929050565b60805160a05160c0516102ab6100c5600039600060b601526000608501526000605001526102ab6000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063533cf5ce14610030575b600080fd5b61004361003e3660046101d0565b610045565b005b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461007a57600080fd5b81156100ab576100ab7f000000000000000000000000000000000000000000000000000000000000000084846100e1565b80156100dc576100dc7f000000000000000000000000000000000000000000000000000000000000000084836100e1565b505050565b6000836001600160a01b03163b116100f857600080fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916101549190610211565b6000604051808303816000865af19150503d8060008114610191576040519150601f19603f3d011682016040523d82523d6000602084013e610196565b606091505b50915091508180156101c05750805115806101c05750808060200190518101906101c0919061024c565b6101c957600080fd5b5050505050565b6000806000606084860312156101e557600080fd5b83356001600160a01b03811681146101fc57600080fd5b95602085013595506040909401359392505050565b6000825160005b818110156102325760208186018101518583015201610218565b81811115610241576000828501525b509190910192915050565b60006020828403121561025e57600080fd5b8151801515811461026e57600080fd5b939250505056fea2646970667358221220da11d5f4f07a4d6e0e32270656e2fd1d34e9d687975338c1859f5bd93fd2899264736f6c634300080d0033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.