Contract 0xc4729e56b831d74bbc18797e0e17a295fa77488c 1

Contract Overview

Balance:
0.237948195 AVAX

AVAX Value:
$15.01 (@ $63.09/AVAX)

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xf1b73bb1b0ff7ab4131c57e3a5570083391f46461bc8ee22c8c92f10047b367f0x6bf2df86101161042022-01-27 8:05:067 secs ago0xb1e862ed07cb5f466dd36a17e5fdef93a7fd212b IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.01335474416436.283065399
0xf47bdcce285c3d53864463a1309cf4789e4818c34c375031ea605a0e40f1b4e40x6bf2df86101160812022-01-27 8:04:2548 secs ago0xb1e862ed07cb5f466dd36a17e5fdef93a7fd212b IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.01146308599637.070013052
0xc9f68b49743182c425994f28417f3f3f8586d83faf6156435085d6df5f2f06010x6bf2df86101160752022-01-27 8:04:1558 secs ago0xb1e862ed07cb5f466dd36a17e5fdef93a7fd212b IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.02704705079937.557523849
0xc7295e004d0ab4983ed41855e597106613e2b8f14d578d7d0ca648f4f2ce782f0x6bf2df86101160662022-01-27 8:03:571 min ago0x7206bc81e2c52441eeffe120118ac880f4528dda IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.014933358008 31.819070548
0xe11d18071173ba5e323374df37a5ec17f032cd0b2c6958d06e2f2a73aafbb61c0xf0350382101159952022-01-27 8:01:503 mins ago0xf29fdeb6ad295162a734c43ca4a0e069567fd1a4 IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.021998538998 31.102881023
0x0259aadcef48d503ee72b271d3d287dc08457b047d03d76e38255e00897a6cc80x6bf2df86101159792022-01-27 8:01:223 mins ago0xb1e862ed07cb5f466dd36a17e5fdef93a7fd212b IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.01325332419736.009868842
0x74b44d9ad253c87cd0740475b384731f3d4d79073bbec104daef8f584c5f2ecb0x6bf2df86101159302022-01-27 7:59:475 mins ago0xb1e862ed07cb5f466dd36a17e5fdef93a7fd212b IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.01321953826135.918070957
0x0c034c82b6a50745d5cff7c9b4a26a7a02d5208f331a1f2f36330e11e859d2220x6bf2df86101159032022-01-27 7:58:516 mins ago0x22b650f7f8b68d0f1d8440fff3258a314df3f68a IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.011330372328 31.13988668
0xdc7131cd0c2c74815c6c0f63cb0e23ffbb3f4819daf0446baaf54334b4c9f7e70x6bf2df86101158922022-01-27 7:58:316 mins ago0x15263d1e0c66b87fa67d4f133a99158b91de7cea IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.0206319387730.944504261
0xd2dd9ddc0ff00c16a3ebe7497fc89bbcdb5c15172fd34dfab65196e79ca69eca0x6bf2df86101156392022-01-27 7:50:1914 mins ago0x371144472fdd558bc8abca9eca12dc1211b83bef IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.008152761956 32.534786287
0x52e95c970f70a3cfd6484e486f52f68d9328c7f0b9c6b49cf01a120fafad48050xfe38c5e6101155122022-01-27 7:46:1518 mins ago0x9313f48d578d217cd9cd908ad45bed11ff0a28cd IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c35.811628766114131 AVAX0.006323851963 33.250356034
0xcc6147d32c02a19351735dec605f4c4c8168a240bd433f4359365cdf0a3cc4bc0xf0350382101154482022-01-27 7:44:0221 mins ago0xd817c1ea14ccd88cf3dba52269edec4667a575b5 IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.0254001 60
0x1ce1a0bd303925aaee2d338663abfff9a85ece1622b04e9bd4150f23f3c56d0d0xf0350382101154322022-01-27 7:43:3521 mins ago0xd817c1ea14ccd88cf3dba52269edec4667a575b5 IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.01503966 60
0xa382de85ff0dd54e5287ac79ddb9461c7c385d8c9ca82b6436d9acc36ac78d350x6bf2df86101153702022-01-27 7:41:4023 mins ago0x59232e93e22852aae8bbd6453a22aa1a16c63175 IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.01283742957535.087311034
0x810fc74ce80056b799cae685663c68ae5f1e081c97815e94364e16b33a9cbb540x6bf2df86101153662022-01-27 7:41:3423 mins ago0x22b650f7f8b68d0f1d8440fff3258a314df3f68a IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.011334963892 32.687644961
0xaf115771c1544de1bb5de8ae17fe0de025c913a39578e902329d159d7380218c0x6bf2df86101153082022-01-27 7:39:5225 mins ago0x22b650f7f8b68d0f1d8440fff3258a314df3f68a IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.00822244618 31.155660652
0x78b7746dccc3ca02401c5cff1d70c1a6c1595da621900e12493ce2eca196696a0x6bf2df86101153072022-01-27 7:39:5125 mins ago0xb1e862ed07cb5f466dd36a17e5fdef93a7fd212b IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.01275710671636.162469575
0xc4bd7e20c4663117d2c9f827c0e912abb9cd26e84c6bf6607543107319bd10430xf0350382101149912022-01-27 7:30:3534 mins ago0x642415db207ee1ece88f0caa08fa7a8aa2c1a580 IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.00518408837 25.186507037
0x87c7440b0716f91cd21b468865b46048a8144a38a232a56e7f2dd60b72a0ec450xf0350382101149532022-01-27 7:29:1435 mins ago0x50b8bc290c2c5622fea9bc426fceb8f35ad1aedb IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.02475855 50
0x64ca4cf0b1b0a3423d3b6e1693cb4ed0ee861178f666b56ca5134ba8f357b5190x6bf2df86101149472022-01-27 7:29:0236 mins ago0x26a8a72d5b917d9929a39908ca38b2ce4fc6517e IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.003329019093 25.535945669
0xdda11b2e60a6e074ad0e16c77e0ebb0654ab3672470118b968746d7ea3289adb0xf0350382101149272022-01-27 7:28:2436 mins ago0x50b8bc290c2c5622fea9bc426fceb8f35ad1aedb IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.0125301 50
0x325688b98522f6c011e720568a91cf00084f99ba0a1704a0f39877c5287279240x6bf2df86101148862022-01-27 7:27:0638 mins ago0xb1e862ed07cb5f466dd36a17e5fdef93a7fd212b IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.0156861630
0xba346b65aa8fb0693406756757030d6127a5ea645d8ebbec349b44436f7d6e390xf0350382101148682022-01-27 7:26:3338 mins ago0xab894d28933e18a79f55bbcb4e4fddb7c2d93179 IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.010333040906 25.504612943
0xf28cb87e43a2a1af61c8c521d6cfa9bd3f497a12f0114a45493d713c2507e1c70x6bf2df86101148602022-01-27 7:26:2138 mins ago0xf73daf38a523a5c0a25319e4163024d701cfb70c IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.009719252428 25.604133934
0x7c40b8b65e357287a415692f84f9ef37a4b8a5ad571f0965f94319cdbf0d72340x6bf2df86101148312022-01-27 7:25:2939 mins ago0xf73daf38a523a5c0a25319e4163024d701cfb70c IN  0xc4729e56b831d74bbc18797e0e17a295fa77488c0 AVAX0.002702748807 25.488492878
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xe11d18071173ba5e323374df37a5ec17f032cd0b2c6958d06e2f2a73aafbb61c101159952022-01-27 8:01:503 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c0xf29fdeb6ad295162a734c43ca4a0e069567fd1a434.487372101997793083 AVAX
0xe11d18071173ba5e323374df37a5ec17f032cd0b2c6958d06e2f2a73aafbb61c101159952022-01-27 8:01:503 mins ago Wrapped AVAX 0xc4729e56b831d74bbc18797e0e17a295fa77488c34.487372101997793083 AVAX
0x52e95c970f70a3cfd6484e486f52f68d9328c7f0b9c6b49cf01a120fafad4805101155122022-01-27 7:46:1518 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c Wrapped AVAX35.811628766114131951 AVAX
0xcc6147d32c02a19351735dec605f4c4c8168a240bd433f4359365cdf0a3cc4bc101154482022-01-27 7:44:0221 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c0xd817c1ea14ccd88cf3dba52269edec4667a575b5789.092991103610372169 AVAX
0xcc6147d32c02a19351735dec605f4c4c8168a240bd433f4359365cdf0a3cc4bc101154482022-01-27 7:44:0221 mins ago Wrapped AVAX 0xc4729e56b831d74bbc18797e0e17a295fa77488c789.092991103610372169 AVAX
0xc4bd7e20c4663117d2c9f827c0e912abb9cd26e84c6bf6607543107319bd1043101149912022-01-27 7:30:3534 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c0x642415db207ee1ece88f0caa08fa7a8aa2c1a58012.905367049846114601 AVAX
0xc4bd7e20c4663117d2c9f827c0e912abb9cd26e84c6bf6607543107319bd1043101149912022-01-27 7:30:3534 mins ago Wrapped AVAX 0xc4729e56b831d74bbc18797e0e17a295fa77488c12.905367049846114601 AVAX
0x87c7440b0716f91cd21b468865b46048a8144a38a232a56e7f2dd60b72a0ec45101149532022-01-27 7:29:1435 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c0x50b8bc290c2c5622fea9bc426fceb8f35ad1aedb791.189020598379550079 AVAX
0x87c7440b0716f91cd21b468865b46048a8144a38a232a56e7f2dd60b72a0ec45101149532022-01-27 7:29:1435 mins ago Wrapped AVAX 0xc4729e56b831d74bbc18797e0e17a295fa77488c791.189020598379550079 AVAX
0xba346b65aa8fb0693406756757030d6127a5ea645d8ebbec349b44436f7d6e39101148682022-01-27 7:26:3338 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c0xab894d28933e18a79f55bbcb4e4fddb7c2d931791.187133890644939206 AVAX
0xba346b65aa8fb0693406756757030d6127a5ea645d8ebbec349b44436f7d6e39101148682022-01-27 7:26:3338 mins ago Wrapped AVAX 0xc4729e56b831d74bbc18797e0e17a295fa77488c1.187133890644939206 AVAX
0x271ed10680d2b6d87a497486b0d9eff3eb56ee259ad4d0fbfb9a77d663f18066101147802022-01-27 7:23:5941 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c0xf73daf38a523a5c0a25319e4163024d701cfb70c103.689147145284900123 AVAX
0x271ed10680d2b6d87a497486b0d9eff3eb56ee259ad4d0fbfb9a77d663f18066101147802022-01-27 7:23:5941 mins ago Wrapped AVAX 0xc4729e56b831d74bbc18797e0e17a295fa77488c103.689147145284900123 AVAX
0x14717ab133c8431e94932577930d3b6af62725ed184c423eb3ce3751a16fdfd3101147332022-01-27 7:22:2142 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c0xab894d28933e18a79f55bbcb4e4fddb7c2d931790.023718305703067883 AVAX
0x14717ab133c8431e94932577930d3b6af62725ed184c423eb3ce3751a16fdfd3101147332022-01-27 7:22:2142 mins ago Wrapped AVAX 0xc4729e56b831d74bbc18797e0e17a295fa77488c0.023718305703067883 AVAX
0x36ae6c180c091d26d171be0413104a34a8abeffd427da691c83aa2a2b989d585101142862022-01-27 7:07:4657 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c0xd817c1ea14ccd88cf3dba52269edec4667a575b5798.022017364933267896 AVAX
0x36ae6c180c091d26d171be0413104a34a8abeffd427da691c83aa2a2b989d585101142862022-01-27 7:07:4657 mins ago Wrapped AVAX 0xc4729e56b831d74bbc18797e0e17a295fa77488c798.022017364933267896 AVAX
0x6d1ecb5ee388f8503130977845671939dc01523a4aa329b3a0e9f3381f7f2759101140952022-01-27 7:01:371 hr 3 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c0x50dfd8835800d89d8392eb7229ae569db027646b11.966751634808918458 AVAX
0x6d1ecb5ee388f8503130977845671939dc01523a4aa329b3a0e9f3381f7f2759101140952022-01-27 7:01:371 hr 3 mins ago Wrapped AVAX 0xc4729e56b831d74bbc18797e0e17a295fa77488c11.966751634808918458 AVAX
0x549d32c6362b8886c004def041b468e21bca0c9dca4d83b53cd913f9375518fa101140742022-01-27 7:00:551 hr 4 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c Wrapped AVAX0.354377050677246033 AVAX
0xdc325513b6b8069831c4bc8fc6435046ad0208d28289dd6ebba9446ac0868e85101139682022-01-27 6:57:321 hr 7 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c0x411b569c4b4a37e220dda169cc51f8b8e6cd9a1b0.123846020978783926 AVAX
0xdc325513b6b8069831c4bc8fc6435046ad0208d28289dd6ebba9446ac0868e85101139682022-01-27 6:57:321 hr 7 mins ago Wrapped AVAX 0xc4729e56b831d74bbc18797e0e17a295fa77488c0.123846020978783926 AVAX
0x6d7b640aea172fb4532fb49df7bdfe8ae92a906c4484e0f5623903ec00d65e96101139362022-01-27 6:56:341 hr 8 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c Wrapped AVAX0.8 AVAX
0x7787e4c293503680570f8fa43480e74c9e89ac5dbba59e27085cb1969060e6df101138282022-01-27 6:52:551 hr 12 mins ago 0xc4729e56b831d74bbc18797e0e17a295fa77488c0xa70e6fe4488104be32b9b657f5be7b68afc17f9a559.744572387190231825 AVAX
0x7787e4c293503680570f8fa43480e74c9e89ac5dbba59e27085cb1969060e6df101138282022-01-27 6:52:551 hr 12 mins ago Wrapped AVAX 0xc4729e56b831d74bbc18797e0e17a295fa77488c559.744572387190231825 AVAX
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
YakRouter

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 999 runs

Other Settings:
default evmVersion
File 1 of 10 : YakRouter.sol
//       ╟╗                                                                      ╔╬
//       ╞╬╬                                                                    ╬╠╬
//      ╔╣╬╬╬                                                                  ╠╠╠╠╦
//     ╬╬╬╬╬╩                                                                  ╘╠╠╠╠╬
//    ║╬╬╬╬╬                                                                    ╘╠╠╠╠╬
//    ╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬      ╒╬╬╬╬╬╬╬╜   ╠╠╬╬╬╬╬╬╬         ╠╬╬╬╬╬╬╬    ╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠╠
//    ╙╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╕    ╬╬╬╬╬╬╬╜   ╣╠╠╬╬╬╬╬╬╬╬        ╠╬╬╬╬╬╬╬   ╬╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠╩
//     ╙╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬  ╔╬╬╬╬╬╬╬    ╔╠╠╠╬╬╬╬╬╬╬╬        ╠╬╬╬╬╬╬╬ ╣╬╬╬╬╬╬╬╬╬╬╬╠╠╠╠╝╙
//               ╘╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬    ╒╠╠╠╬╠╬╩╬╬╬╬╬╬       ╠╬╬╬╬╬╬╬╣╬╬╬╬╬╬╬╙
//                 ╣╬╬╬╬╬╬╬╬╬╬╠╣     ╣╬╠╠╠╬╩ ╚╬╬╬╬╬╬      ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//                  ╣╬╬╬╬╬╬╬╬╬╣     ╣╬╠╠╠╬╬   ╣╬╬╬╬╬╬     ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//                   ╟╬╬╬╬╬╬╬╩      ╬╬╠╠╠╠╬╬╬╬╬╬╬╬╬╬╬     ╠╬╬╬╬╬╬╬╠╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬     ╒╬╬╠╠╬╠╠╬╬╬╬╬╬╬╬╬╬╬╬    ╠╬╬╬╬╬╬╬ ╣╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬     ╬╬╬╠╠╠╠╝╝╝╝╝╝╝╠╬╬╬╬╬╬   ╠╬╬╬╬╬╬╬  ╚╬╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬    ╣╬╬╬╬╠╠╩       ╘╬╬╬╬╬╬╬  ╠╬╬╬╬╬╬╬   ╙╬╬╬╬╬╬╬╬
//                              

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity >=0.7.0;
pragma experimental ABIEncoderV2;

