Contract 0x26e2C37970f95c6A4b299fE5b0AE5B3D3F56a235

Contract Overview

Balance:
0 Ether
Txn Hash Method
Block
From
To
Value
0xc088e52d9b60108b3d6f57e985abebb1872ab56acad220ad769bc19286f2096b0x60a06040230558962021-01-18 4:10:20120 days 16 hrs ago0x69bdb276a17dd90f9d3a545944ccb20e593ae8e3 IN  Contract Creation0 Ether0.0005019151.5
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xeb070b334bc02a2d92e15865d9f96b505a97c8c93bb1ca482e2c38622bb5eb07248756502021-05-16 19:11:002 days 1 hr ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xeb070b334bc02a2d92e15865d9f96b505a97c8c93bb1ca482e2c38622bb5eb07248756502021-05-16 19:11:002 days 1 hr ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0x09e0dcad20fd5722cf10a4b6e7b2a730ad16a69c0d78f33b02a051ae6d1bff61245952812021-05-01 23:23:2416 days 21 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0x09e0dcad20fd5722cf10a4b6e7b2a730ad16a69c0d78f33b02a051ae6d1bff61245952812021-05-01 23:23:2416 days 21 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xa2fadf05900a3140ae04f85c8ee8e4203f7475056f9f2257461f5d294fa93061245952692021-05-01 23:22:3616 days 21 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xa2fadf05900a3140ae04f85c8ee8e4203f7475056f9f2257461f5d294fa93061245952692021-05-01 23:22:3616 days 21 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xd5599049c21b66f02222c2bbdb35ddb5189727c86f87260f7daf9e9415d134bf245117092021-04-28 1:09:2820 days 19 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xd5599049c21b66f02222c2bbdb35ddb5189727c86f87260f7daf9e9415d134bf245117092021-04-28 1:09:2820 days 19 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xc31897ca1e7d9a5e7594d0b084ae788fed1154b3bb89796eada33ccde375ca9f245116852021-04-28 1:07:4420 days 19 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xc31897ca1e7d9a5e7594d0b084ae788fed1154b3bb89796eada33ccde375ca9f245116852021-04-28 1:07:4420 days 19 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xa1b9edca3737aa54aac905bee07860cff6173236fd0bfa45daf4baf9cb1f04fb245116562021-04-28 1:05:4420 days 20 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xa1b9edca3737aa54aac905bee07860cff6173236fd0bfa45daf4baf9cb1f04fb245116562021-04-28 1:05:4420 days 20 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0x6cc46e230a18422b2d9f52e19f2cb023bc5de6fc36f15152e51901582a930a65241870322021-04-07 17:37:3241 days 3 hrs ago 0xc93c8cde0edf4963ea1eea156099b285a945210a 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0x6cc46e230a18422b2d9f52e19f2cb023bc5de6fc36f15152e51901582a930a65241870322021-04-07 17:37:3241 days 3 hrs ago 0xc93c8cde0edf4963ea1eea156099b285a945210a 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0x099890dd571803b9444b2caca2e7494e7d7b29e7c0ca16a7c89c640c24bd751c241869152021-04-07 17:20:1241 days 3 hrs ago 0xc93c8cde0edf4963ea1eea156099b285a945210a 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0x099890dd571803b9444b2caca2e7494e7d7b29e7c0ca16a7c89c640c24bd751c241869152021-04-07 17:20:1241 days 3 hrs ago 0xc93c8cde0edf4963ea1eea156099b285a945210a 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0x26c12e3ebae3c37da1dbf5ab8d0ba238e8cee2cef49b63c2b4659f4ac9fa6559241868562021-04-07 17:11:0841 days 3 hrs ago 0xc93c8cde0edf4963ea1eea156099b285a945210a 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0x26c12e3ebae3c37da1dbf5ab8d0ba238e8cee2cef49b63c2b4659f4ac9fa6559241868562021-04-07 17:11:0841 days 3 hrs ago 0xc93c8cde0edf4963ea1eea156099b285a945210a 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xd15812c0c63c4be1ad4c17f21a2951a0180d734eb9741d947195f126951d99d9241866972021-04-07 16:49:5641 days 4 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xd15812c0c63c4be1ad4c17f21a2951a0180d734eb9741d947195f126951d99d9241866972021-04-07 16:49:5641 days 4 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0x0586b802449fb224d0a01fdd1b38d5a64613b4cb6fec76e4980994ef06868c91240622852021-03-26 16:22:5253 days 4 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0x0586b802449fb224d0a01fdd1b38d5a64613b4cb6fec76e4980994ef06868c91240622852021-03-26 16:22:5253 days 4 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xad37321bca851ad2fd957db919f3f2a5fef3fc144b6d66e727850d67c3594359240582042021-03-26 7:15:2453 days 13 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xad37321bca851ad2fd957db919f3f2a5fef3fc144b6d66e727850d67c3594359240582042021-03-26 7:15:2453 days 13 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
0xb2761c475250acbe0e7529db60086e8d134e72129bfe23c493aef6d0e77d55bc240581972021-03-26 7:14:2853 days 13 hrs ago 0x676c7b527c706801e64ad2108aa1f0ddc83807d0 0x26e2c37970f95c6a4b299fe5b0ae5b3d3f56a2350 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UniswapV2ExchangeAdapter

