Contract 0x4d1d896fd501788d8605f672ad72fc05fe5ab311 2

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x7dcb8db9e1737be75338dd7a3256e6e20525f3f7072f4bb38c5f1c2265267566Zap In249115952023-01-14 2:10:5918 days 20 hrs ago0x07577de3e3131c21da055041c7929ec17709c43e IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3116.5 AVAX0.008940885237 28.6375
0x6400c93dc0be57a056dfb1fb85d5c4e9f8973a6a1e823e944b4cb815b3493292Zap In249114852023-01-14 2:07:2418 days 20 hrs ago0x90b6b3c132ba7e2853adc4f0d729cfd55c5ee907 IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab31116.5 AVAX0.0079994755 26.5
0x57960e6909011357a2b9136bb565cece64d1e6691d2e82f9c3a42559f01e4e12Zap In240105142022-12-23 15:10:4140 days 7 hrs ago0x569eefa84f40a91c90ecd8d619a20c66cfbbdbaa IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3116 AVAX0.0084119215 26.5
0x0c03d448e5aa09df489c9e154073c0ccddc98f48a9541f31eaece25700dde9afZap In219414502022-11-04 11:42:2689 days 11 hrs ago0x49e76125dc6a4c57e36b2a52b2030c03add3d66f IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3111 AVAX0.007820216714 26.519007749
0x9856384cbc23592f41b314f697f59047fc4787b9c8e1f1c6327f326c9b6a4d53Zap In215400362022-10-26 0:18:0998 days 22 hrs ago0x49e76125dc6a4c57e36b2a52b2030c03add3d66f IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3114 AVAX0.008071635 26.5
0x821c1cd95512c466d0c9b6dff1976d3eb006a2c888a79a9c5e0912fb543c5e53Zap In214741312022-10-24 11:09:54100 days 11 hrs ago0x49e76125dc6a4c57e36b2a52b2030c03add3d66f IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab31113.4 AVAX0.0078261655 26.5
0xee0a9dd085e83a1e58704d05a9fe2729721ad035777d966390e6bbdf20587932Zap In205921372022-10-03 11:53:10121 days 11 hrs ago0x1cfbc70b464971682dc9287fbff7f57d8ca32ed8 IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3111.4399 AVAX0.0082677615 26.5
0x3eb970dfa703cf906f1c1ab832a415a22085fb1431d64e1ac4eb6f755da519cdZap In192779282022-08-29 15:49:00156 days 7 hrs ago0x13108ab5c6eb7efdcd7ba6f8cc55d265eae6176f IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab31139.5 AVAX0.008363746763 26.939158828
0x04bba977c1b2120a48d4ae38e5e0ae9c9f79fde3b7f867bb9e4322d3cd0126f8Zap In188507012022-08-19 15:49:42166 days 7 hrs ago0x00699728d5778a5ba3bcd127df5d668d572b8572 IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3110.3899 AVAX0.0078949065 26.5
0xe903e7790dd17d3ac2cfecce5df919a069ed51466b8a98489e49b3fcbff78a61Zap In188491472022-08-19 14:57:31166 days 8 hrs ago0x73523c8571846b8f0393723cac60e128205437b9 IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab31117 AVAX0.0079183325 26.5
0x90af5802d7aa61053e3da9f123a27daeefb47ee15e15c1e662de8f4ac538853dZap In188490102022-08-19 14:52:56166 days 8 hrs ago0x73523c8571846b8f0393723cac60e128205437b9 IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3113 AVAX0.007909667 26.5
0xbba5280f0a8f749aa9e0cc5fecc677b45d336f8a686d1043f881904d25d1352cZap In188489372022-08-19 14:50:31166 days 8 hrs ago0x73523c8571846b8f0393723cac60e128205437b9 IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3111 AVAX0.0083541515 26.5
0xb6723c4a9cea816af1045f21dbd9fa9a87aa67f3defcc644f5aba9a7a9ca7db2Zap In188482692022-08-19 14:27:47166 days 8 hrs ago0xc905fd25980ec8b50385a322776de070f612d03d IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3111 AVAX0.0089453135 26.5
0x9b0bb8ef0068776c85e6f09720af3c72efcb1f2770d8ac3b3164ed7eae96efe5Zap In185197552022-08-11 21:24:42174 days 1 hr ago0xe96072de54efd8663793df63928d9a610990303d IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3110.5188 AVAX0.007955883 26.5
0xfd60ade9e3956ced27d5d2ca5bf310397a001fb8d01a36bd801df8b9627023d4Zap In182112302022-08-04 16:34:03181 days 6 hrs ago0x84613f247aa38bffb08d2794f017c6985b44f870 IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3110.81008 AVAX0.008053559026 26.825346
0xb8ac6474e113a6e9e124cfbe48e093d0ce6833842af88e0970e64ba771c0b2eeZap In179489462022-07-29 11:09:28187 days 11 hrs ago0xba7dfd52abe67bfaff0ecae43a04331e4c87de63 IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3112 AVAX0.009526230
0x28c6cdabfca8d215bc1ee33f7b12e0c6ff9bf5ce2327d918d29bc9e9cc8eb699Zap In179350252022-07-29 3:07:48187 days 19 hrs ago0x48d6f4e110872a2e0e7ada60785ce56040391cd8 IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab31131.2 AVAX0.007773987 26.5
0xc92b39cfca33a2c1a9e5a92a63b43cc44e756b070d8017600eca0fce9ccef62bZap In177856492022-07-25 12:41:25191 days 10 hrs ago0x48d6f4e110872a2e0e7ada60785ce56040391cd8 IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab31139 AVAX0.0080676227.5
0xf398f8286fc87885d64f579a29164363e25df1734a2f3ff60fc2dc76b4ef1462Zap In177665102022-07-25 1:38:03191 days 21 hrs ago0xfddd8e89dfb65fe2da8e907939a281135ef3802d IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3110.8 AVAX0.0084119215 26.5
0x692d9fbd17b6e5dcbcdcfc741372a7a4c2dd2e79ac2ae6da0af0ff114e0108a3Zap In177433402022-07-24 12:15:48192 days 10 hrs ago0x48d6f4e110872a2e0e7ada60785ce56040391cd8 IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab31135 AVAX0.008680287 26.5
0xd05068890d4a809b9ca7d6b3df503f2fc106bb08b11cc01bc1fc273ba1dc57daZap In176387662022-07-22 0:55:51194 days 22 hrs ago0xfddd8e89dfb65fe2da8e907939a281135ef3802d IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3111 AVAX0.0084119215 26.5
0x8bc05bc655309b4543c07cc384518260c4a38c49d27073ac955d8d66fddcef90Zap In175942052022-07-21 0:03:15195 days 23 hrs ago0x6a13c07e33d1e663823b71b7330821d0f070a74f IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab311160 AVAX0.008152301 26.5
0x6c68e62e06787c4be21d1b10629facd58972355e5e5b9a2c12b12a3f866303f3Zap In175644762022-07-20 7:30:34196 days 15 hrs ago0x32ed81a2a2599df3374118520a0dedfe5157f768 IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3112 AVAX0.008276427 26.5
0x815a778178ecaa851a09f2eb33e7682d82a7592ac950394bafba11459dda8c56Zap In174859232022-07-18 11:45:20198 days 11 hrs ago0x56aa4fb42f77faa81b5ca0d2b3cab33f80899648 IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3114.23 AVAX0.00794122525
0x21b59b325af723d010bf4623761a50d9f8ee49fc26f1b5bf800822946bb6faccZap In174673672022-07-18 1:25:15198 days 21 hrs ago0xfddd8e89dfb65fe2da8e907939a281135ef3802d IN  0x4d1d896fd501788d8605f672ad72fc05fe5ab3111 AVAX0.008236577675 27.425
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x7dcb8db9e1737be75338dd7a3256e6e20525f3f7072f4bb38c5f1c2265267566249115952023-01-14 2:10:5918 days 20 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110x07577de3e3131c21da055041c7929ec17709c43e0.000087883300744089 AVAX
0x7dcb8db9e1737be75338dd7a3256e6e20525f3f7072f4bb38c5f1c2265267566249115952023-01-14 2:10:5918 days 20 hrs ago Wrapped AVAX 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110.000087883300744089 AVAX
0x7dcb8db9e1737be75338dd7a3256e6e20525f3f7072f4bb38c5f1c2265267566249115952023-01-14 2:10:5918 days 20 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab311 Wrapped AVAX6.5 AVAX
0x6400c93dc0be57a056dfb1fb85d5c4e9f8973a6a1e823e944b4cb815b3493292249114852023-01-14 2:07:2418 days 20 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110x90b6b3c132ba7e2853adc4f0d729cfd55c5ee9070.002361989712473499 AVAX
0x6400c93dc0be57a056dfb1fb85d5c4e9f8973a6a1e823e944b4cb815b3493292249114852023-01-14 2:07:2418 days 20 hrs ago Wrapped AVAX 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110.002361989712473499 AVAX
0x6400c93dc0be57a056dfb1fb85d5c4e9f8973a6a1e823e944b4cb815b3493292249114852023-01-14 2:07:2418 days 20 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab311 Wrapped AVAX16.5 AVAX
0x57960e6909011357a2b9136bb565cece64d1e6691d2e82f9c3a42559f01e4e12240105142022-12-23 15:10:4140 days 7 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110x569eefa84f40a91c90ecd8d619a20c66cfbbdbaa0.000000463883531873 AVAX
0x57960e6909011357a2b9136bb565cece64d1e6691d2e82f9c3a42559f01e4e12240105142022-12-23 15:10:4140 days 7 hrs ago Wrapped AVAX 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110.000000463883531873 AVAX
0x57960e6909011357a2b9136bb565cece64d1e6691d2e82f9c3a42559f01e4e12240105142022-12-23 15:10:4140 days 7 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab311 Wrapped AVAX6 AVAX
0x0c03d448e5aa09df489c9e154073c0ccddc98f48a9541f31eaece25700dde9af219414502022-11-04 11:42:2689 days 11 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110x49e76125dc6a4c57e36b2a52b2030c03add3d66f0.000000375714479035 AVAX
0x0c03d448e5aa09df489c9e154073c0ccddc98f48a9541f31eaece25700dde9af219414502022-11-04 11:42:2689 days 11 hrs ago Wrapped AVAX 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110.000000375714479035 AVAX
0x0c03d448e5aa09df489c9e154073c0ccddc98f48a9541f31eaece25700dde9af219414502022-11-04 11:42:2689 days 11 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab311 Wrapped AVAX1 AVAX
0x9856384cbc23592f41b314f697f59047fc4787b9c8e1f1c6327f326c9b6a4d53215400362022-10-26 0:18:0998 days 22 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab311 Wrapped AVAX4 AVAX
0x821c1cd95512c466d0c9b6dff1976d3eb006a2c888a79a9c5e0912fb543c5e53214741312022-10-24 11:09:54100 days 11 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110x49e76125dc6a4c57e36b2a52b2030c03add3d66f0.000167839485675258 AVAX
0x821c1cd95512c466d0c9b6dff1976d3eb006a2c888a79a9c5e0912fb543c5e53214741312022-10-24 11:09:54100 days 11 hrs ago Wrapped AVAX 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110.000167839485675258 AVAX
0x821c1cd95512c466d0c9b6dff1976d3eb006a2c888a79a9c5e0912fb543c5e53214741312022-10-24 11:09:54100 days 11 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab311 Wrapped AVAX13.4 AVAX
0xee0a9dd085e83a1e58704d05a9fe2729721ad035777d966390e6bbdf20587932205921372022-10-03 11:53:10121 days 11 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110x1cfbc70b464971682dc9287fbff7f57d8ca32ed80.000000429654894476 AVAX
0xee0a9dd085e83a1e58704d05a9fe2729721ad035777d966390e6bbdf20587932205921372022-10-03 11:53:10121 days 11 hrs ago Wrapped AVAX 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110.000000429654894476 AVAX
0xee0a9dd085e83a1e58704d05a9fe2729721ad035777d966390e6bbdf20587932205921372022-10-03 11:53:10121 days 11 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab311 Wrapped AVAX1.4399 AVAX
0x3eb970dfa703cf906f1c1ab832a415a22085fb1431d64e1ac4eb6f755da519cd192779282022-08-29 15:49:00156 days 7 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab311 Wrapped AVAX39.5 AVAX
0x04bba977c1b2120a48d4ae38e5e0ae9c9f79fde3b7f867bb9e4322d3cd0126f8188507012022-08-19 15:49:42166 days 7 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110x00699728d5778a5ba3bcd127df5d668d572b85720.000011006087325298 AVAX
0x04bba977c1b2120a48d4ae38e5e0ae9c9f79fde3b7f867bb9e4322d3cd0126f8188507012022-08-19 15:49:42166 days 7 hrs ago Wrapped AVAX 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110.000011006087325298 AVAX
0x04bba977c1b2120a48d4ae38e5e0ae9c9f79fde3b7f867bb9e4322d3cd0126f8188507012022-08-19 15:49:42166 days 7 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab311 Wrapped AVAX0.3899 AVAX
0xe903e7790dd17d3ac2cfecce5df919a069ed51466b8a98489e49b3fcbff78a61188491472022-08-19 14:57:31166 days 8 hrs ago 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110x73523c8571846b8f0393723cac60e128205437b90.510812852773593211 AVAX
0xe903e7790dd17d3ac2cfecce5df919a069ed51466b8a98489e49b3fcbff78a61188491472022-08-19 14:57:31166 days 8 hrs ago Wrapped AVAX 0x4d1d896fd501788d8605f672ad72fc05fe5ab3110.510812852773593211 AVAX
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Zap

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at snowtrace.io on 2022-02-25
*/

// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/utils/Context.sol


pragma solidity >=0.6.0 <0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: @openzeppelin/contracts/access/Ownable.sol


pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: @openzeppelin/contracts/math/SafeMath.sol


pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: @openzeppelin/contracts/utils/Address.sol


pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol


pragma solidity >=0.6.0 <0.8.0;




/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// File: contracts/interfaces/IUniswapV2Pair.sol

pragma solidity ^0.6.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint256 value);
    event Transfer(address indexed from, address indexed to, uint256 value);

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    event Mint(address indexed sender, uint256 amount0, uint256 amount1);
    event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);
    event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to);
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to) external returns (uint256 amount0, uint256 amount1);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}

// File: contracts/interfaces/IUniswapV2Router.sol


pragma solidity 0.6.12;

interface IUniswapV2Router {
    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);

    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);

    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);

    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);

    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);

    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);

    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
    external
    payable
    returns (uint[] memory amounts);

    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
    external
    returns (uint[] memory amounts);

    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
    external
    returns (uint[] memory amounts);

    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable
    returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);

    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);

    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);

    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);

    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);

    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

// File: contracts/interfaces/IWETH.sol


pragma solidity 0.6.12;

interface IWETH {
  function deposit() external payable;
  function withdraw(uint256 wad) external;
}

// File: contracts/lib/Babylonian.sol

pragma solidity ^0.6.0;

library Babylonian {
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
        // else z = 0
    }
}

// File: contracts/Zap.sol


pragma solidity 0.6.12;








contract Zap is Ownable {
  using SafeMath for uint;
  using SafeERC20 for IERC20;

  address public native;
  uint256 public constant minimumAmount = 1000;
  mapping(address => mapping(address => address)) private tokenBridgeForRouter;
  mapping(address => bool) public useNativeRouter;

  constructor(address _native) public {
    native = _native;
  }

  receive() external payable {}

  function zapInToken(address token, uint amount, IUniswapV2Pair pair, IUniswapV2Router router, address recipient) external {
    require(amount >= minimumAmount, 'Insignificant input amount');
    IERC20(token).safeTransferFrom(msg.sender, address(this), amount);
    _swapAndStake(router, pair, token, 0);
  }

  function zapIn(IUniswapV2Pair pair, IUniswapV2Router router, address recipient) external payable {
    require(msg.value >= minimumAmount, 'Insignificant input amount');
    IWETH(native).deposit{value: msg.value}();
    _swapAndStake(router, pair, native, 0);
  }

  function _swapAndStake(IUniswapV2Router router, IUniswapV2Pair pair, address tokenIn, uint256 tokenAmountOutMin) private {
    (uint256 reserveA, uint256 reserveB,) = pair.getReserves();
    require(reserveA > minimumAmount && reserveB > minimumAmount, 'Liquidity pair reserves too low');

    bool isInputA = pair.token0() == tokenIn;
    require(isInputA || pair.token1() == tokenIn, 'Input token not present in liquidity pair');

    address[] memory path = new address[](2);
    path[0] = tokenIn;
    path[1] = isInputA ? pair.token1() : pair.token0();

    uint256 fullInvestment = IERC20(tokenIn).balanceOf(address(this));
    uint256 swapAmountIn;
    if (isInputA) {
      swapAmountIn = _getSwapAmount(router, fullInvestment, reserveA, reserveB);
    } else {
      swapAmountIn = _getSwapAmount(router, fullInvestment, reserveB, reserveA);
    }

    _approveTokenIfNeeded(path[0], address(router));
    uint256[] memory swapedAmounts = router.swapExactTokensForTokens(swapAmountIn, tokenAmountOutMin, path, address(this), block.timestamp);

    _approveTokenIfNeeded(path[1], address(router));
    (,, uint256 amountLiquidity) = router.addLiquidity(path[0], path[1], fullInvestment.sub(swapedAmounts[0]), swapedAmounts[1], 1, 1, address(this), block.timestamp);

    IERC20(address(pair)).safeTransfer(msg.sender, amountLiquidity);
    _returnAssets(path);
  }

  function _returnAssets(address[] memory tokens) private {
    uint256 balance;
    for (uint256 i; i < tokens.length; i++) {
      balance = IERC20(tokens[i]).balanceOf(address(this));
      if (balance > 0) {
        if (tokens[i] == native) {
          IWETH(native).withdraw(balance);
          (bool success,) = msg.sender.call{value: balance}(new bytes(0));
          require(success, 'ETH transfer failed');
        } else {
          IERC20(tokens[i]).safeTransfer(msg.sender, balance);
        }
      }
    }
  }

  function _getSwapAmount(IUniswapV2Router router, uint256 investmentA, uint256 reserveA, uint256 reserveB) private pure returns (uint256 swapAmount) {
    uint256 halfInvestment = investmentA / 2;
    uint256 nominator = router.getAmountOut(halfInvestment, reserveA, reserveB);
    uint256 denominator = router.quote(halfInvestment, reserveA.add(halfInvestment), reserveB.sub(nominator));
    swapAmount = investmentA.sub(Babylonian.sqrt(halfInvestment * halfInvestment * nominator / denominator));
  }

  function estimateZapInToken(address token, IUniswapV2Pair pair, IUniswapV2Router router, uint amt) public view returns (uint256, uint256) {
    return estimateSwap(router, pair, token, amt);
  }

  function estimateZapIn(IUniswapV2Pair pair, IUniswapV2Router router, uint amt) public view returns (uint256, uint256) {
    return estimateSwap(router, pair, native, amt);
  }

  function estimateSwap(IUniswapV2Router router, IUniswapV2Pair pair, address tokenIn, uint256 fullInvestmentIn) public view returns (uint256 sellAmount, uint256 otherAmount) {
    bool isInputA = pair.token0() == tokenIn;
    require(isInputA || pair.token1() == tokenIn, 'Input token not present in liquidity pair');

    (uint256 reserveA, uint256 reserveB,) = pair.getReserves();
    (reserveA, reserveB) = isInputA ? (reserveA, reserveB) : (reserveB, reserveA);

    if (isInputA) {
      sellAmount = _getSwapAmount(router, fullInvestmentIn, reserveA, reserveB);
      otherAmount = router.getAmountOut(sellAmount, reserveA, reserveB);
    } else {
      otherAmount = _getSwapAmount(router, fullInvestmentIn, reserveA, reserveB);
      sellAmount = router.getAmountOut(otherAmount, reserveA, reserveB);
    }
  }

  function _approveTokenIfNeeded(address token, address spender) private {
    if (IERC20(token).allowance(address(this), spender) == 0) {
      IERC20(token).safeApprove(spender, type(uint256).max);
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_native","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"contract IUniswapV2Router","name":"router","type":"address"},{"internalType":"contract IUniswapV2Pair","name":"pair","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"fullInvestmentIn","type":"uint256"}],"name":"estimateSwap","outputs":[{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"otherAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IUniswapV2Pair","name":"pair","type":"address"},{"internalType":"contract IUniswapV2Router","name":"router","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"estimateZapIn","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"contract IUniswapV2Pair","name":"pair","type":"address"},{"internalType":"contract IUniswapV2Router","name":"router","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"estimateZapInToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"native","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"useNativeRouter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IUniswapV2Pair","name":"pair","type":"address"},{"internalType":"contract IUniswapV2Router","name":"router","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"zapIn","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"contract IUniswapV2Pair","name":"pair","type":"address"},{"internalType":"contract IUniswapV2Router","name":"router","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"zapInToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50604051611caf380380611caf8339818101604052602081101561003357600080fd5b5051600061003f6100ae565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100b2565b3390565b611bee806100c16000396000f3fe6080604052600436106100a05760003560e01c80639416cbc6116100645780639416cbc6146101a3578063bb0c8298146101ea578063cee6202c14610211578063d9059f1b14610264578063f2fde38b146102a7578063f776f4df146102da576100a7565b806311b0b42d146100ac57806335e8b7d5146100dd578063715018a6146101175780638da5cb5b1461012c5780638e8d815214610141576100a7565b366100a757005b600080fd5b3480156100b857600080fd5b506100c1610323565b604080516001600160a01b039092168252519081900360200190f35b610115600480360360608110156100f357600080fd5b506001600160a01b038135811691602081013582169160409091013516610332565b005b34801561012357600080fd5b50610115610412565b34801561013857600080fd5b506100c16104d0565b34801561014d57600080fd5b5061018a6004803603608081101561016457600080fd5b506001600160a01b038135811691602081013582169160408201351690606001356104df565b6040805192835260208301919091528051918290030190f35b3480156101af57600080fd5b506101d6600480360360208110156101c657600080fd5b50356001600160a01b03166104fb565b604080519115158252519081900360200190f35b3480156101f657600080fd5b506101ff610510565b60408051918252519081900360200190f35b34801561021d57600080fd5b50610115600480360360a081101561023457600080fd5b506001600160a01b0381358116916020810135916040820135811691606081013582169160809091013516610516565b34801561027057600080fd5b5061018a6004803603606081101561028757600080fd5b506001600160a01b03813581169160208101359091169060400135610596565b3480156102b357600080fd5b50610115600480360360208110156102ca57600080fd5b50356001600160a01b03166105c1565b3480156102e657600080fd5b5061018a600480360360808110156102fd57600080fd5b506001600160a01b038135811691602081013582169160408201351690606001356106d5565b6001546001600160a01b031681565b6103e8341015610389576040805162461bcd60e51b815260206004820152601a60248201527f496e7369676e69666963616e7420696e70757420616d6f756e74000000000000604482015290519081900360640190fd5b600160009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156103d957600080fd5b505af11580156103ed573d6000803e3d6000fd5b505060015461040d93508592508691506001600160a01b031660006109dc565b505050565b61041a6110e6565b6001600160a01b031661042b6104d0565b6001600160a01b031614610486576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6000806104ee848688866106d5565b9150915094509492505050565b60036020526000908152604090205460ff1681565b6103e881565b6103e884101561056d576040805162461bcd60e51b815260206004820152601a60248201527f496e7369676e69666963616e7420696e70757420616d6f756e74000000000000604482015290519081900360640190fd5b6105826001600160a01b0386163330876110ea565b61058f82848760006109dc565b5050505050565b60015460009081906105b590859087906001600160a01b0316866106d5565b91509150935093915050565b6105c96110e6565b6001600160a01b03166105da6104d0565b6001600160a01b031614610635576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661067a5760405162461bcd60e51b8152600401808060200182810382526026815260200180611ae46026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000846001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561071d57600080fd5b505afa158015610731573d6000803e3d6000fd5b505050506040513d602081101561074757600080fd5b50516001600160a01b031614905080806107d65750846001600160a01b0316866001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561079f57600080fd5b505afa1580156107b3573d6000803e3d6000fd5b505050506040513d60208110156107c957600080fd5b50516001600160a01b0316145b6108115760405162461bcd60e51b8152600401808060200182810382526029815260200180611b906029913960400191505060405180910390fd5b600080876001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561084d57600080fd5b505afa158015610861573d6000803e3d6000fd5b505050506040513d606081101561087757600080fd5b5080516020909101516001600160701b0391821693501690508261089c57808261089f565b81815b9092509050821561093f576108b68987848461114a565b9450886001600160a01b031663054d50d48684846040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561090c57600080fd5b505afa158015610920573d6000803e3d6000fd5b505050506040513d602081101561093657600080fd5b505193506109d0565b61094b8987848461114a565b9350886001600160a01b031663054d50d48584846040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b1580156109a157600080fd5b505afa1580156109b5573d6000803e3d6000fd5b505050506040513d60208110156109cb57600080fd5b505194505b50505094509492505050565b600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610a1857600080fd5b505afa158015610a2c573d6000803e3d6000fd5b505050506040513d6060811015610a4257600080fd5b5080516020909101516001600160701b0391821693501690506103e882118015610a6d57506103e881115b610abe576040805162461bcd60e51b815260206004820152601f60248201527f4c6971756964697479207061697220726573657276657320746f6f206c6f7700604482015290519081900360640190fd5b6000846001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610b0357600080fd5b505afa158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b50516001600160a01b03161490508080610bbc5750846001600160a01b0316866001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8557600080fd5b505afa158015610b99573d6000803e3d6000fd5b505050506040513d6020811015610baf57600080fd5b50516001600160a01b0316145b610bf75760405162461bcd60e51b8152600401808060200182810382526029815260200180611b906029913960400191505060405180910390fd5b60408051600280825260608083018452926020830190803683370190505090508581600081518110610c2557fe5b60200260200101906001600160a01b031690816001600160a01b03168152505081610cb457866001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8357600080fd5b505afa158015610c97573d6000803e3d6000fd5b505050506040513d6020811015610cad57600080fd5b5051610d1a565b866001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610ced57600080fd5b505afa158015610d01573d6000803e3d6000fd5b505050506040513d6020811015610d1757600080fd5b50515b81600181518110610d2757fe5b6001600160a01b03928316602091820292909201810191909152604080516370a0823160e01b815230600482015290516000938a16926370a082319260248082019391829003018186803b158015610d7e57600080fd5b505afa158015610d92573d6000803e3d6000fd5b505050506040513d6020811015610da857600080fd5b5051905060008315610dc757610dc08a83888861114a565b9050610dd6565b610dd38a83878961114a565b90505b610df483600081518110610de657fe5b60200260200101518b611299565b60608a6001600160a01b03166338ed1739838a8730426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015610e7a578181015183820152602001610e62565b505050509050019650505050505050600060405180830381600087803b158015610ea357600080fd5b505af1158015610eb7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610ee057600080fd5b8101908080516040519392919084640100000000821115610f0057600080fd5b908301906020820185811115610f1557600080fd5b8251866020820283011164010000000082111715610f3257600080fd5b82525081516020918201928201910280838360005b83811015610f5f578181015183820152602001610f47565b505050509050016040525050509050610f8c84600181518110610f7e57fe5b60200260200101518c611299565b60008b6001600160a01b031663e8e3370086600081518110610faa57fe5b602002602001015187600181518110610fbf57fe5b6020026020010151610fee86600081518110610fd757fe5b60200260200101518961133390919063ffffffff16565b86600181518110610ffb57fe5b602002602001015160018030426040518963ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200198505050505050505050606060405180830381600087803b15801561108a57600080fd5b505af115801561109e573d6000803e3d6000fd5b505050506040513d60608110156110b457600080fd5b506040015190506110cf6001600160a01b038c163383611390565b6110d8856113e2565b505050505050505050505050565b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261114490859061164f565b50505050565b6000806002850490506000866001600160a01b031663054d50d48387876040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b1580156111a957600080fd5b505afa1580156111bd573d6000803e3d6000fd5b505050506040513d60208110156111d357600080fd5b5051905060006001600160a01b03881663ad615dec846111f38982611700565b6111fd8987611333565b6040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561123f57600080fd5b505afa158015611253573d6000803e3d6000fd5b505050506040513d602081101561126957600080fd5b5051905061128d6112868285800285028161128057fe5b04611761565b8890611333565b98975050505050505050565b60408051636eb1769f60e11b81523060048201526001600160a01b03838116602483015291519184169163dd62ed3e91604480820192602092909190829003018186803b1580156112e957600080fd5b505afa1580156112fd573d6000803e3d6000fd5b505050506040513d602081101561131357600080fd5b505161132f5761132f6001600160a01b038316826000196117b3565b5050565b60008282111561138a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261040d90849061164f565b6000805b825181101561040d578281815181106113fb57fe5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561144f57600080fd5b505afa158015611463573d6000803e3d6000fd5b505050506040513d602081101561147957600080fd5b5051915081156116475760015483516001600160a01b03909116908490839081106114a057fe5b60200260200101516001600160a01b031614156116165760015460408051632e1a7d4d60e01b81526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b15801561150457600080fd5b505af1158015611518573d6000803e3d6000fd5b505060408051600080825260208201928390528151909450339350869290819081908082805b6020831061155d5780518252601f19909201916020918201910161153e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146115bf576040519150601f19603f3d011682016040523d82523d6000602084013e6115c4565b606091505b5050905080611610576040805162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b604482015290519081900360640190fd5b50611647565b611647338385848151811061162757fe5b60200260200101516001600160a01b03166113909092919063ffffffff16565b6001016113e6565b60606116a4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118c69092919063ffffffff16565b80519091501561040d578080602001905160208110156116c357600080fd5b505161040d5760405162461bcd60e51b815260040180806020018281038252602a815260200180611b30602a913960400191505060405180910390fd5b60008282018381101561175a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600060038211156117a4575080600160028204015b8181101561179e5780915060028182858161178d57fe5b04018161179657fe5b049050611776565b506117ae565b81156117ae575060015b919050565b801580611839575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561180b57600080fd5b505afa15801561181f573d6000803e3d6000fd5b505050506040513d602081101561183557600080fd5b5051155b6118745760405162461bcd60e51b8152600401808060200182810382526036815260200180611b5a6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261040d90849061164f565b60606118d584846000856118dd565b949350505050565b60608247101561191e5760405162461bcd60e51b8152600401808060200182810382526026815260200180611b0a6026913960400191505060405180910390fd5b61192785611a39565b611978576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106119b75780518252601f199092019160209182019101611998565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611a19576040519150601f19603f3d011682016040523d82523d6000602084013e611a1e565b606091505b5091509150611a2e828286611a3f565b979650505050505050565b3b151590565b60608315611a4e57508161175a565b825115611a5e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611aa8578181015183820152602001611a90565b50505050905090810190601f168015611ad55780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365496e70757420746f6b656e206e6f742070726573656e7420696e206c69717569646974792070616972a2646970667358221220ed9915a9455c8df47e4250f59f417ab905005eb4c3c0eb9a4ba5c2173e9847a264736f6c634300060c0033000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7

-----Decoded View---------------
Arg [0] : _native (address): 0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7


Deployed ByteCode Sourcemap

33752:4893:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33842:21;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;33842:21:0;;;;;;;;;;;;;;34477:268;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;34477:268:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;2781:148;;;;;;;;;;;;;:::i;2130:87::-;;;;;;;;;;;;;:::i;37209:196::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;37209:196:0;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;33998:47;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33998:47:0;-1:-1:-1;;;;;33998:47:0;;:::i;:::-;;;;;;;;;;;;;;;;;;33868:44;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;34158:313;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;34158:313:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;37411:177::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;37411:177:0;;;;;;;;;;;;;;;;;:::i;3084:244::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3084:244:0;-1:-1:-1;;;;;3084:244:0;;:::i;37594:831::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;37594:831:0;;;;;;;;;;;;;;;;;;;;;;:::i;33842:21::-;;;-1:-1:-1;;;;;33842:21:0;;:::o;34477:268::-;33908:4;34589:9;:26;;34581:65;;;;;-1:-1:-1;;;34581:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;34659:6;;;;;;;;;-1:-1:-1;;;;;34659:6:0;-1:-1:-1;;;;;34653:21:0;;34682:9;34653:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;34729:6:0;;34701:38;;-1:-1:-1;34715:6:0;;-1:-1:-1;34723:4:0;;-1:-1:-1;;;;;;34729:6:0;;34701:13;:38::i;:::-;34477:268;;;:::o;2781:148::-;2361:12;:10;:12::i;:::-;-1:-1:-1;;;;;2350:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2350:23:0;;2342:68;;;;;-1:-1:-1;;;2342:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2888:1:::1;2872:6:::0;;2851:40:::1;::::0;-1:-1:-1;;;;;2872:6:0;;::::1;::::0;2851:40:::1;::::0;2888:1;;2851:40:::1;2919:1;2902:19:::0;;-1:-1:-1;;;;;;2902:19:0::1;::::0;;2781:148::o;2130:87::-;2176:7;2203:6;-1:-1:-1;;;;;2203:6:0;2130:87;:::o;37209:196::-;37329:7;37338;37361:38;37374:6;37382:4;37388:5;37395:3;37361:12;:38::i;:::-;37354:45;;;;37209:196;;;;;;;:::o;33998:47::-;;;;;;;;;;;;;;;:::o;33868:44::-;33908:4;33868:44;:::o;34158:313::-;33908:4;34295:6;:23;;34287:62;;;;;-1:-1:-1;;;34287:62:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;34356:65;-1:-1:-1;;;;;34356:30:0;;34387:10;34407:4;34414:6;34356:30;:65::i;:::-;34428:37;34442:6;34450:4;34456:5;34463:1;34428:13;:37::i;:::-;34158:313;;;;;:::o;37411:177::-;37570:6;;37511:7;;;;37543:39;;37556:6;;37564:4;;-1:-1:-1;;;;;37570:6:0;37578:3;37543:12;:39::i;:::-;37536:46;;;;37411:177;;;;;;:::o;3084:244::-;2361:12;:10;:12::i;:::-;-1:-1:-1;;;;;2350:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2350:23:0;;2342:68;;;;;-1:-1:-1;;;2342:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3173:22:0;::::1;3165:73;;;;-1:-1:-1::0;;;3165:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3275:6;::::0;;3254:38:::1;::::0;-1:-1:-1;;;;;3254:38:0;;::::1;::::0;3275:6;::::1;::::0;3254:38:::1;::::0;::::1;3303:6;:17:::0;;-1:-1:-1;;;;;;3303:17:0::1;-1:-1:-1::0;;;;;3303:17:0;;;::::1;::::0;;;::::1;::::0;;3084:244::o;37594:831::-;37726:18;37746:19;37774:13;37807:7;-1:-1:-1;;;;;37790:24:0;:4;-1:-1:-1;;;;;37790:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37790:13:0;-1:-1:-1;;;;;37790:24:0;;;-1:-1:-1;37790:24:0;;37829:36;;;37858:7;-1:-1:-1;;;;;37841:24:0;:4;-1:-1:-1;;;;;37841:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37841:13:0;-1:-1:-1;;;;;37841:24:0;;37829:36;37821:90;;;;-1:-1:-1;;;37821:90:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;37921:16;37939;37960:4;-1:-1:-1;;;;;37960:16:0;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37960:18:0;;;;;;;-1:-1:-1;;;;;37920:58:0;;;;-1:-1:-1;37920:58:0;;-1:-1:-1;38008:8:0;:54;;38043:8;38053;38008:54;;;38020:8;38030;38008:54;37985:77;;-1:-1:-1;37985:77:0;-1:-1:-1;38071:349:0;;;;38107:60;38122:6;38130:16;38148:8;38158;38107:14;:60::i;:::-;38094:73;;38190:6;-1:-1:-1;;;;;38190:19:0;;38210:10;38222:8;38232;38190:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38190:51:0;;-1:-1:-1;38071:349:0;;;38278:60;38293:6;38301:16;38319:8;38329;38278:14;:60::i;:::-;38264:74;;38360:6;-1:-1:-1;;;;;38360:19:0;;38380:11;38393:8;38403;38360:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38360:52:0;;-1:-1:-1;38071:349:0;37594:831;;;;;;;;;;:::o;34751:1399::-;34880:16;34898;34919:4;-1:-1:-1;;;;;34919:16:0;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34919:18:0;;;;;;;-1:-1:-1;;;;;34879:58:0;;;;-1:-1:-1;34879:58:0;;-1:-1:-1;33908:4:0;34952:24;;:52;;;;;33908:4;34980:8;:24;34952:52;34944:96;;;;;-1:-1:-1;;;34944:96:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;35049:13;35082:7;-1:-1:-1;;;;;35065:24:0;:4;-1:-1:-1;;;;;35065:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35065:13:0;-1:-1:-1;;;;;35065:24:0;;;-1:-1:-1;35065:24:0;;35104:36;;;35133:7;-1:-1:-1;;;;;35116:24:0;:4;-1:-1:-1;;;;;35116:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35116:13:0;-1:-1:-1;;;;;35116:24:0;;35104:36;35096:90;;;;-1:-1:-1;;;35096:90:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35219:16;;;35233:1;35219:16;;;35195:21;35219:16;;;;;35195:21;35219:16;;;;;;;;;;-1:-1:-1;35219:16:0;35195:40;;35252:7;35242:4;35247:1;35242:7;;;;;;;;;;;;;:17;-1:-1:-1;;;;;35242:17:0;;;-1:-1:-1;;;;;35242:17:0;;;;;35276:8;:40;;35303:4;-1:-1:-1;;;;;35303:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35303:13:0;35276:40;;;35287:4;-1:-1:-1;;;;;35287:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35287:13:0;35276:40;35266:4;35271:1;35266:7;;;;;;;;-1:-1:-1;;;;;35266:50:0;;;:7;;;;;;;;;;:50;;;;35350:40;;;-1:-1:-1;;;35350:40:0;;35384:4;35350:40;;;;;;35325:22;;35350:25;;;;;:40;;;;;;;;;;;:25;:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35350:40:0;;-1:-1:-1;35397:20:0;35424:200;;;;35462:58;35477:6;35485:14;35501:8;35511;35462:14;:58::i;:::-;35447:73;;35424:200;;;35558:58;35573:6;35581:14;35597:8;35607;35558:14;:58::i;:::-;35543:73;;35424:200;35632:47;35654:4;35659:1;35654:7;;;;;;;;;;;;;;35671:6;35632:21;:47::i;:::-;35686:30;35719:6;-1:-1:-1;;;;;35719:31:0;;35751:12;35765:17;35784:4;35798;35805:15;35719:102;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;35719:102:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;35719:102:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35719:102:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35686:135;;35830:47;35852:4;35857:1;35852:7;;;;;;;;;;;;;;35869:6;35830:21;:47::i;:::-;35888:23;35915:6;-1:-1:-1;;;;;35915:19:0;;35935:4;35940:1;35935:7;;;;;;;;;;;;;;35944:4;35949:1;35944:7;;;;;;;;;;;;;;35953:36;35972:13;35986:1;35972:16;;;;;;;;;;;;;;35953:14;:18;;:36;;;;:::i;:::-;35991:13;36005:1;35991:16;;;;;;;;;;;;;;36009:1;36012;36023:4;36030:15;35915:131;;;;;;;;;;;;;-1:-1:-1;;;;;35915:131:0;;;;;;-1:-1:-1;;;;;35915:131:0;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;35915:131:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35915:131:0;;;;-1:-1:-1;36055:63:0;-1:-1:-1;;;;;36055:34:0;;36090:10;35915:131;36055:34;:63::i;:::-;36125:19;36139:4;36125:13;:19::i;:::-;34751:1399;;;;;;;;;;;;:::o;667:106::-;755:10;667:106;:::o;22486:205::-;22614:68;;;-1:-1:-1;;;;;22614:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22614:68:0;-1:-1:-1;;;22614:68:0;;;22587:96;;22607:5;;22587:19;:96::i;:::-;22486:205;;;;:::o;36697:506::-;36825:18;;36891:1;36877:11;:15;36852:40;;36899:17;36919:6;-1:-1:-1;;;;;36919:19:0;;36939:14;36955:8;36965;36919:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36919:55:0;;-1:-1:-1;36981:19:0;-1:-1:-1;;;;;37003:12:0;;;37016:14;37032:28;:8;37016:14;37032:12;:28::i;:::-;37062:23;:8;37075:9;37062:12;:23::i;:::-;37003:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37003:83:0;;-1:-1:-1;37106:91:0;37122:74;37003:83;37138:31;;;:43;;37003:83;37138:57;;;;;37122:15;:74::i;:::-;37106:11;;:15;:91::i;:::-;37093:104;36697:506;-1:-1:-1;;;;;;;;36697:506:0:o;38431:211::-;38513:47;;;-1:-1:-1;;;38513:47:0;;38545:4;38513:47;;;;-1:-1:-1;;;;;38513:47:0;;;;;;;;;:23;;;;;;:47;;;;;;;;;;;;;;;:23;:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38513:47:0;38509:128;;38576:53;-1:-1:-1;;;;;38576:25:0;;38602:7;-1:-1:-1;;38576:25:0;:53::i;:::-;38431:211;;:::o;6592:158::-;6650:7;6683:1;6678;:6;;6670:49;;;;;-1:-1:-1;;;6670:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6737:5:0;;;6592:158::o;22301:177::-;22411:58;;;-1:-1:-1;;;;;22411:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22411:58:0;-1:-1:-1;;;22411:58:0;;;22384:86;;22404:5;;22384:19;:86::i;36156:535::-;36219:15;36246:9;36241:445;36261:6;:13;36257:1;:17;36241:445;;;36307:6;36314:1;36307:9;;;;;;;;;;;;;;-1:-1:-1;;;;;36300:27:0;;36336:4;36300:42;;;;;;;;;;;;;-1:-1:-1;;;;;36300:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36300:42:0;;-1:-1:-1;36355:11:0;;36351:328;;36396:6;;36383:9;;-1:-1:-1;;;;;36396:6:0;;;;36383;;36390:1;;36383:9;;;;;;;;;;;;-1:-1:-1;;;;;36383:19:0;;36379:291;;;36423:6;;36417:31;;;-1:-1:-1;;;36417:31:0;;;;;;;;;;-1:-1:-1;;;;;36423:6:0;;;;36417:22;;:31;;;;;36423:6;;36417:31;;;;;;;;36423:6;;36417:31;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;36511:12:0;;;36462;36511;;;;;;;;;;36479:45;;36462:12;;-1:-1:-1;36479:10:0;;-1:-1:-1;36502:7:0;;36511:12;;;;;36479:45;36511:12;;36479:45;;;;;;;;;;-1:-1:-1;;36479:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;36461:63;;;36545:7;36537:39;;;;;-1:-1:-1;;;36537:39:0;;;;;;;;;;;;-1:-1:-1;;;36537:39:0;;;;;;;;;;;;;;;36379:291;;;;36607:51;36638:10;36650:7;36614:6;36621:1;36614:9;;;;;;;;;;;;;;-1:-1:-1;;;;;36607:30:0;;;:51;;;;;:::i;:::-;36276:3;;36241:445;;24606:761;25030:23;25056:69;25084:4;25056:69;;;;;;;;;;;;;;;;;25064:5;-1:-1:-1;;;;;25056:27:0;;;:69;;;;;:::i;:::-;25140:17;;25030:95;;-1:-1:-1;25140:21:0;25136:224;;25282:10;25271:30;;;;;;;;;;;;;;;-1:-1:-1;25271:30:0;25263:85;;;;-1:-1:-1;;;25263:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6130:179;6188:7;6220:5;;;6244:6;;;;6236:46;;;;;-1:-1:-1;;;6236:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;6300:1;6130:179;-1:-1:-1;;;6130:179:0:o;33337:335::-;33385:9;33415:1;33411;:5;33407:235;;;-1:-1:-1;33437:1:0;33473;33469;33465:5;;:9;33489:92;33500:1;33496;:5;33489:92;;;33526:1;33522:5;;33564:1;33559;33555;33551;:5;;;;;;:9;33550:15;;;;;;33546:19;;33489:92;;;33407:235;;;;33602:6;;33598:44;;-1:-1:-1;33629:1:0;33598:44;33337:335;;;:::o;22960:622::-;23330:10;;;23329:62;;-1:-1:-1;23346:39:0;;;-1:-1:-1;;;23346:39:0;;23370:4;23346:39;;;;-1:-1:-1;;;;;23346:39:0;;;;;;;;;:15;;;;;;:39;;;;;;;;;;;;;;;:15;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;23346:39:0;:44;23329:62;23321:152;;;;-1:-1:-1;;;23321:152:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23511:62;;;-1:-1:-1;;;;;23511:62:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;23511:62:0;-1:-1:-1;;;23511:62:0;;;23484:90;;23504:5;;23484:19;:90::i;17296:195::-;17399:12;17431:52;17453:6;17461:4;17467:1;17470:12;17431:21;:52::i;:::-;17424:59;17296:195;-1:-1:-1;;;;17296:195:0:o;18348:530::-;18475:12;18533:5;18508:21;:30;;18500:81;;;;-1:-1:-1;;;18500:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18600:18;18611:6;18600:10;:18::i;:::-;18592:60;;;;;-1:-1:-1;;;18592:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;18726:12;18740:23;18767:6;-1:-1:-1;;;;;18767:11:0;18787:5;18795:4;18767:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;18767:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18725:75;;;;18818:52;18836:7;18845:10;18857:12;18818:17;:52::i;:::-;18811:59;18348:530;-1:-1:-1;;;;;;;18348:530:0:o;14378:422::-;14745:20;14784:8;;;14378:422::o;20888:742::-;21003:12;21032:7;21028:595;;;-1:-1:-1;21063:10:0;21056:17;;21028:595;21177:17;;:21;21173:439;;21440:10;21434:17;21501:15;21488:10;21484:2;21480:19;21473:44;21388:148;21583:12;21576:20;;-1:-1:-1;;;21576:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Swarm Source

ipfs://ed9915a9455c8df47e4250f59f417ab905005eb4c3c0eb9a4ba5c2173e9847a2
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
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.