import "./lib/BytesManipulation.sol";
import "./interface/IAdapter.sol";
import "./interface/IERC20.sol";
import "./interface/IWETH.sol";
import "./lib/SafeMath.sol";
import "./lib/SafeERC20.sol";
import "./lib/Ownable.sol";

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

    address public constant WAVAX = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7;
    address public constant AVAX = address(0);
    string public constant NAME = 'YakRouter';
    uint public constant FEE_DENOMINATOR = 1e4;
    uint public MIN_FEE = 0;
    address public FEE_CLAIMER;
    address[] public TRUSTED_TOKENS;
    address[] public ADAPTERS;

    event Recovered(
        address indexed _asset, 
        uint amount
    );

    event UpdatedTrustedTokens(
	    address[] _newTrustedTokens
    );

    event UpdatedAdapters(
        address[] _newAdapters
    );

    event UpdatedMinFee(
        uint _oldMinFee,
        uint _newMinFee
    );

    event UpdatedFeeClaimer(
        address _oldFeeClaimer, 
        address _newFeeClaimer 
    );

    event YakSwap(
        address indexed _tokenIn, 
        address indexed _tokenOut, 
        uint _amountIn, 
        uint _amountOut
    );

    struct Query {
        address adapter;
        address tokenIn;
        address tokenOut;
        uint256 amountOut;
    }

    struct OfferWithGas {
        bytes amounts;
        bytes adapters;
        bytes path;
        uint gasEstimate;
    }

    struct Offer {
        bytes amounts;
        bytes adapters;
        bytes path;
    }

    struct FormattedOfferWithGas {
        uint[] amounts;
        address[] adapters;
        address[] path;
        uint gasEstimate;
    }

    struct FormattedOffer {
        uint[] amounts;
        address[] adapters;
        address[] path;
    }

    struct Trade {
        uint amountIn;
        uint amountOut;
        address[] path;
        address[] adapters;
    }

    constructor(
        address[] memory _adapters, 
        address[] memory _trustedTokens, 
        address _feeClaimer
    ) {
        setTrustedTokens(_trustedTokens);
        setFeeClaimer(_feeClaimer);
        setAdapters(_adapters);
        _setAllowances();
    }

    // -- SETTERS --

    function _setAllowances() internal {
        IERC20(WAVAX).safeApprove(WAVAX, type(uint).max);
    }

    function setTrustedTokens(address[] memory _trustedTokens) public onlyOwner {
        emit UpdatedTrustedTokens(_trustedTokens);
        TRUSTED_TOKENS = _trustedTokens;
    }

    function setAdapters(address[] memory _adapters) public onlyOwner {
        emit UpdatedAdapters(_adapters);
        ADAPTERS = _adapters;
    }

    function setMinFee(uint _fee) external onlyOwner {
        emit UpdatedMinFee(MIN_FEE, _fee);
        MIN_FEE = _fee;
    }

    function setFeeClaimer(address _claimer) public onlyOwner {
        emit UpdatedFeeClaimer(FEE_CLAIMER, _claimer);
        FEE_CLAIMER = _claimer;
    }

    //  -- GENERAL --

    function trustedTokensCount() external view returns (uint) {
        return TRUSTED_TOKENS.length;
    }

    function adaptersCount() external view returns (uint) {
        return ADAPTERS.length;
    }

    function recoverERC20(address _tokenAddress, uint _tokenAmount) external onlyOwner {
        require(_tokenAmount > 0, 'YakRouter: Nothing to recover');
        IERC20(_tokenAddress).safeTransfer(msg.sender, _tokenAmount);
        emit Recovered(_tokenAddress, _tokenAmount);
    }

    function recoverAVAX(uint _amount) external onlyOwner {
        require(_amount > 0, 'YakRouter: Nothing to recover');
        payable(msg.sender).transfer(_amount);
        emit Recovered(address(0), _amount);
    }

    // Fallback
    receive() external payable {}


    // -- HELPERS -- 

    function _applyFee(uint _amountIn, uint _fee) internal view returns (uint) {
        require(_fee>=MIN_FEE, 'YakRouter: Insufficient fee');
        return _amountIn.mul(FEE_DENOMINATOR.sub(_fee))/FEE_DENOMINATOR;
    }

    function _wrap(uint _amount) internal {
        IWETH(WAVAX).deposit{value: _amount}();
    }

    function _unwrap(uint _amount) internal {
        IWETH(WAVAX).withdraw(_amount);
    }

    /**
     * @notice Return tokens to user
     * @dev Pass address(0) for AVAX
     * @param _token address
     * @param _amount tokens to return
     * @param _to address where funds should be sent to
     */
    function _returnTokensTo(address _token, uint _amount, address _to) internal {
        if (address(this)!=_to) {
            if (_token == AVAX) {
                payable(_to).transfer(_amount);
            } else {
                IERC20(_token).safeTransfer(_to, _amount);
            }
        }
    }

    /**
     * Makes a deep copy of Offer struct
     */
    function _cloneOffer(
        Offer memory _queries
    ) internal pure returns (Offer memory) {
        return Offer(
            _queries.amounts, 
            _queries.adapters, 
            _queries.path
        );
    }

    /**
     * Makes a deep copy of OfferWithGas struct
     */
    function _cloneOfferWithGas(
        OfferWithGas memory _queries
    ) internal pure returns (OfferWithGas memory) {
        return OfferWithGas(
            _queries.amounts, 
            _queries.adapters, 
            _queries.path, 
            _queries.gasEstimate
        );
    }

    /**
     * Appends Query elements to Offer struct
     */
    function _addQuery(
        Offer memory _queries, 
        uint256 _amount, 
        address _adapter, 
        address _tokenOut
    ) internal pure {
        _queries.path = BytesManipulation.mergeBytes(_queries.path, BytesManipulation.toBytes(_tokenOut));
        _queries.amounts = BytesManipulation.mergeBytes(_queries.amounts, BytesManipulation.toBytes(_amount));
        _queries.adapters = BytesManipulation.mergeBytes(_queries.adapters, BytesManipulation.toBytes(_adapter));
    }

    /**
     * Appends Query elements to Offer struct
     */
    function _addQueryWithGas(
        OfferWithGas memory _queries, 
        uint256 _amount, 
        address _adapter, 
        address _tokenOut, 
        uint _gasEstimate
    ) internal pure {
        _queries.path = BytesManipulation.mergeBytes(_queries.path, BytesManipulation.toBytes(_tokenOut));
        _queries.amounts = BytesManipulation.mergeBytes(_queries.amounts, BytesManipulation.toBytes(_amount));
        _queries.adapters = BytesManipulation.mergeBytes(_queries.adapters, BytesManipulation.toBytes(_adapter));
        _queries.gasEstimate += _gasEstimate;
    }

    /**
     * Converts byte-arrays to an array of integers
     */
    function _formatAmounts(bytes memory _amounts) internal pure returns (uint256[] memory) {
        // Format amounts
        uint256 chunks = _amounts.length / 32;
        uint256[] memory amountsFormatted = new uint256[](chunks);
        for (uint256 i=0; i<chunks; i++) {
            amountsFormatted[i] = BytesManipulation.bytesToUint256(i*32+32, _amounts);
        }
        return amountsFormatted;
    }

    /**
     * Converts byte-array to an array of addresses
     */
    function _formatAddresses(bytes memory _addresses) internal pure returns (address[] memory) {
        uint256 chunks = _addresses.length / 32;
        address[] memory addressesFormatted = new address[](chunks);
        for (uint256 i=0; i<chunks; i++) {
            addressesFormatted[i] = BytesManipulation.bytesToAddress(i*32+32, _addresses);
        }
        return addressesFormatted;
    }

    /**
     * Formats elements in the Offer object from byte-arrays to integers and addresses
     */
    function _formatOffer(Offer memory _queries) internal pure returns (FormattedOffer memory) {
        return FormattedOffer(
            _formatAmounts(_queries.amounts), 
            _formatAddresses(_queries.adapters), 
            _formatAddresses(_queries.path)
        );
    }

    /**
     * Formats elements in the Offer object from byte-arrays to integers and addresses
     */
    function _formatOfferWithGas(OfferWithGas memory _queries) internal pure returns (FormattedOfferWithGas memory) {
        return FormattedOfferWithGas(
            _formatAmounts(_queries.amounts), 
            _formatAddresses(_queries.adapters), 
            _formatAddresses(_queries.path), 
            _queries.gasEstimate
        );
    }


    // -- QUERIES --


    /**
     * Query single adapter
     */
    function queryAdapter(
        uint256 _amountIn, 
        address _tokenIn, 
        address _tokenOut,
        uint8 _index
    ) external view returns (uint256) {
        IAdapter _adapter = IAdapter(ADAPTERS[_index]);
        uint amountOut = _adapter.query(_amountIn, _tokenIn, _tokenOut);
        return amountOut;
    }

    /**
     * Query specified adapters
     */
    function queryNoSplit(
        uint256 _amountIn, 
        address _tokenIn, 
        address _tokenOut,
        uint8[] calldata _options
    ) public view returns (Query memory) {
        Query memory bestQuery;
        for (uint8 i; i<_options.length; i++) {
            address _adapter = ADAPTERS[_options[i]];
            uint amountOut = IAdapter(_adapter).query(
                _amountIn, 
                _tokenIn, 
                _tokenOut
            );
            if (i==0 || amountOut>bestQuery.amountOut) {
                bestQuery = Query(_adapter, _tokenIn, _tokenOut, amountOut);
            }
        }
        return bestQuery;
    }

    /**
     * Query all adapters
     */
    function queryNoSplit(
        uint256 _amountIn, 
        address _tokenIn, 
        address _tokenOut
    ) public view returns (Query memory) {
        Query memory bestQuery;
        for (uint8 i; i<ADAPTERS.length; i++) {
            address _adapter = ADAPTERS[i];
            uint amountOut = IAdapter(_adapter).query(
                _amountIn, 
                _tokenIn, 
                _tokenOut
            );
            if (i==0 || amountOut>bestQuery.amountOut) {
                bestQuery = Query(_adapter, _tokenIn, _tokenOut, amountOut);
            }
        }
        return bestQuery;
    }

    /**
     * Return path with best returns between two tokens
     * Takes gas-cost into account
     */
    function findBestPathWithGas(
        uint256 _amountIn, 
        address _tokenIn, 
        address _tokenOut, 
        uint _maxSteps,
        uint _gasPrice
    ) external view returns (FormattedOfferWithGas memory) {
        require(_maxSteps>0 && _maxSteps<5, 'YakRouter: Invalid max-steps');
        OfferWithGas memory queries;
        queries.amounts = BytesManipulation.toBytes(_amountIn);
        queries.path = BytesManipulation.toBytes(_tokenIn);
        // Find the market price between AVAX and token-out and express gas price in token-out currency
        FormattedOffer memory gasQuery = findBestPath(1e18, WAVAX, _tokenOut, 2);  // Avoid low-liquidity price appreciation
        // Leave result nWei to preserve digits for assets with low decimal places
        uint tknOutPriceNwei = gasQuery.amounts[gasQuery.amounts.length-1].mul(_gasPrice/1e9);
        queries = _findBestPathWithGas(
            _amountIn, 
            _tokenIn, 
            _tokenOut, 
            _maxSteps,
            queries, 
            tknOutPriceNwei
        );
        // If no paths are found return empty struct
        if (queries.adapters.length==0) {
            queries.amounts = '';
            queries.path = '';
        }
        return _formatOfferWithGas(queries);
    } 

    function _findBestPathWithGas(
        uint256 _amountIn, 
        address _tokenIn, 
        address _tokenOut, 
        uint _maxSteps,
        OfferWithGas memory _queries, 
        uint _tknOutPriceNwei
    ) internal view returns (OfferWithGas memory) {
        OfferWithGas memory bestOption = _cloneOfferWithGas(_queries);
        uint256 bestAmountOut;
        // First check if there is a path directly from tokenIn to tokenOut
        Query memory queryDirect = queryNoSplit(_amountIn, _tokenIn, _tokenOut);
        if (queryDirect.amountOut!=0) {
            uint gasEstimate = IAdapter(queryDirect.adapter).swapGasEstimate();
            _addQueryWithGas(
                bestOption, 
                queryDirect.amountOut, 
                queryDirect.adapter, 
                queryDirect.tokenOut, 
                gasEstimate
            );
            bestAmountOut = queryDirect.amountOut;
        }
        // Only check the rest if they would go beyond step limit (Need at least 2 more steps)
        if (_maxSteps>1 && _queries.adapters.length/32<=_maxSteps-2) {
            // Check for paths that pass through trusted tokens
            for (uint256 i=0; i<TRUSTED_TOKENS.length; i++) {
                if (_tokenIn == TRUSTED_TOKENS[i]) {
                    continue;
                }
                // Loop through all adapters to find the best one for swapping tokenIn for one of the trusted tokens
                Query memory bestSwap = queryNoSplit(_amountIn, _tokenIn, TRUSTED_TOKENS[i]);
                if (bestSwap.amountOut==0) {
                    continue;
                }
                // Explore options that connect the current path to the tokenOut
                OfferWithGas memory newOffer = _cloneOfferWithGas(_queries);
                uint gasEstimate = IAdapter(bestSwap.adapter).swapGasEstimate();
                _addQueryWithGas(newOffer, bestSwap.amountOut, bestSwap.adapter, bestSwap.tokenOut, gasEstimate);
                newOffer = _findBestPathWithGas(
                    bestSwap.amountOut, 
                    TRUSTED_TOKENS[i], 
                    _tokenOut, 
                    _maxSteps, 
                    newOffer, 
                    _tknOutPriceNwei
                );
                address tokenOut = BytesManipulation.bytesToAddress(newOffer.path.length, newOffer.path);
                uint256 amountOut = BytesManipulation.bytesToUint256(newOffer.amounts.length, newOffer.amounts);
                // Check that the last token in the path is the tokenOut and update the new best option if neccesary
                if (_tokenOut == tokenOut && amountOut > bestAmountOut) {
                    if (newOffer.gasEstimate > bestOption.gasEstimate) {
                        uint gasCostDiff = _tknOutPriceNwei.mul(newOffer.gasEstimate-bestOption.gasEstimate) / 1e9;
                        uint priceDiff = amountOut - bestAmountOut;
                        if (gasCostDiff > priceDiff) { continue; }
                    }
                    bestAmountOut = amountOut;
                    bestOption = newOffer;
                }
            }
        }
        return bestOption;   
    }

    /**
     * Return path with best returns between two tokens
     */
    function findBestPath(
        uint256 _amountIn, 
        address _tokenIn, 
        address _tokenOut, 
        uint _maxSteps
    ) public view returns (FormattedOffer memory) {
        require(_maxSteps>0 && _maxSteps<5, 'YakRouter: Invalid max-steps');
        Offer memory queries;
        queries.amounts = BytesManipulation.toBytes(_amountIn);
        queries.path = BytesManipulation.toBytes(_tokenIn);
        queries = _findBestPath(_amountIn, _tokenIn, _tokenOut, _maxSteps, queries);
        // If no paths are found return empty struct
        if (queries.adapters.length==0) {
            queries.amounts = '';
            queries.path = '';
        }
        return _formatOffer(queries);
    } 

    function _findBestPath(
        uint256 _amountIn, 
        address _tokenIn, 
        address _tokenOut, 
        uint _maxSteps,
        Offer memory _queries
    ) internal view returns (Offer memory) {
        Offer memory bestOption = _cloneOffer(_queries);
        uint256 bestAmountOut;
        // First check if there is a path directly from tokenIn to tokenOut
        Query memory queryDirect = queryNoSplit(_amountIn, _tokenIn, _tokenOut);
        if (queryDirect.amountOut!=0) {
            _addQuery(bestOption, queryDirect.amountOut, queryDirect.adapter, queryDirect.tokenOut);
            bestAmountOut = queryDirect.amountOut;
        }
        // Only check the rest if they would go beyond step limit (Need at least 2 more steps)
        if (_maxSteps>1 && _queries.adapters.length/32<=_maxSteps-2) {
            // Check for paths that pass through trusted tokens
            for (uint256 i=0; i<TRUSTED_TOKENS.length; i++) {
                if (_tokenIn == TRUSTED_TOKENS[i]) {
                    continue;
                }
                // Loop through all adapters to find the best one for swapping tokenIn for one of the trusted tokens
                Query memory bestSwap = queryNoSplit(_amountIn, _tokenIn, TRUSTED_TOKENS[i]);
                if (bestSwap.amountOut==0) {
                    continue;
                }
                // Explore options that connect the current path to the tokenOut
                Offer memory newOffer = _cloneOffer(_queries);
                _addQuery(newOffer, bestSwap.amountOut, bestSwap.adapter, bestSwap.tokenOut);
                newOffer = _findBestPath(
                    bestSwap.amountOut, 
                    TRUSTED_TOKENS[i], 
                    _tokenOut, 
                    _maxSteps,
                    newOffer
                );  // Recursive step
                address tokenOut = BytesManipulation.bytesToAddress(newOffer.path.length, newOffer.path);
                uint256 amountOut = BytesManipulation.bytesToUint256(newOffer.amounts.length, newOffer.amounts);
                // Check that the last token in the path is the tokenOut and update the new best option if neccesary
                if (_tokenOut == tokenOut && amountOut>bestAmountOut) {
                    bestAmountOut = amountOut;
                    bestOption = newOffer;
                }
            }
        }
        return bestOption;   
    }


    // -- SWAPPERS --

    function _swapNoSplit(
        Trade calldata _trade,
        address _from,
        address _to, 
        uint _fee
    ) internal returns (uint) {
        uint[] memory amounts = new uint[](_trade.path.length);
        if (_fee > 0 || MIN_FEE > 0) {
            // Transfer fees to the claimer account and decrease initial amount
            amounts[0] = _applyFee(_trade.amountIn, _fee);
            IERC20(_trade.path[0]).safeTransferFrom(
                _from, 
                FEE_CLAIMER, 
                _trade.amountIn.sub(amounts[0])
            );
        } else {
            amounts[0] = _trade.amountIn;
        }
        IERC20(_trade.path[0]).safeTransferFrom(
            _from, 
            _trade.adapters[0], 
            amounts[0]
        );
        // Get amounts that will be swapped
        for (uint i=0; i<_trade.adapters.length; i++) {
            amounts[i+1] = IAdapter(_trade.adapters[i]).query(
                amounts[i], 
                _trade.path[i], 
                _trade.path[i+1]
            );
        }
        require(amounts[amounts.length-1] >= _trade.amountOut, 'YakRouter: Insufficient output amount');
        for (uint256 i=0; i<_trade.adapters.length; i++) {
            // All adapters should transfer output token to the following target
            // All targets are the adapters, expect for the last swap where tokens are sent out
            address targetAddress = i<_trade.adapters.length-1 ? _trade.adapters[i+1] : _to;
            IAdapter(_trade.adapters[i]).swap(
                amounts[i], 
                amounts[i+1], 
                _trade.path[i], 
                _trade.path[i+1],
                targetAddress
            );
        }
        emit YakSwap(
            _trade.path[0], 
            _trade.path[_trade.path.length-1], 
            _trade.amountIn, 
            amounts[amounts.length-1]
        );
        return amounts[amounts.length-1];
    }

    function swapNoSplit(
        Trade calldata _trade,
        address _to,
        uint _fee
    ) public {
        _swapNoSplit(_trade, msg.sender, _to, _fee);
    }

    function swapNoSplitFromAVAX(
        Trade calldata _trade,
        address _to,
        uint _fee
    ) external payable {
        require(_trade.path[0]==WAVAX, 'YakRouter: Path needs to begin with WAVAX');
        _wrap(_trade.amountIn);
        _swapNoSplit(_trade, address(this), _to, _fee);
    }

    function swapNoSplitToAVAX(
        Trade calldata _trade,
        address _to,
        uint _fee
    ) public {
        require(_trade.path[_trade.path.length-1]==WAVAX, 'YakRouter: Path needs to end with WAVAX');
        uint returnAmount = _swapNoSplit(_trade, msg.sender, address(this), _fee);
        _unwrap(returnAmount);
        _returnTokensTo(AVAX, returnAmount, _to);
    }

    /**
     * Swap token to token without the need to approve the first token
     */
    function swapNoSplitWithPermit(
        Trade calldata _trade,
        address _to,
        uint _fee,
        uint _deadline, 
        uint8 _v,
        bytes32 _r, 
        bytes32 _s
    ) external {
        IERC20(_trade.path[0]).permit(
            msg.sender, 
            address(this), 
            _trade.amountIn, 
            _deadline, 
            _v, 
            _r, 
            _s
        );
        swapNoSplit(_trade, _to, _fee);
    } 

    /**
     * Swap token to AVAX without the need to approve the first token
     */
    function swapNoSplitToAVAXWithPermit(
        Trade calldata _trade,
        address _to,
        uint _fee,
        uint _deadline, 
        uint8 _v,
        bytes32 _r, 
        bytes32 _s
    ) external {
        IERC20(_trade.path[0]).permit(
            msg.sender, 
            address(this), 
            _trade.amountIn, 
            _deadline, 
            _v, 
            _r, 
            _s
        );
        swapNoSplitToAVAX(_trade, _to, _fee);
    }

}

File 2 of 10 : BytesManipulation.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "./BytesToTypes.sol";

library BytesManipulation {

    function toBytes(uint256 x) internal pure returns (bytes memory b) {
        b = new bytes(32);
        assembly { mstore(add(b, 32), x) }
    }

    function toBytes(address x) internal pure returns (bytes memory b) {
        b = new bytes(32);
        assembly { mstore(add(b, 32), x) }
    }

    function mergeBytes(bytes memory a, bytes memory b) public pure returns (bytes memory c) {
        // From https://ethereum.stackexchange.com/a/40456
        uint alen = a.length;
        uint totallen = alen + b.length;
        uint loopsa = (a.length + 31) / 32;
        uint loopsb = (b.length + 31) / 32;
        assembly {
            let m := mload(0x40)
            mstore(m, totallen)
            for {  let i := 0 } lt(i, loopsa) { i := add(1, i) } { mstore(add(m, mul(32, add(1, i))), mload(add(a, mul(32, add(1, i))))) }
            for {  let i := 0 } lt(i, loopsb) { i := add(1, i) } { mstore(add(m, add(mul(32, add(1, i)), alen)), mload(add(b, mul(32, add(1, i))))) }
            mstore(0x40, add(m, add(32, totallen)))
            c := m
        }
    }

    function bytesToAddress(uint _offst, bytes memory _input) internal pure returns (address) {
        return BytesToTypes.bytesToAddress(_offst, _input);
    }

    function bytesToUint256(uint _offst, bytes memory _input) internal pure returns (uint256) {
        return BytesToTypes.bytesToUint256(_offst, _input);
    } 

}

File 3 of 10 : IAdapter.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

interface IAdapter {
    function name() external view returns (string memory);
    function swapGasEstimate() external view returns (uint);
    function swap(uint256, uint256, address, address, address) external;
    function query(uint256, address, address) external view returns (uint);
}

File 4 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

interface IERC20 {
    event Approval(address,address,uint);
    event Transfer(address,address,uint);
    function name() external view returns (string memory);
    function decimals() external view returns (uint8);
    function transferFrom(address,address,uint) external returns (bool);
    function allowance(address,address) external view returns (uint);
    function approve(address,uint) external returns (bool);
    function transfer(address,uint) external returns (bool);
    function balanceOf(address) external view returns (uint);
    function nonces(address) external view returns (uint);  // Only tokens that support permit
    function permit(address,address,uint256,uint256,uint8,bytes32,bytes32) external;  // Only tokens that support permit
    function swap(address,uint256) external;  // Only Avalanche bridge tokens 
    function swapSupply(address) external view returns (uint);  // Only Avalanche bridge tokens 
}

File 5 of 10 : IWETH.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "./IERC20.sol";

interface IWETH is IERC20 {
    function withdraw(uint256 amount) external;
    function deposit() external payable;
}

File 6 of 10 : SafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)

library SafeMath {
    function add(uint x, uint y) internal pure returns (uint z) {
        require((z = x + y) >= x, 'SafeMath: ds-math-add-overflow');
    }

    function sub(uint x, uint y) internal pure returns (uint z) {
        require((z = x - y) <= x, 'SafeMath: ds-math-sub-underflow');
    }

    function mul(uint x, uint y) internal pure returns (uint z) {
        require(y == 0 || (z = x * y) / y == x, 'SafeMath: ds-math-mul-overflow');
    }
}

File 7 of 10 : SafeERC20.sol
// This is a simplified version of OpenZepplin's SafeERC20 library
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;
pragma experimental ABIEncoderV2;

import "../interface/IERC20.sol";
import "./SafeMath.sol";


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

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

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

    /**
     * @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.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "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 8 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.7.0;

import "./Context.sol";
/**
 * @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 () {
        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 9 of 10 : BytesToTypes.sol
// From https://github.com/pouladzade/Seriality/blob/master/src/BytesToTypes.sol (Licensed under Apache2.0)

// SPDX-License-Identifier: Apache2.0
pragma solidity >=0.7.0;

library BytesToTypes {

    function bytesToAddress(uint _offst, bytes memory _input) internal pure returns (address _output) {
        
        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint256(uint _offst, bytes memory _input) internal pure returns (uint256 _output) {
        
        assembly {
            _output := mload(add(_input, _offst))
        }
    } 
}

File 10 of 10 : Context.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.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 payable(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;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 999
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {
    "contracts/lib/BytesManipulation.sol": {
      "BytesManipulation": "0xdd892a0b5bcfd435489e31d8e2ec9c9b83f85977"
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address[]","name":"_adapters","type":"address[]"},{"internalType":"address[]","name":"_trustedTokens","type":"address[]"},{"internalType":"address","name":"_feeClaimer","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"_newAdapters","type":"address[]"}],"name":"UpdatedAdapters","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_oldFeeClaimer","type":"address"},{"indexed":false,"internalType":"address","name":"_newFeeClaimer","type":"address"}],"name":"UpdatedFeeClaimer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_oldMinFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newMinFee","type":"uint256"}],"name":"UpdatedMinFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"_newTrustedTokens","type":"address[]"}],"name":"UpdatedTrustedTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_tokenIn","type":"address"},{"indexed":true,"internalType":"address","name":"_tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountOut","type":"uint256"}],"name":"YakSwap","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ADAPTERS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"AVAX","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_CLAIMER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"TRUSTED_TOKENS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WAVAX","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adaptersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"},{"internalType":"uint256","name":"_maxSteps","type":"uint256"}],"name":"findBestPath","outputs":[{"components":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address[]","name":"adapters","type":"address[]"},{"internalType":"address[]","name":"path","type":"address[]"}],"internalType":"struct YakRouter.FormattedOffer","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"},{"internalType":"uint256","name":"_maxSteps","type":"uint256"},{"internalType":"uint256","name":"_gasPrice","type":"uint256"}],"name":"findBestPathWithGas","outputs":[{"components":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address[]","name":"adapters","type":"address[]"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"internalType":"struct YakRouter.FormattedOfferWithGas","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"},{"internalType":"uint8","name":"_index","type":"uint8"}],"name":"queryAdapter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"},{"internalType":"uint8[]","name":"_options","type":"uint8[]"}],"name":"queryNoSplit","outputs":[{"components":[{"internalType":"address","name":"adapter","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"internalType":"struct YakRouter.Query","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"}],"name":"queryNoSplit","outputs":[{"components":[{"internalType":"address","name":"adapter","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"internalType":"struct YakRouter.Query","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverAVAX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_adapters","type":"address[]"}],"name":"setAdapters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_claimer","type":"address"}],"name":"setFeeClaimer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setMinFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_trustedTokens","type":"address[]"}],"name":"setTrustedTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address[]","name":"adapters","type":"address[]"}],"internalType":"struct YakRouter.Trade","name":"_trade","type":"tuple"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"swapNoSplit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address[]","name":"adapters","type":"address[]"}],"internalType":"struct YakRouter.Trade","name":"_trade","type":"tuple"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"swapNoSplitFromAVAX","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address[]","name":"adapters","type":"address[]"}],"internalType":"struct YakRouter.Trade","name":"_trade","type":"tuple"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"swapNoSplitToAVAX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address[]","name":"adapters","type":"address[]"}],"internalType":"struct YakRouter.Trade","name":"_trade","type":"tuple"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"swapNoSplitToAVAXWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address[]","name":"adapters","type":"address[]"}],"internalType":"struct YakRouter.Trade","name":"_trade","type":"tuple"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"swapNoSplitWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"trustedTokensCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405260006001553480156200001657600080fd5b5060405162003f2638038062003f26833981016040819052620000399162000662565b600062000045620000c3565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506200009a82620000c7565b620000a58162000181565b620000b08362000254565b620000ba6200030a565b505050620008b7565b3390565b620000d1620000c3565b6001600160a01b0316620000e46200033b565b6001600160a01b0316146200012f576040805162461bcd60e51b8152602060048201819052602482015260008051602062003f06833981519152604482015290519081900360640190fd5b7f658ff1688002926d8f426cb10c052ec29003f50042df9652d8613484c1a58647816040516200016091906200078c565b60405180910390a180516200017d9060039060208401906200052a565b5050565b6200018b620000c3565b6001600160a01b03166200019e6200033b565b6001600160a01b031614620001e9576040805162461bcd60e51b8152602060048201819052602482015260008051602062003f06833981519152604482015290519081900360640190fd5b6002546040517fb2c853ac4d80d18d058c43d8018d077a036e542a79acae1647f5ad2a8c76f4e2916200022a916001600160a01b0390911690849062000759565b60405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b6200025e620000c3565b6001600160a01b0316620002716200033b565b6001600160a01b031614620002bc576040805162461bcd60e51b8152602060048201819052602482015260008051602062003f06833981519152604482015290519081900360640190fd5b7febf7325f48e05e5e38809c69f8b02a7c907ed31d8768e6c2d841b1296a9225fe81604051620002ed91906200078c565b60405180910390a180516200017d9060049060208401906200052a565b6200033973b31f66aa3c1e785363f0875a1b74e27b85fd66c7806000196200034a602090811b6200147f17901c565b565b6000546001600160a01b031690565b801580620003d95750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e9062000383903090869060040162000759565b60206040518083038186803b1580156200039c57600080fd5b505afa158015620003b1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003d7919062000704565b155b620004015760405162461bcd60e51b8152600401620003f8906200085a565b60405180910390fd5b6200045c8363095ea7b360e01b84846040516024016200042392919062000773565b60408051808303601f190181529190526020810180516001600160e01b0319939093166001600160e01b03938416179052906200046116565b505050565b600080836001600160a01b0316836040516200047e91906200071d565b6000604051808303816000865af19150503d8060008114620004bd576040519150601f19603f3d011682016040523d82523d6000602084013e620004c2565b606091505b509150915081620004e75760405162461bcd60e51b8152600401620003f890620007db565b805115620005245780806020019051810190620005059190620006db565b620005245760405162461bcd60e51b8152600401620003f89062000810565b50505050565b82805482825590600052602060002090810192821562000582579160200282015b828111156200058257825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200054b565b506200059092915062000594565b5090565b5b8082111562000590576000815560010162000595565b80516001600160a01b0381168114620005c357600080fd5b919050565b600082601f830112620005d9578081fd5b815160206001600160401b0380831115620005f057fe5b818302604051838282010181811084821117156200060a57fe5b6040528481528381019250868401828801850189101562000629578687fd5b8692505b8583101562000656576200064181620005ab565b8452928401926001929092019184016200062d565b50979650505050505050565b60008060006060848603121562000677578283fd5b83516001600160401b03808211156200068e578485fd5b6200069c87838801620005c8565b94506020860151915080821115620006b2578384fd5b50620006c186828701620005c8565b925050620006d260408501620005ab565b90509250925092565b600060208284031215620006ed578081fd5b81518015158114620006fd578182fd5b9392505050565b60006020828403121562000716578081fd5b5051919050565b60008251815b818110156200073f576020818601810151858301520162000723565b818111156200074e5782828501525b509190910192915050565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015620007cf5783516001600160a01b031683529284019291840191600101620007a8565b50909695505050505050565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606082015260800190565b61363f80620008c76000396000f3fe6080604052600436106101c55760003560e01c80637c7a561b116100f7578063b59f091e11610095578063dede7f1511610064578063dede7f15146104dc578063f0350382146104fc578063f2fde38b1461051c578063fe38c5e61461053c576101cc565b8063b59f091e14610472578063c3accd4814610487578063c8a3a5c6146104a7578063d73792a9146104c7576101cc565b80638da5cb5b116100d15780638da5cb5b146103ee57806392f5d88a14610403578063952e901214610430578063a3f4df7e14610450576101cc565b80637c7a561b14610399578063809356aa146103ae5780638980f11f146103ce576101cc565b806352a52ab01161016457806373b295c21161013e57806373b295c21461032d57806375d199471461034257806376c7a3c71461036257806376ebe69c14610384576101cc565b806352a52ab0146102d85780636bf2df86146102f8578063715018a614610318576101cc565b806331ac9920116101a057806331ac99201461024b5780633a9a40811461026b5780634c09cf4e1461028b5780634ebb7916146102b8576101cc565b8062b99e36146101d1578063061b15e7146101fc5780631e189dc214610229576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101e661054f565b6040516101f39190613030565b60405180910390f35b34801561020857600080fd5b5061021c610217366004612ec3565b61055e565b6040516101f391906133db565b34801561023557600080fd5b50610249610244366004612cfa565b610679565b005b34801561025757600080fd5b50610249610266366004612d7d565b610727565b34801561027757600080fd5b50610249610286366004612b5c565b6107db565b34801561029757600080fd5b506102ab6102a6366004612e80565b61089d565b6040516101f3919061344a565b3480156102c457600080fd5b506102496102d3366004612d7d565b610944565b3480156102e457600080fd5b506101e66102f3366004612d7d565b610a4b565b34801561030457600080fd5b50610249610313366004612ca5565b610a75565b34801561032457600080fd5b50610249610a87565b34801561033957600080fd5b506101e6610b52565b34801561034e57600080fd5b5061024961035d366004612cfa565b610b6a565b34801561036e57600080fd5b50610377610c0f565b6040516101f391906134e1565b34801561039057600080fd5b50610377610c15565b3480156103a557600080fd5b50610377610c1b565b3480156103ba57600080fd5b506103776103c9366004612f10565b610c21565b3480156103da57600080fd5b506102496103e9366004612b33565b610cce565b3480156103fa57600080fd5b506101e6610dbb565b34801561040f57600080fd5b5061042361041e366004612de8565b610dca565b6040516101f391906134a2565b34801561043c57600080fd5b506101e661044b366004612d7d565b610f1a565b34801561045c57600080fd5b50610465610f2a565b6040516101f3919061311d565b34801561047e57600080fd5b506101e6610f63565b34801561049357600080fd5b506102496104a2366004612b19565b610f68565b3480156104b357600080fd5b506102496104c2366004612b5c565b611052565b3480156104d357600080fd5b50610377611110565b3480156104e857600080fd5b506104236104f7366004612dad565b611116565b34801561050857600080fd5b50610249610517366004612ca5565b611243565b34801561052857600080fd5b50610249610537366004612b19565b6112e0565b61024961054a366004612ca5565b611401565b6002546001600160a01b031681565b6105666129e3565b6000831180156105765750600583105b61059b5760405162461bcd60e51b815260040161059290613130565b60405180910390fd5b6105a36129e3565b6105ac876115c4565b81526105b7866115c4565b604082015260006105e7670de0b6b3a764000073b31f66aa3c1e785363f0875a1b74e27b85fd66c788600261089d565b90506000610621633b9aca0086845180519290910491600019810190811061060b57fe5b60200260200101516115ee90919063ffffffff16565b9050610631898989898786611660565b925082602001515160001415610663576040805160208082018352600080835291865282519081018352908152908401525b61066c83611974565b9998505050505050505050565b6106866040880188613545565b600081811061069157fe5b90506020020160208101906106a69190612b19565b60405163d505accf60e01b81526001600160a01b03919091169063d505accf906106e190339030908c35908a908a908a908a90600401613044565b600060405180830381600087803b1580156106fb57600080fd5b505af115801561070f573d6000803e3d6000fd5b5050505061071e878787611243565b50505050505050565b61072f6119cd565b6001600160a01b0316610740610dbb565b6001600160a01b03161461079b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f4bb8a6184424e4bb853a4836042f5a726e4e710873989bfc6abdab19966f5b70600154826040516107ce929190613509565b60405180910390a1600155565b6107e36119cd565b6001600160a01b03166107f4610dbb565b6001600160a01b03161461084f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7febf7325f48e05e5e38809c69f8b02a7c907ed31d8768e6c2d841b1296a9225fe8160405161087e91906130dc565b60405180910390a18051610899906004906020840190612a0b565b5050565b6108a5612a7d565b6000821180156108b55750600582105b6108d15760405162461bcd60e51b815260040161059290613130565b6108d9612a7d565b6108e2866115c4565b81526108ed856115c4565b60408201526108ff86868686856119d1565b905080602001515160001415610931576040805160208082018352600080835291845282519081018352908152908201525b61093a81611b7b565b9695505050505050565b61094c6119cd565b6001600160a01b031661095d610dbb565b6001600160a01b0316146109b8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600081116109d85760405162461bcd60e51b8152600401610592906133a4565b604051339082156108fc029083906000818181858888f19350505050158015610a05573d6000803e3d6000fd5b5060006001600160a01b03167f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa2882604051610a4091906134e1565b60405180910390a250565b60038181548110610a5b57600080fd5b6000918252602090912001546001600160a01b0316905081565b610a8183338484611bc7565b50505050565b610a8f6119cd565b6001600160a01b0316610aa0610dbb565b6001600160a01b031614610afb576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b73b31f66aa3c1e785363f0875a1b74e27b85fd66c781565b610b776040880188613545565b6000818110610b8257fe5b9050602002016020810190610b979190612b19565b60405163d505accf60e01b81526001600160a01b03919091169063d505accf90610bd290339030908c35908a908a908a908a90600401613044565b600060405180830381600087803b158015610bec57600080fd5b505af1158015610c00573d6000803e3d6000fd5b5050505061071e878787610a75565b60015481565b60035490565b60045490565b60008060048360ff1681548110610c3457fe5b60009182526020822001546040516377ccc49d60e11b81526001600160a01b039091169250829063ef99893a90610c73908a908a908a906004016134ea565b60206040518083038186803b158015610c8b57600080fd5b505afa158015610c9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc39190612d95565b979650505050505050565b610cd66119cd565b6001600160a01b0316610ce7610dbb565b6001600160a01b031614610d42576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60008111610d625760405162461bcd60e51b8152600401610592906133a4565b610d766001600160a01b0383163383612165565b816001600160a01b03167f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa2882604051610daf91906134e1565b60405180910390a25050565b6000546001600160a01b031690565b610dd2612a9e565b610dda612a9e565b60005b60ff8116841115610f0f576000600486868460ff16818110610dfb57fe5b9050602002016020810190610e109190612f5c565b60ff1681548110610e1d57fe5b60009182526020822001546040516377ccc49d60e11b81526001600160a01b039091169250829063ef99893a90610e5c908d908d908d906004016134ea565b60206040518083038186803b158015610e7457600080fd5b505afa158015610e88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eac9190612d95565b905060ff83161580610ec15750836060015181115b15610f05576040518060800160405280836001600160a01b031681526020018a6001600160a01b03168152602001896001600160a01b031681526020018281525093505b5050600101610ddd565b509695505050505050565b60048181548110610a5b57600080fd5b6040518060400160405280600981526020017f59616b526f75746572000000000000000000000000000000000000000000000081525081565b600081565b610f706119cd565b6001600160a01b0316610f81610dbb565b6001600160a01b031614610fdc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6002546040517fb2c853ac4d80d18d058c43d8018d077a036e542a79acae1647f5ad2a8c76f4e29161101b916001600160a01b03909116908490613085565b60405180910390a16002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b61105a6119cd565b6001600160a01b031661106b610dbb565b6001600160a01b0316146110c6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f658ff1688002926d8f426cb10c052ec29003f50042df9652d8613484c1a58647816040516110f591906130dc565b60405180910390a18051610899906003906020840190612a0b565b61271081565b61111e612a9e565b611126612a9e565b60005b60045460ff8216101561123a57600060048260ff168154811061114857fe5b60009182526020822001546040516377ccc49d60e11b81526001600160a01b039091169250829063ef99893a90611187908b908b908b906004016134ea565b60206040518083038186803b15801561119f57600080fd5b505afa1580156111b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d79190612d95565b905060ff831615806111ec5750836060015181115b15611230576040518060800160405280836001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b031681526020018281525093505b5050600101611129565b50949350505050565b73b31f66aa3c1e785363f0875a1b74e27b85fd66c76112656040850185613545565b60016112746040880188613545565b90500381811061128057fe5b90506020020160208101906112959190612b19565b6001600160a01b0316146112bb5760405162461bcd60e51b815260040161059290613167565b60006112c984333085611bc7565b90506112d481612184565b610a8160008285612209565b6112e86119cd565b6001600160a01b03166112f9610dbb565b6001600160a01b031614611354576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166113995760405162461bcd60e51b81526004018080602001828103825260268152602001806135e46026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b73b31f66aa3c1e785363f0875a1b74e27b85fd66c76114236040850185613545565b600081811061142e57fe5b90506020020160208101906114439190612b19565b6001600160a01b0316146114695760405162461bcd60e51b8152600401610592906131f9565b6114738335612277565b610a8183308484611bc7565b80158061152057506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b0384169063dd62ed3e906114ce9030908690600401613085565b60206040518083038186803b1580156114e657600080fd5b505afa1580156114fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151e9190612d95565b155b61153c5760405162461bcd60e51b815260040161059290613347565b6115bf8363095ea7b360e01b848460405160240161155b9291906130c3565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526122e2565b505050565b60408051602080825281830190925260609160208201818036833750505060208101929092525090565b60008115806116095750508082028282828161160657fe5b04145b61165a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a2064732d6d6174682d6d756c2d6f766572666c6f770000604482015290519081900360640190fd5b92915050565b6116686129e3565b600061167384612398565b90506000806116838a8a8a611116565b9050806060015160001461172c57600081600001516001600160a01b03166369cff80d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116d057600080fd5b505afa1580156116e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117089190612d95565b905061172384836060015184600001518560400151856123d8565b81606001519250505b60018711801561174e57506002870360208760200151518161174a57fe5b0411155b156119665760005b600354811015611964576003818154811061176d57fe5b6000918252602090912001546001600160a01b038b8116911614156117915761195c565b60006117bf8c8c600385815481106117a557fe5b6000918252602090912001546001600160a01b0316611116565b90508060600151600014156117d4575061195c565b60006117df89612398565b9050600082600001516001600160a01b03166369cff80d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561182057600080fd5b505afa158015611834573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118589190612d95565b905061187382846060015185600001518660400151856123d8565b6118a683606001516003868154811061188857fe5b6000918252602090912001546001600160a01b03168e8e868e611660565b915060006118bd83604001515184604001516125c2565b835180519192506000916118d0916125c2565b9050816001600160a01b03168e6001600160a01b03161480156118f257508781115b156119565788606001518460600151111561194f576000633b9aca0061192b8b606001518760600151038e6115ee90919063ffffffff16565b8161193257fe5b0490508882038082111561194c575050505050505061195c565b50505b8097508398505b50505050505b600101611756565b505b509098975050505050505050565b61197c6129e3565b604051806080016040528061199484600001516125d5565b81526020016119a6846020015161266f565b81526020016119b8846040015161266f565b8152602001836060015181525090505b919050565b3390565b6119d9612a7d565b60006119e48361270e565b90506000806119f4898989611116565b90508060600151600014611a2257611a1a8382606001518360000151846040015161273a565b806060015191505b600186118015611a44575060028603602086602001515181611a4057fe5b0411155b15611b6e5760005b600354811015611b6c5760038181548110611a6357fe5b6000918252602090912001546001600160a01b038a811691161415611a8757611b64565b6000611a9b8b8b600385815481106117a557fe5b9050806060015160001415611ab05750611b64565b6000611abb8861270e565b9050611ad58183606001518460000151856040015161273a565b611b07826060015160038581548110611aea57fe5b6000918252602090912001546001600160a01b03168c8c856119d1565b90506000611b1e82604001515183604001516125c2565b82518051919250600091611b31916125c2565b9050816001600160a01b03168c6001600160a01b0316148015611b5357508681115b15611b5f578096508297505b505050505b600101611a4c565b505b5090979650505050505050565b611b83612a7d565b6040518060600160405280611b9b84600001516125d5565b8152602001611bad846020015161266f565b8152602001611bbf846040015161266f565b905292915050565b600080611bd76040870187613545565b905067ffffffffffffffff81118015611bef57600080fd5b50604051908082528060200260200182016040528015611c19578160200160208202803683370190505b5090506000831180611c2d57506000600154115b15611cde57611c3d86358461291b565b81600081518110611c4a57fe5b602002602001018181525050611cd985600260009054906101000a90046001600160a01b0316611c9b84600081518110611c8057fe5b60200260200101518a6000013561296590919063ffffffff16565b611ca860408b018b613545565b6000818110611cb357fe5b9050602002016020810190611cc89190612b19565b6001600160a01b03169291906129bd565b611cfd565b856000013581600081518110611cf057fe5b6020026020010181815250505b611d5385611d0e6060890189613545565b6000818110611d1957fe5b9050602002016020810190611d2e9190612b19565b83600081518110611d3b57fe5b6020026020010151898060400190611ca89190613545565b60005b611d636060880188613545565b9050811015611ea857611d796060880188613545565b82818110611d8357fe5b9050602002016020810190611d989190612b19565b6001600160a01b031663ef99893a838381518110611db257fe5b6020026020010151898060400190611dca9190613545565b85818110611dd457fe5b9050602002016020810190611de99190612b19565b611df660408c018c613545565b86600101818110611e0357fe5b9050602002016020810190611e189190612b19565b6040518463ffffffff1660e01b8152600401611e36939291906134ea565b60206040518083038186803b158015611e4e57600080fd5b505afa158015611e62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e869190612d95565b828260010181518110611e9557fe5b6020908102919091010152600101611d56565b50856020013581600183510381518110611ebe57fe5b60200260200101511015611ee45760405162461bcd60e51b8152600401610592906132ea565b60005b611ef46060880188613545565b90508110156120715760006001611f0e60608a018a613545565b9050038210611f1d5785611f4c565b611f2a6060890189613545565b83600101818110611f3757fe5b9050602002016020810190611f4c9190612b19565b9050611f5b6060890189613545565b83818110611f6557fe5b9050602002016020810190611f7a9190612b19565b6001600160a01b031663eab90da6848481518110611f9457fe5b6020026020010151858560010181518110611fab57fe5b60200260200101518b8060400190611fc39190613545565b87818110611fcd57fe5b9050602002016020810190611fe29190612b19565b611fef60408e018e613545565b88600101818110611ffc57fe5b90506020020160208101906120119190612b19565b866040518663ffffffff1660e01b8152600401612032959493929190613517565b600060405180830381600087803b15801561204c57600080fd5b505af1158015612060573d6000803e3d6000fd5b505060019093019250611ee7915050565b5061207f6040870187613545565b600161208e60408a018a613545565b90500381811061209a57fe5b90506020020160208101906120af9190612b19565b6001600160a01b03166120c56040880188613545565b60008181106120d057fe5b90506020020160208101906120e59190612b19565b6001600160a01b03167f9fc8352e52998db4087d5e6e1c1aafa38788e749e5d7a24f5cb230f73795440288600001358460018651038151811061212457fe5b602002602001015160405161213a929190613509565b60405180910390a38060018251038151811061215257fe5b6020026020010151915050949350505050565b6115bf8363a9059cbb60e01b848460405160240161155b9291906130c3565b6040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273b31f66aa3c1e785363f0875a1b74e27b85fd66c790632e1a7d4d906121d49084906004016134e1565b600060405180830381600087803b1580156121ee57600080fd5b505af1158015612202573d6000803e3d6000fd5b5050505050565b306001600160a01b038216146115bf576001600160a01b038316612263576040516001600160a01b0382169083156108fc029084906000818181858888f1935050505015801561225d573d6000803e3d6000fd5b506115bf565b6115bf6001600160a01b0384168284612165565b73b31f66aa3c1e785363f0875a1b74e27b85fd66c76001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156122c657600080fd5b505af11580156122da573d6000803e3d6000fd5b505050505050565b600080836001600160a01b0316836040516122fd9190613014565b6000604051808303816000865af19150503d806000811461233a576040519150601f19603f3d011682016040523d82523d6000602084013e61233f565b606091505b5091509150816123615760405162461bcd60e51b8152600401610592906131c4565b805115610a81578080602001905181019061237c9190612c04565b610a815760405162461bcd60e51b81526004016105929061328d565b6123a06129e3565b604051806080016040528083600001518152602001836020015181526020018360400151815260200183606001518152509050919050565b73dd892a0b5bcfd435489e31d8e2ec9c9b83f85977632f9680f58660400151612400856115c4565b6040518363ffffffff1660e01b815260040161241d9291906130ef565b60006040518083038186803b15801561243557600080fd5b505af4158015612449573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526124719190810190612c24565b6040860152845173dd892a0b5bcfd435489e31d8e2ec9c9b83f8597790632f9680f59061249d876115c4565b6040518363ffffffff1660e01b81526004016124ba9291906130ef565b60006040518083038186803b1580156124d257600080fd5b505af41580156124e6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261250e9190810190612c24565b8552602085015173dd892a0b5bcfd435489e31d8e2ec9c9b83f8597790632f9680f59061253a866115c4565b6040518363ffffffff1660e01b81526004016125579291906130ef565b60006040518083038186803b15801561256f57600080fd5b505af4158015612583573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526125ab9190810190612c24565b602086015260609094018051909401909352505050565b60006125ce83836129de565b9392505050565b6060600060208351816125e457fe5b04905060008167ffffffffffffffff8111801561260057600080fd5b5060405190808252806020026020018201604052801561262a578160200160208202803683370190505b50905060005b828110156126675761264881602002602001866125c2565b82828151811061265457fe5b6020908102919091010152600101612630565b509392505050565b60606000602083518161267e57fe5b04905060008167ffffffffffffffff8111801561269a57600080fd5b506040519080825280602002602001820160405280156126c4578160200160208202803683370190505b50905060005b82811015612667576126e281602002602001866125c2565b8282815181106126ee57fe5b6001600160a01b03909216602092830291909101909101526001016126ca565b612716612a7d565b50604080516060810182528251815260208084015190820152918101519082015290565b73dd892a0b5bcfd435489e31d8e2ec9c9b83f85977632f9680f58560400151612762846115c4565b6040518363ffffffff1660e01b815260040161277f9291906130ef565b60006040518083038186803b15801561279757600080fd5b505af41580156127ab573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526127d39190810190612c24565b6040850152835173dd892a0b5bcfd435489e31d8e2ec9c9b83f8597790632f9680f5906127ff866115c4565b6040518363ffffffff1660e01b815260040161281c9291906130ef565b60006040518083038186803b15801561283457600080fd5b505af4158015612848573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526128709190810190612c24565b8452602084015173dd892a0b5bcfd435489e31d8e2ec9c9b83f8597790632f9680f59061289c856115c4565b6040518363ffffffff1660e01b81526004016128b99291906130ef565b60006040518083038186803b1580156128d157600080fd5b505af41580156128e5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261290d9190810190612c24565b846020018190525050505050565b600060015482101561293f5760405162461bcd60e51b815260040161059290613256565b61271061295661294f8285612965565b85906115ee565b8161295d57fe5b049392505050565b8082038281111561165a576040805162461bcd60e51b815260206004820152601f60248201527f536166654d6174683a2064732d6d6174682d7375622d756e646572666c6f7700604482015290519081900360640190fd5b610a81846323b872dd60e01b85858560405160240161155b9392919061309f565b015190565b6040518060800160405280606081526020016060815260200160608152602001600081525090565b828054828255906000526020600020908101928215612a6d579160200282015b82811115612a6d578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190612a2b565b50612a79929150612ac5565b5090565b60405180606001604052806060815260200160608152602001606081525090565b60408051608081018252600080825260208201819052918101829052606081019190915290565b5b80821115612a795760008155600101612ac6565b80356001600160a01b03811681146119c857600080fd5b600060808284031215612b02578081fd5b50919050565b803560ff811681146119c857600080fd5b600060208284031215612b2a578081fd5b6125ce82612ada565b60008060408385031215612b45578081fd5b612b4e83612ada565b946020939093013593505050565b60006020808385031215612b6e578182fd5b823567ffffffffffffffff80821115612b85578384fd5b818501915085601f830112612b98578384fd5b813581811115612ba457fe5b8381029150612bb4848301613593565b8181528481019084860184860187018a1015612bce578788fd5b8795505b83861015612bf757612be381612ada565b835260019590950194918601918601612bd2565b5098975050505050505050565b600060208284031215612c15578081fd5b815180151581146125ce578182fd5b600060208284031215612c35578081fd5b815167ffffffffffffffff80821115612c4c578283fd5b818401915084601f830112612c5f578283fd5b815181811115612c6b57fe5b612c7e601f8201601f1916602001613593565b9150808252856020828501011115612c94578384fd5b61123a8160208401602086016135b7565b600080600060608486031215612cb9578081fd5b833567ffffffffffffffff811115612ccf578182fd5b612cdb86828701612af1565b935050612cea60208501612ada565b9150604084013590509250925092565b600080600080600080600060e0888a031215612d14578283fd5b873567ffffffffffffffff811115612d2a578384fd5b612d368a828b01612af1565b975050612d4560208901612ada565b95506040880135945060608801359350612d6160808901612b08565b925060a0880135915060c0880135905092959891949750929550565b600060208284031215612d8e578081fd5b5035919050565b600060208284031215612da6578081fd5b5051919050565b600080600060608486031215612dc1578283fd5b83359250612dd160208501612ada565b9150612ddf60408501612ada565b90509250925092565b600080600080600060808688031215612dff578081fd5b85359450612e0f60208701612ada565b9350612e1d60408701612ada565b9250606086013567ffffffffffffffff80821115612e39578283fd5b818801915088601f830112612e4c578283fd5b813581811115612e5a578384fd5b8960208083028501011115612e6d578384fd5b9699959850939650602001949392505050565b60008060008060808587031215612e95578182fd5b84359350612ea560208601612ada565b9250612eb360408601612ada565b9396929550929360600135925050565b600080600080600060a08688031215612eda578283fd5b85359450612eea60208701612ada565b9350612ef860408701612ada565b94979396509394606081013594506080013592915050565b60008060008060808587031215612f25578182fd5b84359350612f3560208601612ada565b9250612f4360408601612ada565b9150612f5160608601612b08565b905092959194509250565b600060208284031215612f6d578081fd5b6125ce82612b08565b6000815180845260208085019450808401835b83811015612fae5781516001600160a01b031687529582019590820190600101612f89565b509495945050505050565b6000815180845260208085019450808401835b83811015612fae57815187529582019590820190600101612fcc565b600081518084526130008160208601602086016135b7565b601f01601f19169290920160200192915050565b600082516130268184602087016135b7565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6000602082526125ce6020830184612f76565b6000604082526131026040830185612fe8565b82810360208401526131148185612fe8565b95945050505050565b6000602082526125ce6020830184612fe8565b6020808252601c908201527f59616b526f757465723a20496e76616c6964206d61782d737465707300000000604082015260600190565b60208082526027908201527f59616b526f757465723a2050617468206e6565647320746f20656e642077697460408201527f6820574156415800000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b60208082526029908201527f59616b526f757465723a2050617468206e6565647320746f20626567696e207760408201527f6974682057415641580000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f59616b526f757465723a20496e73756666696369656e74206665650000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f59616b526f757465723a20496e73756666696369656e74206f7574707574206160408201527f6d6f756e74000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606082015260800190565b6020808252601d908201527f59616b526f757465723a204e6f7468696e6720746f207265636f766572000000604082015260600190565b6000602082528251608060208401526133f760a0840182612fb9565b90506020840151601f19808584030160408601526134158383612f76565b92506040860151915080858403016060860152506134338282612f76565b915050606084015160808401528091505092915050565b6000602082528251606060208401526134666080840182612fb9565b90506020840151601f19808584030160408601526134848383612f76565b92506040860151915080858403016060860152506131148282612f76565b60006080820190506001600160a01b03808451168352806020850151166020840152806040850151166040840152506060830151606083015292915050565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b918252602082015260400190565b94855260208501939093526001600160a01b0391821660408501528116606084015216608082015260a00190565b6000808335601e1984360301811261355b578283fd5b83018035915067ffffffffffffffff821115613575578283fd5b602090810192508102360382131561358c57600080fd5b9250929050565b60405181810167ffffffffffffffff811182821017156135af57fe5b604052919050565b60005b838110156135d25781810151838201526020016135ba565b83811115610a81575050600091015256fe4f776e61626c653a204e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122014d4243511c7a7f7eaba29e8955fce816e35029facf35d20bf00759818ca438664736f6c634300070600334f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000d22044706dea3c342f68396bedbcf6a2536d951d00000000000000000000000000000000000000000000000000000000000000190000000000000000000000003614657edc3cb90ba420e5f4f61679777e4974e30000000000000000000000003f314530a4964acca1f20dad2d35275c23ed7f5d00000000000000000000000017c452a812ebdbf36df61b0103b62fa6c46f4475000000000000000000000000a5e0b490be8a2f8281e09d5920953c65e803a1dc0000000000000000000000005dda78a87c6c9131c07081e0fd49c432884e9db10000000000000000000000001753199414f075c6d6bb41699381b2415957dac7000000000000000000000000a2cf5836ecf2da58cda01690feb644800c22b896000000000000000000000000960c437f0ed35ddfdb7797ca77a0aceb65f667510000000000000000000000002296706d53e6522942e8714bdbc2e50625c5d4d40000000000000000000000004884e64d9ae8e00e9da80f0b7791c998ac8828b7000000000000000000000000592e3d359e4a8ed5f08f38806b1b7f70aa3db4f200000000000000000000000087e6989a7ab5c707608fd6773fe32413871f4c8e000000000000000000000000599610cf20379b5d21a4a3ea84cb76e0f2a5f70f0000000000000000000000001276350e5855b2bcd089722a678c7d16f3ab5923000000000000000000000000b2e51d2e2b85dbbe8c758c753b5bda3f86af05e40000000000000000000000004e5a8d1eb5250c766ad55ee18314a76fcb92a8670000000000000000000000002bc16c1d9a5e6af362277ed424130cc6b2dde2d9000000000000000000000000db66686ac8bea67400cf9e5dd6c8849575b90148000000000000000000000000d311f964dd5bb5ecbd971592e845b0fb74c98b39000000000000000000000000364fd64a98bd60aa798ea8c61bb30d404102e9000000000000000000000000000ef5922f909374ccd7841a81f44ab109648b7ba50000000000000000000000009a76d67e67ae285856846c2fa080adece60cfc9a0000000000000000000000006e73f353e4ae3e5005daad619f22d7c7b790c4f3000000000000000000000000273fca9cd4c4873efc303b0b61b5e5cb35cd9a700000000000000000000000005bacf41d5d6b16183c2b980bce0fbbe5ea125d2f000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c700000000000000000000000049d5c2bdffac6ce2bfdb6640f4f80f226bc10bab000000000000000000000000c7198437980c041c805a1edcba50c1ce5db95118000000000000000000000000a7d7079b0fead91f3e65f86e8915cb59c1a4c664000000000000000000000000d586e7f844cea2f87f50152665bcbc2c279d8d7000000000000000000000000050b7545627a5162f82a992c33b87adc75187b2180000000000000000000000005947bb275c521040051d82396192181b413227a300000000000000000000000060781c2586d68229fde47564546784ab3faca9820000000000000000000000006e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd000000000000000000000000e896cdeaac9615145c0ca09c8cd5c25bced6384c000000000000000000000000c38f41a296a4493ff429f1238e030924a1542e50

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000d22044706dea3c342f68396bedbcf6a2536d951d00000000000000000000000000000000000000000000000000000000000000190000000000000000000000003614657edc3cb90ba420e5f4f61679777e4974e30000000000000000000000003f314530a4964acca1f20dad2d35275c23ed7f5d00000000000000000000000017c452a812ebdbf36df61b0103b62fa6c46f4475000000000000000000000000a5e0b490be8a2f8281e09d5920953c65e803a1dc0000000000000000000000005dda78a87c6c9131c07081e0fd49c432884e9db10000000000000000000000001753199414f075c6d6bb41699381b2415957dac7000000000000000000000000a2cf5836ecf2da58cda01690feb644800c22b896000000000000000000000000960c437f0ed35ddfdb7797ca77a0aceb65f667510000000000000000000000002296706d53e6522942e8714bdbc2e50625c5d4d40000000000000000000000004884e64d9ae8e00e9da80f0b7791c998ac8828b7000000000000000000000000592e3d359e4a8ed5f08f38806b1b7f70aa3db4f200000000000000000000000087e6989a7ab5c707608fd6773fe32413871f4c8e000000000000000000000000599610cf20379b5d21a4a3ea84cb76e0f2a5f70f0000000000000000000000001276350e5855b2bcd089722a678c7d16f3ab5923000000000000000000000000b2e51d2e2b85dbbe8c758c753b5bda3f86af05e40000000000000000000000004e5a8d1eb5250c766ad55ee18314a76fcb92a8670000000000000000000000002bc16c1d9a5e6af362277ed424130cc6b2dde2d9000000000000000000000000db66686ac8bea67400cf9e5dd6c8849575b90148000000000000000000000000d311f964dd5bb5ecbd971592e845b0fb74c98b39000000000000000000000000364fd64a98bd60aa798ea8c61bb30d404102e9000000000000000000000000000ef5922f909374ccd7841a81f44ab109648b7ba50000000000000000000000009a76d67e67ae285856846c2fa080adece60cfc9a0000000000000000000000006e73f353e4ae3e5005daad619f22d7c7b790c4f3000000000000000000000000273fca9cd4c4873efc303b0b61b5e5cb35cd9a700000000000000000000000005bacf41d5d6b16183c2b980bce0fbbe5ea125d2f000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c700000000000000000000000049d5c2bdffac6ce2bfdb6640f4f80f226bc10bab000000000000000000000000c7198437980c041c805a1edcba50c1ce5db95118000000000000000000000000a7d7079b0fead91f3e65f86e8915cb59c1a4c664000000000000000000000000d586e7f844cea2f87f50152665bcbc2c279d8d7000000000000000000000000050b7545627a5162f82a992c33b87adc75187b2180000000000000000000000005947bb275c521040051d82396192181b413227a300000000000000000000000060781c2586d68229fde47564546784ab3faca9820000000000000000000000006e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd000000000000000000000000e896cdeaac9615145c0ca09c8cd5c25bced6384c000000000000000000000000c38f41a296a4493ff429f1238e030924a1542e50

-----Decoded View---------------
Arg [0] : _adapters (address[]): 0x3614657edc3cb90ba420e5f4f61679777e4974e3,0x3f314530a4964acca1f20dad2d35275c23ed7f5d,0x17c452a812ebdbf36df61b0103b62fa6c46f4475,0xa5e0b490be8a2f8281e09d5920953c65e803a1dc,0x5dda78a87c6c9131c07081e0fd49c432884e9db1,0x1753199414f075c6d6bb41699381b2415957dac7,0xa2cf5836ecf2da58cda01690feb644800c22b896,0x960c437f0ed35ddfdb7797ca77a0aceb65f66751,0x2296706d53e6522942e8714bdbc2e50625c5d4d4,0x4884e64d9ae8e00e9da80f0b7791c998ac8828b7,0x592e3d359e4a8ed5f08f38806b1b7f70aa3db4f2,0x87e6989a7ab5c707608fd6773fe32413871f4c8e,0x599610cf20379b5d21a4a3ea84cb76e0f2a5f70f,0x1276350e5855b2bcd089722a678c7d16f3ab5923,0xb2e51d2e2b85dbbe8c758c753b5bda3f86af05e4,0x4e5a8d1eb5250c766ad55ee18314a76fcb92a867,0x2bc16c1d9a5e6af362277ed424130cc6b2dde2d9,0xdb66686ac8bea67400cf9e5dd6c8849575b90148,0xd311f964dd5bb5ecbd971592e845b0fb74c98b39,0x364fd64a98bd60aa798ea8c61bb30d404102e900,0x0ef5922f909374ccd7841a81f44ab109648b7ba5,0x9a76d67e67ae285856846c2fa080adece60cfc9a,0x6e73f353e4ae3e5005daad619f22d7c7b790c4f3,0x273fca9cd4c4873efc303b0b61b5e5cb35cd9a70,0x5bacf41d5d6b16183c2b980bce0fbbe5ea125d2f
Arg [1] : _trustedTokens (address[]): 0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7,0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab,0xc7198437980c041c805a1edcba50c1ce5db95118,0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664,0xd586e7f844cea2f87f50152665bcbc2c279d8d70,0x50b7545627a5162f82a992c33b87adc75187b218,0x5947bb275c521040051d82396192181b413227a3,0x60781c2586d68229fde47564546784ab3faca982,0x6e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd,0xe896cdeaac9615145c0ca09c8cd5c25bced6384c,0xc38f41a296a4493ff429f1238e030924a1542e50
Arg [2] : _feeClaimer (address): 0xd22044706dea3c342f68396bedbcf6a2536d951d

-----Encoded View---------------
41 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000003a0
Arg [2] : 000000000000000000000000d22044706dea3c342f68396bedbcf6a2536d951d
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000019
Arg [4] : 0000000000000000000000003614657edc3cb90ba420e5f4f61679777e4974e3
Arg [5] : 0000000000000000000000003f314530a4964acca1f20dad2d35275c23ed7f5d
Arg [6] : 00000000000000000000000017c452a812ebdbf36df61b0103b62fa6c46f4475
Arg [7] : 000000000000000000000000a5e0b490be8a2f8281e09d5920953c65e803a1dc
Arg [8] : 0000000000000000000000005dda78a87c6c9131c07081e0fd49c432884e9db1
Arg [9] : 0000000000000000000000001753199414f075c6d6bb41699381b2415957dac7
Arg [10] : 000000000000000000000000a2cf5836ecf2da58cda01690feb644800c22b896
Arg [11] : 000000000000000000000000960c437f0ed35ddfdb7797ca77a0aceb65f66751
Arg [12] : 0000000000000000000000002296706d53e6522942e8714bdbc2e50625c5d4d4
Arg [13] : 0000000000000000000000004884e64d9ae8e00e9da80f0b7791c998ac8828b7
Arg [14] : 000000000000000000000000592e3d359e4a8ed5f08f38806b1b7f70aa3db4f2
Arg [15] : 00000000000000000000000087e6989a7ab5c707608fd6773fe32413871f4c8e
Arg [16] : 000000000000000000000000599610cf20379b5d21a4a3ea84cb76e0f2a5f70f
Arg [17] : 0000000000000000000000001276350e5855b2bcd089722a678c7d16f3ab5923
Arg [18] : 000000000000000000000000b2e51d2e2b85dbbe8c758c753b5bda3f86af05e4
Arg [19] : 0000000000000000000000004e5a8d1eb5250c766ad55ee18314a76fcb92a867
Arg [20] : 0000000000000000000000002bc16c1d9a5e6af362277ed424130cc6b2dde2d9
Arg [21] : 000000000000000000000000db66686ac8bea67400cf9e5dd6c8849575b90148
Arg [22] : 000000000000000000000000d311f964dd5bb5ecbd971592e845b0fb74c98b39
Arg [23] : 000000000000000000000000364fd64a98bd60aa798ea8c61bb30d404102e900
Arg [24] : 0000000000000000000000000ef5922f909374ccd7841a81f44ab109648b7ba5
Arg [25] : 0000000000000000000000009a76d67e67ae285856846c2fa080adece60cfc9a
Arg [26] : 0000000000000000000000006e73f353e4ae3e5005daad619f22d7c7b790c4f3
Arg [27] : 000000000000000000000000273fca9cd4c4873efc303b0b61b5e5cb35cd9a70
Arg [28] : 0000000000000000000000005bacf41d5d6b16183c2b980bce0fbbe5ea125d2f
Arg [29] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [30] : 000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7
Arg [31] : 00000000000000000000000049d5c2bdffac6ce2bfdb6640f4f80f226bc10bab
Arg [32] : 000000000000000000000000c7198437980c041c805a1edcba50c1ce5db95118
Arg [33] : 000000000000000000000000a7d7079b0fead91f3e65f86e8915cb59c1a4c664
Arg [34] : 000000000000000000000000d586e7f844cea2f87f50152665bcbc2c279d8d70
Arg [35] : 00000000000000000000000050b7545627a5162f82a992c33b87adc75187b218
Arg [36] : 0000000000000000000000005947bb275c521040051d82396192181b413227a3
Arg [37] : 00000000000000000000000060781c2586d68229fde47564546784ab3faca982
Arg [38] : 0000000000000000000000006e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd
Arg [39] : 000000000000000000000000e896cdeaac9615145c0ca09c8cd5c25bced6384c
Arg [40] : 000000000000000000000000c38f41a296a4493ff429f1238e030924a1542e50


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.