Compiler Version
v0.6.10+commit.00c0fcaf

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Apache-2.0 license
/**
 *Submitted for verification at Etherscan.io on 2021-02-08
*/

/**
 *Submitted for verification at Etherscan.io on 2021-01-18
*/

// Root file: contracts/protocol/integration/UniswapV2ExchangeAdapter.sol

/*
    Copyright 2020 Yam Finance

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.


*/

pragma solidity 0.6.10;
pragma experimental "ABIEncoderV2";

/**
 * @title UniswapV2TradeAdapter
 * @author Yam Finance
 *
 * Exchange adapter for Uniswap V2 Router02 that encodes trade data
 */
contract UniswapV2ExchangeAdapter {

    /* ============ State Variables ============ */

    // Address of Uniswap V2 Router02 contract
    address public immutable router;

    /* ============ Constructor ============ */

    /**
     * Set state variables
     *
     * @param _router       Address of Uniswap V2 Router02 contract
     */
    constructor(address _router) public {
        router = _router;
    }

    /* ============ External Getter Functions ============ */

    /**
     * Return calldata for Uniswap V2 Router02
     *
     * @param  _sourceToken              Address of source token to be sold
     * @param  _destinationToken         Address of destination token to buy
     * @param  _destinationAddress       Address that assets should be transferred to
     * @param  _sourceQuantity           Amount of source token to sell
     * @param  _minDestinationQuantity   Min amount of destination token to buy
     * @param  _data                     Arbitrary bytes containing trade call data
     *
     * @return address                   Target contract address
     * @return uint256                   Call value
     * @return bytes                     Trade calldata
     */
    function getTradeCalldata(
        address _sourceToken,
        address _destinationToken,
        address _destinationAddress,
        uint256 _sourceQuantity,
        uint256 _minDestinationQuantity,
        bytes memory _data
    )
        external
        view
        returns (address, uint256, bytes memory)
    {   
        address[] memory path;

        if(_data.length == 0){
            path = new address[](2);
            path[0] = _sourceToken;
            path[1] = _destinationToken;
        } else {
            path = abi.decode(_data, (address[]));
        }

        bytes memory callData = abi.encodeWithSignature(
            "swapExactTokensForTokens(uint256,uint256,address[],address,uint256)",
            _sourceQuantity,
            _minDestinationQuantity,
            path,
            _destinationAddress,
            block.timestamp
        );
        return (router, 0, callData);
    }

    /**
     * Returns the address to approve source tokens to for trading. This is the Uniswap router address
     *
     * @return address             Address of the contract to approve tokens to
     */
    function getSpender()
        external
        view
        returns (address)
    {
        return router;
    }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"getSpender","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sourceToken","type":"address"},{"internalType":"address","name":"_destinationToken","type":"address"},{"internalType":"address","name":"_destinationAddress","type":"address"},{"internalType":"uint256","name":"_sourceQuantity","type":"uint256"},{"internalType":"uint256","name":"_minDestinationQuantity","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"getTradeCalldata","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a060405234801561001057600080fd5b506040516105a83803806105a883398101604081905261002f91610044565b60601b6001600160601b031916608052610072565b600060208284031215610055578081fd5b81516001600160a01b038116811461006b578182fd5b9392505050565b60805160601c61051061009860003980609052806101a152806101d852506105106000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063334fc28914610046578063e171fcab14610064578063f887ea4014610086575b600080fd5b61004e61008e565b60405161005b919061037d565b60405180910390f35b61007761007236600461020b565b6100b2565b60405161005b93929190610391565b61004e6101d6565b7f000000000000000000000000000000000000000000000000000000000000000090565b60008060608084516000141561014357604080516002808252606082018352909160208301908036833701905050905089816000815181106100f057fe5b60200260200101906001600160a01b031690816001600160a01b031681525050888160018151811061011e57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505061015a565b8480602001905181019061015791906102d2565b90505b60608787838b426040516024016101759594939291906103fb565b60408051601f198184030181529190526020810180516001600160e01b03166338ed173960e01b1790527f00000000000000000000000000000000000000000000000000000000000000009550600094509250505096509650969350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b8051610205816104c2565b92915050565b60008060008060008060c08789031215610223578182fd5b863561022e816104c2565b9550602087013561023e816104c2565b9450604087013561024e816104c2565b9350606087013592506080870135915060a087013567ffffffffffffffff811115610277578182fd5b80880189601f820112610288578283fd5b8035915061029d61029883610492565b61046b565b8281528a60208484010111156102b1578384fd5b6102c28360208301602085016104b6565b8093505050509295509295509295565b600060208083850312156102e4578182fd5b825167ffffffffffffffff808211156102fb578384fd5b81850186601f82011261030c578485fd5b805192508183111561031c578485fd5b838302915061032c84830161046b565b8381528481019082860184840187018a1015610346578788fd5b8794505b858510156103705761035c8a826101fa565b83526001949094019391860191860161034a565b5098975050505050505050565b6001600160a01b0391909116815260200190565b600060018060a01b038516825260208481840152606060408401528351806060850152825b818110156103d2578581018301518582016080015282016103b6565b818111156103e35783608083870101525b50601f01601f19169290920160800195945050505050565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b8181101561044a5784516001600160a01b031683529383019391830191600101610425565b50506001600160a01b03969096166060850152505050608001529392505050565b60405181810167ffffffffffffffff8111828210171561048a57600080fd5b604052919050565b600067ffffffffffffffff8211156104a8578081fd5b50601f01601f191660200190565b82818337506000910152565b6001600160a01b03811681146104d757600080fd5b5056fea26469706673582212205d39e4f8f3d63d8cd54e9cb0661fcdd80ece28176ad3a5939ebc44359db11b8064736f6c634300060a00330000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d

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

0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d

-----Decoded View---------------
Arg [0] : _router (address): 0x7a250d5630b4cf539739df2c5dacb4c659f2488d

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d


Deployed ByteCode Sourcemap

967:2533:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3379:118;;;:::i;:::-;;;;;;;;;;;;;;;;2210:950;;;;;;;;;:::i;:::-;;;;;;;;;;1113:31;;;:::i;3379:118::-;3483:6;3379:118;:::o;2210:950::-;2503:7;2512;2521:12;2554:21;2591:5;:12;2607:1;2591:17;2588:220;;;2631:16;;;2645:1;2631:16;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2631:16:0;2624:23;;2672:12;2662:4;2667:1;2662:7;;;;;;;;;;;;;:22;-1:-1:-1;;;;;2662:22:0;;;-1:-1:-1;;;;;2662:22:0;;;;;2709:17;2699:4;2704:1;2699:7;;;;;;;;;;;;;:27;-1:-1:-1;;;;;2699:27:0;;;-1:-1:-1;;;;;2699:27:0;;;;;2588:220;;;2777:5;2766:30;;;;;;;;;;;;;;2759:37;;2588:220;2820:21;2966:15;2996:23;3034:4;3053:19;3087:15;2844:269;;;;;;;;;;;;;;;;;-1:-1:-1;;2844:269:0;;;;;;;;;;;;;;-1:-1:-1;;;;;2844:269:0;-1:-1:-1;;;2844:269:0;;;3132:6;;-1:-1:-1;;;;2844:269:0;-1:-1:-1;;;2210:950:0;;;;;;;;;;:::o;1113:31::-;;;:::o;142:134:-1:-;220:13;;238:33;220:13;238:33;;;205:71;;;;;1617:973;;;;;;;1815:3;1803:9;1794:7;1790:23;1786:33;1783:2;;;-1:-1;;1822:12;1783:2;85:6;72:20;97:33;124:5;97:33;;;1874:63;-1:-1;1974:2;2013:22;;72:20;97:33;72:20;97:33;;;1982:63;-1:-1;2082:2;2121:22;;72:20;97:33;72:20;97:33;;;2090:63;-1:-1;2190:2;2229:22;;1547:20;;-1:-1;2298:3;2338:22;;1547:20;;-1:-1;2435:3;2420:19;;2407:33;2460:18;2449:30;;2446:2;;;-1:-1;;2482:12;2446:2;2557:6;2546:9;2542:22;1133:3;1126:4;1118:6;1114:17;1110:27;1100:2;;-1:-1;;1141:12;1100:2;1188:6;1175:20;1161:34;;1210:64;1225:48;1266:6;1225:48;;;1210:64;;;1294:6;1287:5;1280:21;1398:3;1974:2;1389:6;1322;1380:16;;1377:25;1374:2;;;-1:-1;;1405:12;1374:2;1425:41;1459:6;1974:2;1356:5;1352:16;1974:2;1322:6;1318:17;1425:41;;;2502:72;;;;;;1777:813;;;;;;;;;2597:392;;2737:2;;2725:9;2716:7;2712:23;2708:32;2705:2;;;-1:-1;;2743:12;2705:2;2794:17;2788:24;2832:18;;2824:6;2821:30;2818:2;;;-1:-1;;2854:12;2818:2;2956:6;2945:9;2941:22;429:3;422:4;414:6;410:17;406:27;396:2;;-1:-1;;437:12;396:2;477:6;471:13;457:27;;2832:18;6608:6;6605:30;6602:2;;;-1:-1;;6638:12;6602:2;2737;6675:6;6671:17;;;499:80;2737:2;6671:17;6736:15;499:80;;;607:21;;;664:14;;;;639:17;;;744:27;;;;;741:36;-1:-1;738:2;;;-1:-1;;780:12;738:2;-1:-1;806:10;;800:217;825:6;822:1;819:13;800:217;;;905:48;949:3;937:10;905:48;;;893:61;;847:1;840:9;;;;;968:14;;;;996;;800:217;;;-1:-1;2874:99;2699:290;-1:-1;;;;;;;;2699:290;4607:222;-1:-1;;;;;8159:54;;;;3239:37;;4734:2;4719:18;;4705:124;4836:528;;2460:18;;8170:42;;;8163:5;8159:54;3246:3;3239:37;5201:2;4588:5;5201:2;5190:9;5186:18;4558:37;5037:2;5238;5227:9;5223:18;5216:48;4279:5;7357:12;7772:6;5037:2;5026:9;5022:18;7760:19;-1:-1;8531:101;8545:6;8542:1;8539:13;8531:101;;;8612:11;;;;;8606:18;8593:11;;;7800:14;8593:11;8586:39;8560:10;;8531:101;;;8647:6;8644:1;8641:13;8638:2;;;-1:-1;7800:14;8703:6;5026:9;8694:16;;8687:27;8638:2;-1:-1;8819:7;8803:14;-1:-1;;8799:28;4436:39;;;;7800:14;4436:39;;5008:356;-1:-1;;;;;5008:356;5371:816;;5660:3;5649:9;5645:19;4588:5;4565:3;4558:37;5825:2;4588:5;5825:2;5814:9;5810:18;4558:37;5660:3;5862:2;5851:9;5847:18;5840:48;5902:108;3632:5;7357:12;7772:6;7767:3;7760:19;7800:14;5649:9;7800:14;3644:93;;5825:2;3808:5;7211:14;3820:21;;-1:-1;3847:260;3872:6;3869:1;3866:13;3847:260;;;3933:13;;-1:-1;;;;;8159:54;3239:37;;7615:14;;;;3150;;;;2460:18;3887:9;3847:260;;;-1:-1;;;;;;;8159:54;;;;6089:2;6074:18;;3239:37;-1:-1;;;6172:3;6157:19;4558:37;5894:116;5631:556;-1:-1;;;5631:556;6194:256;6256:2;6250:9;6282:17;;;6357:18;6342:34;;6378:22;;;6339:62;6336:2;;;6414:1;;6404:12;6336:2;6256;6423:22;6234:216;;-1:-1;6234:216;6768:321;;6911:18;6903:6;6900:30;6897:2;;;-1:-1;;6933:12;6897:2;-1:-1;8819:7;6987:17;-1:-1;;6983:33;7074:4;7064:15;;6834:255;8305:145;8386:6;8381:3;8376;8363:30;-1:-1;8442:1;8424:16;;8417:27;8356:94;8840:117;-1:-1;;;;;8159:54;;8899:35;;8889:2;;8948:1;;8938:12;8889:2;8883:74;

Swarm Source

ipfs://5d39e4f8f3d63d8cd54e9cb0661fcdd80ece28176ad3a5939ebc44359db11b80
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading