Contract 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 3

 
Txn Hash Method
Index
From
To
Value
0xd53f176400c9c12134733b0e2770dfc31f43b99edf9238250875082685999196Swap Split Compr...265817252022-09-30 22:09:3228 mins ago0x291c3063a40e1594a94ae8f5f84a5359936619f7 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0000801612130.001
0x5d0452eed5424f72c7dcd02ad131364fed35b55058a3fb85aa9678de1e6a58edSwap Compressed265802502022-09-30 22:00:1137 mins ago0x291c3063a40e1594a94ae8f5f84a5359936619f7 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960.15 Ether0.0000537639160.001
0xddabfd3a7871e2ab25623f9acc0474c4371ee99fb0d07fe1854727951b7c133aSwap Compressed265740802022-09-30 20:58:111 hr 39 mins ago0x3334829670f9e8d309c9d9f318c4e6876755ede2 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0000676960760.001
0xa13d308a2c9d04e01f9e89f1d0a151c97b77004ca6e41ceefe13b40092547439Swap Split Compr...265647182022-09-30 19:49:342 hrs 48 mins ago0xf77997d6314791da9828275c289122e47554130b IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0000671727640.001
0xb906c855b234c1254b36473f0f6dbfcce0023fa7c7fe340cc925232ebfbccf35Swap Compressed265513752022-09-30 18:00:074 hrs 37 mins ago0x85483d1813ad6c0a0e7de16bc1f346f93ea76286 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.000080691880.001
0x857e0385b0cc109fc53af9f752affbbc726268fa75f2961dafdf50cb884d151bSwap Compressed265476782022-09-30 17:35:215 hrs 2 mins ago0xb881503009addaaae5cbb5dd0f43d13588092f3c IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0000905156310.001
0xe4d3faf7e6a064bc493a80d4baf53ad36eb0d52eda902cf52a88ffef49018d8aSwap Compressed265475962022-09-30 17:34:515 hrs 2 mins ago0xb881503009addaaae5cbb5dd0f43d13588092f3c IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.000090038160.001
0x787990e320c23de89ef13baf1a2896cc439e9e3a4de93acf4289fd8165eb47edSwap Compressed265403382022-09-30 16:38:095 hrs 59 mins ago0x0f9093c9d7fad2829180a745e75a075e92c0e086 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0000957052720.001
0xda5dd3cbb6c3c1df88ea153f0dee4effe1f809ff031e31e0070725d1107377a9Swap Split Compr...265397292022-09-30 16:34:236 hrs 3 mins ago0x87e696610f11480ed9d01b1e2e26a90eb5832a02 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0001105954640.001
0x2665efa56d1f997fe5675f75d07c0ac553abe492d4d70e1f04309bcae014ec80Swap Compressed265392602022-09-30 16:31:066 hrs 6 mins ago0x87e696610f11480ed9d01b1e2e26a90eb5832a02 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0001286356960.001
0x13c313b5e808bd523b7c4850a13b2aad5d7f53045802545f0c78de7fd7888db0Swap Split Compr...265391612022-09-30 16:30:216 hrs 7 mins ago0x87e696610f11480ed9d01b1e2e26a90eb5832a02 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0001361227280.001
0xbf3e3814826c984509858d66f527487fd87e2e131cd487b32f75f7f60d0e8a1dSwap Split Compr...265380062022-09-30 16:25:366 hrs 12 mins ago0x87e696610f11480ed9d01b1e2e26a90eb5832a02 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0001213374860.001
0xb13995e44c570c9a6c648273794099f1cbb06449aef9dc5d4ae9f46381cba9a6Swap Split Compr...265359572022-09-30 16:12:016 hrs 25 mins ago0xb8e1f0f1e0aab629ec07ae9e4fa680b58732c643 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0001483576240.001
0xc4dbd87072c3b8b9d7dded8dbaee0b749b1ba3d47456c129661c2f81a58a9626Swap Compressed265353882022-09-30 16:08:456 hrs 29 mins ago0xd2e27021eb2f14a2cccfa786bb8332e93fd7571d IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0001836798130.001
0x5bbc1222554c033539924404767fd3bad801d39fb71957cb1f3a84d7335f7dcbTrade Eth To Wet...265312872022-09-30 15:43:356 hrs 54 mins ago0x12dad3425d0ec383ebd9e86139a103ce119aa0b2 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960.13 Ether0.0001648658360.001
0x131b799905e1f938bfcc740860770786d796d0cc8e3eed062464c3c29408f522Swap Compressed265279092022-09-30 15:29:047 hrs 8 mins ago0x2ffed3158bb66a974e46e17e94b17e93202b804b IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960.01 Ether0.0001126864230.001
0x7efea9251a7c1a9001cc3b8cefd762a69269d6d2e6754af33f75edccc06a33afSwap Compressed265261572022-09-30 15:20:477 hrs 17 mins ago0xeababf45bd7440553a8c8c440ba10e4c9213e271 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0000943738420.001
0xa566db806a579135aa7185f4010c1e75f87c901dfbed6a6f41890efb19b5ceccSwap Compressed265254102022-09-30 15:18:027 hrs 19 mins ago0xeababf45bd7440553a8c8c440ba10e4c9213e271 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0001021388230.001
0x9c08f945cc83496ab09877c228fd6c5f81cbfe91b828d669398502f46b9b9dccSwap Compressed265245562022-09-30 15:14:477 hrs 23 mins ago0x3f3721173aff420ccbec4790e049b66e26cd9886 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0001099507810.001
0xfb0fd7682c20dc117c37621b85a51c0ff270f3c88a653f055f28594f8fb6efe6Swap Split Compr...265235632022-09-30 15:10:167 hrs 27 mins ago0x87e696610f11480ed9d01b1e2e26a90eb5832a02 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960.1 Ether0.0001292616740.001
0xb4745c71573d954266c0a8f62adce4460ef20d8d902bfe215191ba00b3bcb2aaSwap Split Compr...265228232022-09-30 15:08:017 hrs 29 mins ago0xeababf45bd7440553a8c8c440ba10e4c9213e271 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0001077677750.001
0x3e469250f6b27c4b457ef9028714f65dcc3d856af6985a40ce5c799a29105d22Swap Split Compr...265175362022-09-30 14:50:297 hrs 47 mins ago 0xe6c8126c69b5f9d8a295b155c5d95ded20255fa4 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0001257000620.001
0xbb9d55d2bc9c81786a69fc82d867be348c8814977d252e76837b1adc9faf7e37Swap Split Compr...265164512022-09-30 14:48:447 hrs 49 mins ago0x87e696610f11480ed9d01b1e2e26a90eb5832a02 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0000956519440.001
0xad0aed376408214cafe99ce8b7496c7d22716deb38a00e721600e7d3ed8f39beSwap Split Compr...265149982022-09-30 14:45:137 hrs 52 mins ago0x043ac44f8cec7e359a31415f1e54459a8c2599a0 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0000887040340.001
0xe6b9a67f25c7db18e95cc1a3ae8edf7308ce5e1993482a565a52e7c283484822Swap Split Compr...265144142022-09-30 14:42:127 hrs 55 mins ago 0xe6c8126c69b5f9d8a295b155c5d95ded20255fa4 IN  0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960 Ether0.0000934532770.001
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xd53f176400c9c12134733b0e2770dfc31f43b99edf9238250875082685999196265817252022-09-30 22:09:3228 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696Synthetix: sUSD Token0 Ether
0xd53f176400c9c12134733b0e2770dfc31f43b99edf9238250875082685999196265817252022-09-30 22:09:3228 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 0xe2f50042766bdea8bcbfa0ff6a94bab65f8978260 Ether
0xd53f176400c9c12134733b0e2770dfc31f43b99edf9238250875082685999196265817252022-09-30 22:09:3228 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696Synthetix: sUSD Token0 Ether
0xd53f176400c9c12134733b0e2770dfc31f43b99edf9238250875082685999196265817252022-09-30 22:09:3228 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696Synthetix: SNX Token0 Ether
0xd53f176400c9c12134733b0e2770dfc31f43b99edf9238250875082685999196265817252022-09-30 22:09:3228 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696Synthetix: SNX Token0 Ether
0xd53f176400c9c12134733b0e2770dfc31f43b99edf9238250875082685999196265817252022-09-30 22:09:3228 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 0xf220408d5f8cf3a2d43126d3413fe3acbdf943630 Ether
0xd53f176400c9c12134733b0e2770dfc31f43b99edf9238250875082685999196265817252022-09-30 22:09:3228 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 0x71762f1fdc36afc769a25dcd73226c6edca6832a0 Ether
0xd53f176400c9c12134733b0e2770dfc31f43b99edf9238250875082685999196265817252022-09-30 22:09:3228 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 0x71762f1fdc36afc769a25dcd73226c6edca6832a0 Ether
0xd53f176400c9c12134733b0e2770dfc31f43b99edf9238250875082685999196265817252022-09-30 22:09:3228 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 0x71762f1fdc36afc769a25dcd73226c6edca6832a0 Ether
0x5d0452eed5424f72c7dcd02ad131364fed35b55058a3fb85aa9678de1e6a58ed265802502022-09-30 22:00:1137 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696Synthetix: sUSD Token0 Ether
0x5d0452eed5424f72c7dcd02ad131364fed35b55058a3fb85aa9678de1e6a58ed265802502022-09-30 22:00:1137 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 0xe2f50042766bdea8bcbfa0ff6a94bab65f8978260 Ether
0x5d0452eed5424f72c7dcd02ad131364fed35b55058a3fb85aa9678de1e6a58ed265802502022-09-30 22:00:1137 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696Synthetix: sUSD Token0 Ether
0x5d0452eed5424f72c7dcd02ad131364fed35b55058a3fb85aa9678de1e6a58ed265802502022-09-30 22:00:1137 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696Wrapped Ether0 Ether
0x5d0452eed5424f72c7dcd02ad131364fed35b55058a3fb85aa9678de1e6a58ed265802502022-09-30 22:00:1137 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696Wrapped Ether0.149865 Ether
0x5d0452eed5424f72c7dcd02ad131364fed35b55058a3fb85aa9678de1e6a58ed265802502022-09-30 22:00:1137 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d6960xc146a672c85b408a9a7bc00f74ad567b7684134c0.000135 Ether
0x5d0452eed5424f72c7dcd02ad131364fed35b55058a3fb85aa9678de1e6a58ed265802502022-09-30 22:00:1137 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 0xf220408d5f8cf3a2d43126d3413fe3acbdf943630 Ether
0x5d0452eed5424f72c7dcd02ad131364fed35b55058a3fb85aa9678de1e6a58ed265802502022-09-30 22:00:1137 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 0x71762f1fdc36afc769a25dcd73226c6edca6832a0 Ether
0x5d0452eed5424f72c7dcd02ad131364fed35b55058a3fb85aa9678de1e6a58ed265802502022-09-30 22:00:1137 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 0x71762f1fdc36afc769a25dcd73226c6edca6832a0 Ether
0x5d0452eed5424f72c7dcd02ad131364fed35b55058a3fb85aa9678de1e6a58ed265802502022-09-30 22:00:1137 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 0x71762f1fdc36afc769a25dcd73226c6edca6832a0 Ether
0xddabfd3a7871e2ab25623f9acc0474c4371ee99fb0d07fe1854727951b7c133a265740802022-09-30 20:58:111 hr 39 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 Synthetix: sBTC Token0 Ether
0xddabfd3a7871e2ab25623f9acc0474c4371ee99fb0d07fe1854727951b7c133a265740802022-09-30 20:58:111 hr 39 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 0xe2f50042766bdea8bcbfa0ff6a94bab65f8978260 Ether
0xddabfd3a7871e2ab25623f9acc0474c4371ee99fb0d07fe1854727951b7c133a265740802022-09-30 20:58:111 hr 39 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 Synthetix: sBTC Token0 Ether
0xddabfd3a7871e2ab25623f9acc0474c4371ee99fb0d07fe1854727951b7c133a265740802022-09-30 20:58:111 hr 39 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696Synthetix: sUSD Token0 Ether
0xddabfd3a7871e2ab25623f9acc0474c4371ee99fb0d07fe1854727951b7c133a265740802022-09-30 20:58:111 hr 39 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696Synthetix: sUSD Token0 Ether
0xddabfd3a7871e2ab25623f9acc0474c4371ee99fb0d07fe1854727951b7c133a265740802022-09-30 20:58:111 hr 39 mins ago 0x7ea8c22e6dcd7bd69eb180664da68e1f1f11d696 0xf220408d5f8cf3a2d43126d3413fe3acbdf943630 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WardenRouterV2_L2

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 14 : WardenRouterV2_L2.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {
    WardenRouterV2,
    IWardenPreTrade2,
    IWETH,
    IERC20,
    IWardenSwap2
} from "../WardenRouterV2.sol";
import {
    WardenDataDeserialize2,
    IArbAddressTable
} from "../../libraries/WardenDataDeserialize2.sol";

contract WardenRouterV2_L2 is WardenRouterV2, WardenDataDeserialize2 {
    constructor(
        IWardenPreTrade2 _preTrade,
        IWETH _weth,
        IArbAddressTable _addressTable,
        bool _autoRegisterAddressMapping
    )
        WardenRouterV2(_preTrade, _weth)
        WardenDataDeserialize2(_addressTable, _autoRegisterAddressMapping)
    {
    }

    function setAutoRegisterAddressMapping(
        bool _enable
    )
        external
        onlyOwner
    {
        _setAutoRegisterAddressMapping(_enable);
    }

    function swapCompressed(
        bytes calldata _data
    )
        external
        payable
        returns(uint256 _destAmount)
    {
        (
            SwapData memory swapData,
            uint256 cursor
        ) = decodeSwapData(_data, 0);

        return WardenRouterV2.swap(
            IWardenSwap2(swapData.swap),
            _data[cursor:],
            swapData.swap,
            IERC20(swapData.src),
            swapData.srcAmount,
            IERC20(swapData.dest),
            swapData.minDestAmount,
            swapData.receiver,
            swapData.partnerId,
            swapData.metaData
        );
    }

    function swapSplitCompressed(
        bytes calldata _data
    )
        external
        payable
        returns(uint256 _destAmount)
    {
        (
            SwapData memory swapData,
            uint256 cursor
        ) = decodeSwapData(_data, 0);

        address[] memory _deposits = new address[](1);
        uint256[] memory _volumes = new uint256[](0);
        _deposits[0] = swapData.swap;

        return WardenRouterV2.swapSplit(
            IWardenSwap2(swapData.swap),
            _data[cursor:],
            _deposits,
            _volumes,
            IERC20(swapData.src),
            swapData.srcAmount,
            IERC20(swapData.dest),
            swapData.minDestAmount,
            swapData.receiver,
            swapData.partnerId,
            swapData.metaData
        );
    }
}

File 2 of 14 : WardenRouterV2.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "../libraries/TransferHelper.sol";
import "../interface/IWETH.sol";
import "../interface/IWardenPreTrade2.sol";
import "../interface/IWardenSwap2.sol";

contract WardenRouterV2 is Ownable {
    using TransferHelper for IERC20;
    
    IWardenPreTrade2 public preTrade;

    IWETH public immutable weth;
    IERC20 private constant ETHER_ERC20 = IERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);
    
    event UpdatedWardenPreTrade(
        IWardenPreTrade2 indexed preTrade
    );

    /**
    * @dev When fee is collected by WardenSwap for a trade, this event will be emitted
    * @param token Collected token
    * @param wallet Collector address
    * @param amount Amount of fee collected
    */
    event ProtocolFee(
        IERC20  indexed   token,
        address indexed   wallet,
        uint256           amount
    );

    /**
    * @dev When fee is collected by WardenSwap's partners for a trade, this event will be emitted
    * @param partnerId Partner ID
    * @param token Collected token
    * @param wallet Collector address
    * @param amount Amount of fee collected
    */
    event PartnerFee(
        uint256 indexed   partnerId,
        IERC20  indexed   token,
        address indexed   wallet,
        uint256           amount
    );

    /**
    * @dev When the new trade occurs (and success), this event will be emitted.
    * @param srcAsset Source token
    * @param srcAmount Amount of source token
    * @param destAsset Destination token
    * @param destAmount Amount of destination token
    * @param trader User address
    */
    event Trade(
        address indexed srcAsset,
        uint256         srcAmount,
        address indexed destAsset,
        uint256         destAmount,
        address indexed trader,
        address         receiver,
        bool            hasSplitted
    );

    constructor(
        IWardenPreTrade2 _preTrade,
        IWETH _weth
    ) {
        preTrade = _preTrade;
        weth = _weth;
        
        emit UpdatedWardenPreTrade(_preTrade);
    }

    function updateWardenPreTrade(
        IWardenPreTrade2 _preTrade
    )
        external
        onlyOwner
    {
        preTrade = _preTrade;
        emit UpdatedWardenPreTrade(_preTrade);
    }

    /**
    * @dev Performs a trade with single volume
    * @param _swap Warden Swap contract
    * @param _data Warden Swap payload
    * @param _deposits Source token receiver
    * @param _src Source token
    * @param _srcAmount Amount of source tokens
    * @param _dest Destination token
    * @param _minDestAmount Minimum of destination token amount
    * @param _receiver Destination token receiver
    * @param _partnerId Partner id for fee sharing / Referral
    * @param _metaData Reserved for upcoming features
    * @return _destAmount Amount of actual destination tokens
    */
    function swap(
        IWardenSwap2    _swap,
        bytes calldata  _data,
        address     _deposits,
        IERC20      _src,
        uint256     _srcAmount,
        IERC20      _dest,
        uint256     _minDestAmount,
        address     _receiver,
        uint256     _partnerId,
        uint256     _metaData
    )
        public
        payable
        returns(uint256 _destAmount)
    {
        if (_receiver == address(0)) {
            _receiver = msg.sender;
        }

        // Collect fee
        uint256 newSrcAmount = _preTradeAndCollectFee(
            _src,
            _dest,
            _srcAmount,
            msg.sender,
            _receiver,
            _partnerId,
            _metaData
        );

        // Wrap ETH
        if (ETHER_ERC20 == _src) {
            require(msg.value == _srcAmount, "WardenRouter::swap: Ether source amount mismatched");
            weth.deposit{value: newSrcAmount}();
            
            // Transfer user tokens to target
            IERC20(address(weth)).safeTransfer(_deposits, newSrcAmount);
        } else {
            // Transfer user tokens to target
            _src.safeTransferFrom(msg.sender, _deposits, newSrcAmount);
        }

        bytes memory payload = abi.encodeWithSelector(IWardenSwap2.trade.selector,
            _data,
            _src,
            newSrcAmount,
            _srcAmount,
            _dest,
            _receiver,
            msg.sender,
            _partnerId,
            _metaData
        );

        _destAmount = _internalSwap(
            _swap,
            payload,
            _dest,
            _minDestAmount,
            _receiver
        );
        emit Trade(address(_src), _srcAmount, address(_dest), _destAmount, msg.sender, _receiver, false);
    }

    /**
    * @dev Performs a trade by splitting volumes
    * @param _swap Warden Swap contract
    * @param _data Warden Swap payload
    * @param _deposits Source token receivers
    * @param _volumes Volume percentages
    * @param _src Source token
    * @param _totalSrcAmount Amount of source tokens
    * @param _dest Destination token
    * @param _minDestAmount Minimum of destination token amount
    * @param _receiver Destination token receiver
    * @param _partnerId Partner id for fee sharing / Referral
    * @param _metaData Reserved for upcoming features
    * @return _destAmount Amount of actual destination tokens
    */
    function swapSplit(
        IWardenSwap2    _swap,
        bytes calldata  _data,
        address[] memory _deposits,
        uint256[] memory _volumes,
        IERC20      _src,
        uint256     _totalSrcAmount,
        IERC20      _dest,
        uint256     _minDestAmount,
        address     _receiver,
        uint256     _partnerId,
        uint256     _metaData
    )
        public
        payable
        returns(uint256 _destAmount)
    {
        if (_receiver == address(0)) {
            _receiver = msg.sender;
        }

        // Collect fee
        uint256 newTotalSrcAmount = _preTradeAndCollectFee(
            _src,
            _dest,
            _totalSrcAmount,
            msg.sender,
            _receiver,
            _partnerId,
            _metaData
        );

        // Wrap ETH
        if (ETHER_ERC20 == _src) {
            require(msg.value == _totalSrcAmount, "WardenRouter::swapSplit: Ether source amount mismatched");
            weth.deposit{value: newTotalSrcAmount}();
        }

        // Transfer user tokens to targets
        _depositVolumes(
            newTotalSrcAmount,
            _deposits,
            _volumes,
            _src
        );
        

        bytes memory payload = abi.encodeWithSelector(IWardenSwap2.tradeSplit.selector,
            _data,
            _volumes,
            _src,
            newTotalSrcAmount,
            _totalSrcAmount,
            _dest,
            _receiver,
            msg.sender,
            _partnerId,
            _metaData
        );

        _destAmount = _internalSwap(
            _swap,
            payload,
            _dest,
            _minDestAmount,
            _receiver
        );
        emit Trade(address(_src), _totalSrcAmount, address(_dest), _destAmount, msg.sender, _receiver, true);
    }

    function _depositVolumes(
        uint256 newTotalSrcAmount,
        address[] memory _deposits,
        uint256[] memory _volumes,
        IERC20           _src
    )
        private
    {
        {
            uint256 amountRemain = newTotalSrcAmount;
            for (uint i = 0; i < _deposits.length; i++) {
                uint256 amountForThisRound;
                if (i == _deposits.length - 1) {
                    amountForThisRound = amountRemain;
                } else {
                    amountForThisRound = newTotalSrcAmount * _volumes[i] / 100;
                    amountRemain = amountRemain - amountForThisRound;
                }
            
                if (ETHER_ERC20 == _src) {
                    IERC20(address(weth)).safeTransfer(_deposits[i], amountForThisRound);
                } else {
                    _src.safeTransferFrom(msg.sender, _deposits[i], amountForThisRound);
                }
            }
        }
    }

    function _internalSwap(
        IWardenSwap2 _swap,
        bytes memory _payload,
        IERC20       _dest,
        uint256      _minDestAmount,
        address      _receiver
    )
        private
        returns (uint256 _destAmount)
    {
        // Record dest asset for later consistency check.
        uint256 destAmountBefore = ETHER_ERC20 == _dest ? _receiver.balance : _dest.balanceOf(_receiver);

        {
            // solhint-disable-next-line avoid-low-level-calls
            (bool success, bytes memory result) = address(_swap).call(_payload);
            if (!success) {
                // Next 5 lines from https://ethereum.stackexchange.com/a/83577
                if (result.length < 68) revert();
                assembly {
                    result := add(result, 0x04)
                }
                revert(abi.decode(result, (string)));
            }
        }

        _destAmount = ETHER_ERC20 == _dest ? _receiver.balance - destAmountBefore : _dest.balanceOf(_receiver) - destAmountBefore;

        // Throw exception if destination amount doesn't meet user requirement.
        require(_destAmount >= _minDestAmount, "WardenRouter::_internalSwap: destination amount is too low.");
    }

    function _preTradeAndCollectFee(
        IERC20      _src,
        IERC20      _dest,
        uint256     _srcAmount,
        address     _trader,
        address     _receiver,
        uint256     _partnerId,
        uint256     _metaData
    )
        private
        returns (uint256 _newSrcAmount)
    {
        // Collect fee
        (uint256[] memory fees, address[] memory feeWallets) = preTrade.preTradeAndFee(
            _src,
            _dest,
            _srcAmount,
            _trader,
            _receiver,
            _partnerId,
            _metaData
        );
        _newSrcAmount = _srcAmount;
        if (fees.length > 0) {
            if (fees[0] > 0) {
                _collectFee(
                    _trader,
                    _src,
                    fees[0],
                    feeWallets[0]
                );
                _newSrcAmount -= fees[0];
            }
            if (fees.length == 2 && fees[1] > 0) {
                _partnerFee(
                    _trader,
                    _partnerId, // partner id
                    _src,
                    fees[1],
                    feeWallets[1]
                );
                _newSrcAmount -= fees[1];
            }
        }
    }
    
    function _collectFee(
        address _trader,
        IERC20  _token,
        uint256 _fee,
        address _feeWallet
    )
        private
    {
        if (ETHER_ERC20 == _token) {
            (bool success, ) = payable(_feeWallet).call{value: _fee}(""); // Send ether to fee collector
            require(success, "WardenRouter::_collectFee: Transfer fee of ether failed.");
        } else {
            _token.safeTransferFrom(_trader, _feeWallet, _fee); // Send token to fee collector
        }
        emit ProtocolFee(_token, _feeWallet, _fee);
    }

    function _partnerFee(
        address _trader,
        uint256 _partnerId,
        IERC20  _token,
        uint256 _fee,
        address _feeWallet
    )
        private
    {
        if (ETHER_ERC20 == _token) {
            (bool success, ) = payable(_feeWallet).call{value: _fee}(""); // Send back ether to partner
            require(success, "WardenRouter::_partnerFee: Transfer fee of ether failed.");
        } else {
            _token.safeTransferFrom(_trader, _feeWallet, _fee);
        }
        emit PartnerFee(_partnerId, _token, _feeWallet, _fee);
    }

    /**
    * @dev Performs a trade ETH -> WETH
    * @param _receiver Receiver address
    * @return _destAmount Amount of actual destination tokens
    */
    function tradeEthToWeth(
        address     _receiver
    )
        external
        payable
        returns(uint256 _destAmount)
    {
        if (_receiver == address(0)) {
            _receiver = msg.sender;
        }

        weth.deposit{value: msg.value}();
        IERC20(address(weth)).safeTransfer(_receiver, msg.value);
        _destAmount = msg.value;
        emit Trade(address(ETHER_ERC20), msg.value, address(weth), _destAmount, msg.sender, _receiver, false);
    }
    
    /**
    * @dev Performs a trade WETH -> ETH
    * @param _srcAmount Amount of source tokens
    * @param _receiver Receiver address
    * @return _destAmount Amount of actual destination tokens
    */
    function tradeWethToEth(
        uint256     _srcAmount,
        address     _receiver
    )
        external
        returns(uint256 _destAmount)
    {
        if (_receiver == address(0)) {
            _receiver = msg.sender;
        }

        IERC20(address(weth)).safeTransferFrom(msg.sender, address(this), _srcAmount);
        weth.withdraw(_srcAmount);
        (bool success, ) = _receiver.call{value: _srcAmount}(""); // Send back ether to receiver
        require(success, "WardenRouter::tradeWethToEth: Transfer ether back to receiver failed.");
        _destAmount = _srcAmount;
        emit Trade(address(weth), _srcAmount, address(ETHER_ERC20), _destAmount, msg.sender, _receiver, false);
    }

    // Receive ETH in case of trade WETH -> ETH
    receive() external payable {
        require(msg.sender == address(weth), "WardenRouter: Receive Ether only from WETH");
    }

    // In case of an expected and unexpected event that has some token amounts remain in this contract, owner can call to collect them.
    function collectRemainingToken(
        IERC20  _token,
        uint256 _amount
    )
      external
      onlyOwner
    {
        _token.safeTransfer(msg.sender, _amount);
    }

    // In case of an expected and unexpected event that has some ether amounts remain in this contract, owner can call to collect them.
    function collectRemainingEther(
        uint256 _amount
    )
      external
      onlyOwner
    {
        (bool success, ) = msg.sender.call{value: _amount}(""); // Send back ether to sender
        require(success, "WardenRouter::collectRemainingEther: Transfer ether back to caller failed.");
    }
}

File 3 of 14 : WardenDataDeserialize2.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../library/byte/BytesLib.sol";
import "../arbitrum/interface/IArbAddressTable.sol";

contract WardenDataDeserialize2 {
    using BytesLib for bytes;

    IArbAddressTable public immutable addressTable;
    bool public autoRegisterAddressMapping;

    event SetAutoRegisterAddressMapping(bool _enable);
    
    constructor(
        IArbAddressTable _addressTable,
        bool _autoRegisterAddressMapping
    ) {
        addressTable = _addressTable;
        autoRegisterAddressMapping = _autoRegisterAddressMapping;
    }

    function _setAutoRegisterAddressMapping(
        bool _enable
    )
        internal
    {
        autoRegisterAddressMapping = _enable;
        emit SetAutoRegisterAddressMapping(_enable);
    }

    function toBytes(bytes32 _data) private pure returns (bytes memory) {
        return abi.encodePacked(_data);
    }

    function _lookupAddress(
        bytes memory _data,
        uint256 _cursor
    )
        internal
        returns (
            address _address,
            uint256 _newCursor
        )
    {
        uint8 instruction = _data.toUint8(_cursor);
        _cursor += 1;
        
        if (instruction == 0) { // not registered
            _address =  _data.toAddress(_cursor);
            _cursor += 20;

            if (autoRegisterAddressMapping) {
                addressTable.register(_address);
            }
            
        } else if (instruction == 1) { // registered (32-bit)
            _address = addressTable.lookupIndex(_data.toUint32(_cursor));
            _cursor += 4;

        } else if (instruction == 2) { // registered (24-bit)
            _address = addressTable.lookupIndex(_data.toUint24(_cursor));
            _cursor += 3;

        } else if (instruction == 3) { // skip
            _address = 0x0000000000000000000000000000000000000000;
            
        } else {
            revert("WardenDataDeserialize:_lookupAddress bad instruction");
        }

        _newCursor = _cursor;
    }

    function _decodeAmount(
        bytes memory _data,
        uint256 _cursor
    )
        internal
        pure
        returns (
            uint256 _amount,
            uint256 _newCursor
        )
    {
        uint8 instruction = _data.toUint8(_cursor);
        _cursor += 1;

        if (instruction == 0) { // 64-bit, 18 (denominated in 1e18)
            _amount = _data.toUint64(_cursor);
            _cursor += 8;
            
        } else if (instruction == 1) { // 80-bit, 1.2m (denominated in 1e18)
            _amount = _data.toUint80(_cursor);
            _cursor += 10;

        } else if (instruction == 2) { // 96-bit, 79.2b (denominated in 1e18)
            _amount = _data.toUint96(_cursor);
            _cursor += 12;

        } else if (instruction == 3) { // 112-bit, 5,192mm (denominated in 1e18)
            _amount = _data.toUint112(_cursor);
            _cursor += 14;
        
        } else if (instruction == 4) { // zero
            _amount = 0;

        } else {
            revert("WardenDataDeserialize:_decodeAmount bad instruction");
        }

        _newCursor = _cursor;
    }

    struct SwapData {
        address swap;
        address src;
        address dest;
        address receiver;

        uint256 srcAmount;
        uint256 minDestAmount;
        uint256 partnerId;
        uint256 metaData;
    }

    function decodeSwapData(
        bytes memory _data,
        uint256 _cursor
    )
        public
        returns (
            SwapData memory _swapData,
            uint256 _newCursor
        )
    {
        (_swapData.swap, _cursor) = _lookupAddress(_data, _cursor);
        (_swapData.src, _cursor) = _lookupAddress(_data, _cursor);
        (_swapData.dest, _cursor) = _lookupAddress(_data, _cursor);
        (_swapData.receiver, _cursor) = _lookupAddress(_data, _cursor);

        (_swapData.srcAmount, _cursor) = _decodeAmount(_data, _cursor);
        (_swapData.minDestAmount, _cursor) = _decodeAmount(_data, _cursor);
        (_swapData.partnerId, _cursor) = _decodeAmount(_data, _cursor);
        (_swapData.metaData, _cursor) = _decodeAmount(_data, _cursor);

        _newCursor = _cursor;
    }
}

File 4 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/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() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 5 of 14 : TransferHelper.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IERC20NoReturn {
    function transfer(address recipient, uint256 amount) external;

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external;
}

// helper methods for interacting with ERC20 tokens that do not consistently return boolean
library TransferHelper {
    function safeTransfer(IERC20 token, address to, uint value) internal {
        try IERC20NoReturn(address(token)).transfer(to, value) {

        } catch Error(string memory reason) {
            // catch failing revert() and require()
            revert(reason);
        } catch  {
            revert("TransferHelper: transfer failed");
        }
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint value) internal {
        try IERC20NoReturn(address(token)).transferFrom(from, to, value) {

        } catch Error(string memory reason) {
            // catch failing revert() and require()
            revert(reason);
        } catch {
            revert("TransferHelper: transferFrom failed");
        }
    }
}

File 6 of 14 : IWETH.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;


interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

File 7 of 14 : IWardenPreTrade2.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IWardenPreTrade2 {
    function preTradeAndFee(
        IERC20      _src,
        IERC20      _dest,
        uint256     _srcAmount,
        address     _trader,
        address     _receiver,
        uint256     _partnerId,
        uint256     _metaData
    )
        external
        returns (
            uint256[] memory _fees,
            address[] memory _collectors
        );
}

File 8 of 14 : IWardenSwap2.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

interface IWardenSwap2 {
    function trade(
        bytes calldata  _data,
        IERC20      _src,
        uint256     _srcAmount,
        uint256     _originalSrcAmount,
        IERC20      _dest,
        address     _receiver,
        address     _trader,
        uint256     _partnerId,
        uint256     _metaData
    )
        external;
    
    function tradeSplit(
        bytes calldata  _data,
        uint256[] calldata _volumes,
        IERC20      _src,
        uint256     _totalSrcAmount,
        uint256     _originalSrcAmount,
        IERC20      _dest,
        address     _receiver,
        address     _trader,
        uint256     _partnerId,
        uint256     _metaData
    )
        external;
}

File 9 of 14 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with 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) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 10 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 11 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.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 IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

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

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

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

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

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

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

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

File 12 of 14 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 13 of 14 : BytesLib.sol
// SPDX-License-Identifier: Unlicense

// MODIFIED VERSION FROM https://github.com/GNSPS/solidity-bytes-utils/blob/master/contracts/BytesLib.sol

pragma solidity >=0.8.0 <0.9.0;


library BytesLib {
    function concat(
        bytes memory _preBytes,
        bytes memory _postBytes
    )
        internal
        pure
        returns (bytes memory)
    {
        bytes memory tempBytes;

        assembly {
            // Get a location of some free memory and store it in tempBytes as
            // Solidity does for memory variables.
            tempBytes := mload(0x40)

            // Store the length of the first bytes array at the beginning of
            // the memory for tempBytes.
            let length := mload(_preBytes)
            mstore(tempBytes, length)

            // Maintain a memory counter for the current write location in the
            // temp bytes array by adding the 32 bytes for the array length to
            // the starting location.
            let mc := add(tempBytes, 0x20)
            // Stop copying when the memory counter reaches the length of the
            // first bytes array.
            let end := add(mc, length)

            for {
                // Initialize a copy counter to the start of the _preBytes data,
                // 32 bytes into its memory.
                let cc := add(_preBytes, 0x20)
            } lt(mc, end) {
                // Increase both counters by 32 bytes each iteration.
                mc := add(mc, 0x20)
                cc := add(cc, 0x20)
            } {
                // Write the _preBytes data into the tempBytes memory 32 bytes
                // at a time.
                mstore(mc, mload(cc))
            }

            // Add the length of _postBytes to the current length of tempBytes
            // and store it as the new length in the first 32 bytes of the
            // tempBytes memory.
            length := mload(_postBytes)
            mstore(tempBytes, add(length, mload(tempBytes)))

            // Move the memory counter back from a multiple of 0x20 to the
            // actual end of the _preBytes data.
            mc := end
            // Stop copying when the memory counter reaches the new combined
            // length of the arrays.
            end := add(mc, length)

            for {
                let cc := add(_postBytes, 0x20)
            } lt(mc, end) {
                mc := add(mc, 0x20)
                cc := add(cc, 0x20)
            } {
                mstore(mc, mload(cc))
            }

            // Update the free-memory pointer by padding our last write location
            // to 32 bytes: add 31 bytes to the end of tempBytes to move to the
            // next 32 byte block, then round down to the nearest multiple of
            // 32. If the sum of the length of the two arrays is zero then add
            // one before rounding down to leave a blank 32 bytes (the length block with 0).
            mstore(0x40, and(
              add(add(end, iszero(add(length, mload(_preBytes)))), 31),
              not(31) // Round down to the nearest 32 bytes.
            ))
        }

        return tempBytes;
    }

    function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {
        assembly {
            // Read the first 32 bytes of _preBytes storage, which is the length
            // of the array. (We don't need to use the offset into the slot
            // because arrays use the entire slot.)
            let fslot := sload(_preBytes.slot)
            // Arrays of 31 bytes or less have an even value in their slot,
            // while longer arrays have an odd value. The actual length is
            // the slot divided by two for odd values, and the lowest order
            // byte divided by two for even values.
            // If the slot is even, bitwise and the slot with 255 and divide by
            // two to get the length. If the slot is odd, bitwise and the slot
            // with -1 and divide by two.
            let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)
            let mlength := mload(_postBytes)
            let newlength := add(slength, mlength)
            // slength can contain both the length and contents of the array
            // if length < 32 bytes so let's prepare for that
            // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
            switch add(lt(slength, 32), lt(newlength, 32))
            case 2 {
                // Since the new array still fits in the slot, we just need to
                // update the contents of the slot.
                // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length
                sstore(
                    _preBytes.slot,
                    // all the modifications to the slot are inside this
                    // next block
                    add(
                        // we can just add to the slot contents because the
                        // bytes we want to change are the LSBs
                        fslot,
                        add(
                            mul(
                                div(
                                    // load the bytes from memory
                                    mload(add(_postBytes, 0x20)),
                                    // zero all bytes to the right
                                    exp(0x100, sub(32, mlength))
                                ),
                                // and now shift left the number of bytes to
                                // leave space for the length in the slot
                                exp(0x100, sub(32, newlength))
                            ),
                            // increase length by the double of the memory
                            // bytes length
                            mul(mlength, 2)
                        )
                    )
                )
            }
            case 1 {
                // The stored value fits in the slot, but the combined value
                // will exceed it.
                // get the keccak hash to get the contents of the array
                mstore(0x0, _preBytes.slot)
                let sc := add(keccak256(0x0, 0x20), div(slength, 32))

                // save new length
                sstore(_preBytes.slot, add(mul(newlength, 2), 1))

                // The contents of the _postBytes array start 32 bytes into
                // the structure. Our first read should obtain the `submod`
                // bytes that can fit into the unused space in the last word
                // of the stored array. To get this, we read 32 bytes starting
                // from `submod`, so the data we read overlaps with the array
                // contents by `submod` bytes. Masking the lowest-order
                // `submod` bytes allows us to add that value directly to the
                // stored value.

                let submod := sub(32, slength)
                let mc := add(_postBytes, submod)
                let end := add(_postBytes, mlength)
                let mask := sub(exp(0x100, submod), 1)

                sstore(
                    sc,
                    add(
                        and(
                            fslot,
                            0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
                        ),
                        and(mload(mc), mask)
                    )
                )

                for {
                    mc := add(mc, 0x20)
                    sc := add(sc, 1)
                } lt(mc, end) {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } {
                    sstore(sc, mload(mc))
                }

                mask := exp(0x100, sub(mc, end))

                sstore(sc, mul(div(mload(mc), mask), mask))
            }
            default {
                // get the keccak hash to get the contents of the array
                mstore(0x0, _preBytes.slot)
                // Start copying to the last used word of the stored array.
                let sc := add(keccak256(0x0, 0x20), div(slength, 32))

                // save new length
                sstore(_preBytes.slot, add(mul(newlength, 2), 1))

                // Copy over the first `submod` bytes of the new data as in
                // case 1 above.
                let slengthmod := mod(slength, 32)
                let mlengthmod := mod(mlength, 32)
                let submod := sub(32, slengthmod)
                let mc := add(_postBytes, submod)
                let end := add(_postBytes, mlength)
                let mask := sub(exp(0x100, submod), 1)

                sstore(sc, add(sload(sc), and(mload(mc), mask)))

                for {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } lt(mc, end) {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } {
                    sstore(sc, mload(mc))
                }

                mask := exp(0x100, sub(mc, end))

                sstore(sc, mul(div(mload(mc), mask), mask))
            }
        }
    }

    function slice(
        bytes memory _bytes,
        uint256 _start,
        uint256 _length
    )
        internal
        pure
        returns (bytes memory)
    {
        require(_length + 31 >= _length, "slice_overflow");
        require(_bytes.length >= _start + _length, "slice_outOfBounds");

        bytes memory tempBytes;

        assembly {
            switch iszero(_length)
            case 0 {
                // Get a location of some free memory and store it in tempBytes as
                // Solidity does for memory variables.
                tempBytes := mload(0x40)

                // The first word of the slice result is potentially a partial
                // word read from the original array. To read it, we calculate
                // the length of that partial word and start copying that many
                // bytes into the array. The first word we copy will start with
                // data we don't care about, but the last `lengthmod` bytes will
                // land at the beginning of the contents of the new array. When
                // we're done copying, we overwrite the full first word with
                // the actual length of the slice.
                let lengthmod := and(_length, 31)

                // The multiplication in the next line is necessary
                // because when slicing multiples of 32 bytes (lengthmod == 0)
                // the following copy loop was copying the origin's length
                // and then ending prematurely not copying everything it should.
                let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))
                let end := add(mc, _length)

                for {
                    // The multiplication in the next line has the same exact purpose
                    // as the one above.
                    let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)
                } lt(mc, end) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    mstore(mc, mload(cc))
                }

                mstore(tempBytes, _length)

                //update free-memory pointer
                //allocating the array padded to 32 bytes like the compiler does now
                mstore(0x40, and(add(mc, 31), not(31)))
            }
            //if we want a zero-length slice let's just return a zero-length array
            default {
                tempBytes := mload(0x40)
                //zero out the 32 bytes slice we are about to return
                //we need to do it because Solidity does not garbage collect
                mstore(tempBytes, 0)

                mstore(0x40, add(tempBytes, 0x20))
            }
        }

        return tempBytes;
    }

    function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {
        require(_bytes.length >= _start + 20, "toAddress_outOfBounds");
        address tempAddress;

        assembly {
            tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)
        }

        return tempAddress;
    }

    function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {
        require(_bytes.length >= _start + 1 , "toUint8_outOfBounds");
        uint8 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x1), _start))
        }

        return tempUint;
    }

    function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {
        require(_bytes.length >= _start + 2, "toUint16_outOfBounds");
        uint16 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x2), _start))
        }

        return tempUint;
    }
    
    function toUint24(bytes memory _bytes, uint256 _start) internal pure returns (uint24) {
        require(_bytes.length >= _start + 3, "toUint24_outOfBounds");
        uint24 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x3), _start))
        }

        return tempUint;
    }

    function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) {
        require(_bytes.length >= _start + 4, "toUint32_outOfBounds");
        uint32 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x4), _start))
        }

        return tempUint;
    }

    function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) {
        require(_bytes.length >= _start + 8, "toUint64_outOfBounds");
        uint64 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x8), _start))
        }

        return tempUint;
    }
    
    function toUint80(bytes memory _bytes, uint256 _start) internal pure returns (uint80) {
        require(_bytes.length >= _start + 10, "toUint80_outOfBounds");
        uint80 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0xa), _start))
        }

        return tempUint;
    }

    function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) {
        require(_bytes.length >= _start + 12, "toUint96_outOfBounds");
        uint96 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0xc), _start))
        }

        return tempUint;
    }
    
    function toUint112(bytes memory _bytes, uint256 _start) internal pure returns (uint112) {
        require(_bytes.length >= _start + 14, "toUint112_outOfBounds");
        uint112 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0xe), _start))
        }

        return tempUint;
    }

    function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) {
        require(_bytes.length >= _start + 16, "toUint128_outOfBounds");
        uint128 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x10), _start))
        }

        return tempUint;
    }

    function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) {
        require(_bytes.length >= _start + 32, "toUint256_outOfBounds");
        uint256 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x20), _start))
        }

        return tempUint;
    }

    function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {
        require(_bytes.length >= _start + 32, "toBytes32_outOfBounds");
        bytes32 tempBytes32;

        assembly {
            tempBytes32 := mload(add(add(_bytes, 0x20), _start))
        }

        return tempBytes32;
    }

    function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {
        bool success = true;

        assembly {
            let length := mload(_preBytes)

            // if lengths don't match the arrays are not equal
            switch eq(length, mload(_postBytes))
            case 1 {
                // cb is a circuit breaker in the for loop since there's
                //  no said feature for inline assembly loops
                // cb = 1 - don't breaker
                // cb = 0 - break
                let cb := 1

                let mc := add(_preBytes, 0x20)
                let end := add(mc, length)

                for {
                    let cc := add(_postBytes, 0x20)
                // the next line is the loop condition:
                // while(uint256(mc < end) + cb == 2)
                } eq(add(lt(mc, end), cb), 2) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    // if any of these checks fails then arrays are not equal
                    if iszero(eq(mload(mc), mload(cc))) {
                        // unsuccess:
                        success := 0
                        cb := 0
                    }
                }
            }
            default {
                // unsuccess:
                success := 0
            }
        }

        return success;
    }

    function equalStorage(
        bytes storage _preBytes,
        bytes memory _postBytes
    )
        internal
        view
        returns (bool)
    {
        bool success = true;

        assembly {
            // we know _preBytes_offset is 0
            let fslot := sload(_preBytes.slot)
            // Decode the length of the stored array like in concatStorage().
            let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)
            let mlength := mload(_postBytes)

            // if lengths don't match the arrays are not equal
            switch eq(slength, mlength)
            case 1 {
                // slength can contain both the length and contents of the array
                // if length < 32 bytes so let's prepare for that
                // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
                if iszero(iszero(slength)) {
                    switch lt(slength, 32)
                    case 1 {
                        // blank the last byte which is the length
                        fslot := mul(div(fslot, 0x100), 0x100)

                        if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {
                            // unsuccess:
                            success := 0
                        }
                    }
                    default {
                        // cb is a circuit breaker in the for loop since there's
                        //  no said feature for inline assembly loops
                        // cb = 1 - don't breaker
                        // cb = 0 - break
                        let cb := 1

                        // get the keccak hash to get the contents of the array
                        mstore(0x0, _preBytes.slot)
                        let sc := keccak256(0x0, 0x20)

                        let mc := add(_postBytes, 0x20)
                        let end := add(mc, mlength)

                        // the next line is the loop condition:
                        // while(uint256(mc < end) + cb == 2)
                        for {} eq(add(lt(mc, end), cb), 2) {
                            sc := add(sc, 1)
                            mc := add(mc, 0x20)
                        } {
                            if iszero(eq(sload(sc), mload(mc))) {
                                // unsuccess:
                                success := 0
                                cb := 0
                            }
                        }
                    }
                }
            }
            default {
                // unsuccess:
                success := 0
            }
        }

        return success;
    }
}

File 14 of 14 : IArbAddressTable.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/** @title Precompiled contract that exists in every Arbitrum chain at 0x0000000000000000000000000000000000000066.
* Allows registering / retrieving addresses at uint indices, saving calldata.
*/
interface IArbAddressTable {
    /**
    * @notice Register an address in the address table
    * @param addr address to register
    * @return index of the address (existing index, or newly created index if not already registered)
    */
    function register(address addr) external returns(uint);

    /**
    * @param addr address to lookup
    * @return index of an address in the address table (revert if address isn't in the table)
    */
    function lookup(address addr) external view returns(uint);

    /**
    * @notice Check whether an address exists in the address table
    * @param addr address to check for presence in table
    * @return true if address is in table
    */
    function addressExists(address addr) external view returns(bool);

    /**
    * @return size of address table (= first unused index)
     */
    function size() external view returns(uint);

    /**
    * @param index index to lookup address
    * @return address at a given index in address table (revert if index is beyond end of table)
    */
    function lookupIndex(uint index) external view returns(address);

    /**
    * @notice read a compressed address from a bytes buffer
    * @param buf bytes buffer containing an address
    * @param offset offset of target address
    * @return resulting address and updated offset into the buffer (revert if buffer is too short)
    */
    function decompress(bytes calldata buf, uint offset) external pure returns(address, uint);

    /**
    * @notice compress an address and return the result
    * @param addr address to compress
    * @return compressed address bytes
    */
    function compress(address addr) external returns(bytes memory);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IWardenPreTrade2","name":"_preTrade","type":"address"},{"internalType":"contract IWETH","name":"_weth","type":"address"},{"internalType":"contract IArbAddressTable","name":"_addressTable","type":"address"},{"internalType":"bool","name":"_autoRegisterAddressMapping","type":"bool"}],"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":"uint256","name":"partnerId","type":"uint256"},{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PartnerFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ProtocolFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_enable","type":"bool"}],"name":"SetAutoRegisterAddressMapping","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"srcAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcAmount","type":"uint256"},{"indexed":true,"internalType":"address","name":"destAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"destAmount","type":"uint256"},{"indexed":true,"internalType":"address","name":"trader","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"bool","name":"hasSplitted","type":"bool"}],"name":"Trade","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IWardenPreTrade2","name":"preTrade","type":"address"}],"name":"UpdatedWardenPreTrade","type":"event"},{"inputs":[],"name":"addressTable","outputs":[{"internalType":"contract IArbAddressTable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"autoRegisterAddressMapping","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"collectRemainingEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"collectRemainingToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"uint256","name":"_cursor","type":"uint256"}],"name":"decodeSwapData","outputs":[{"components":[{"internalType":"address","name":"swap","type":"address"},{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dest","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"minDestAmount","type":"uint256"},{"internalType":"uint256","name":"partnerId","type":"uint256"},{"internalType":"uint256","name":"metaData","type":"uint256"}],"internalType":"struct WardenDataDeserialize2.SwapData","name":"_swapData","type":"tuple"},{"internalType":"uint256","name":"_newCursor","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preTrade","outputs":[{"internalType":"contract IWardenPreTrade2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enable","type":"bool"}],"name":"setAutoRegisterAddressMapping","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IWardenSwap2","name":"_swap","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"address","name":"_deposits","type":"address"},{"internalType":"contract IERC20","name":"_src","type":"address"},{"internalType":"uint256","name":"_srcAmount","type":"uint256"},{"internalType":"contract IERC20","name":"_dest","type":"address"},{"internalType":"uint256","name":"_minDestAmount","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_partnerId","type":"uint256"},{"internalType":"uint256","name":"_metaData","type":"uint256"}],"name":"swap","outputs":[{"internalType":"uint256","name":"_destAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"swapCompressed","outputs":[{"internalType":"uint256","name":"_destAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IWardenSwap2","name":"_swap","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"address[]","name":"_deposits","type":"address[]"},{"internalType":"uint256[]","name":"_volumes","type":"uint256[]"},{"internalType":"contract IERC20","name":"_src","type":"address"},{"internalType":"uint256","name":"_totalSrcAmount","type":"uint256"},{"internalType":"contract IERC20","name":"_dest","type":"address"},{"internalType":"uint256","name":"_minDestAmount","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_partnerId","type":"uint256"},{"internalType":"uint256","name":"_metaData","type":"uint256"}],"name":"swapSplit","outputs":[{"internalType":"uint256","name":"_destAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"swapSplitCompressed","outputs":[{"internalType":"uint256","name":"_destAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"tradeEthToWeth","outputs":[{"internalType":"uint256","name":"_destAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_srcAmount","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"tradeWethToEth","outputs":[{"internalType":"uint256","name":"_destAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IWardenPreTrade2","name":"_preTrade","type":"address"}],"name":"updateWardenPreTrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c06040523480156200001157600080fd5b506040516200354338038062003543833981016040819052620000349162000131565b818185856200004333620000c8565b600180546001600160a01b0319166001600160a01b038481169182179092559082166080526040517f305e87b67e942ca51cbdcd6a078f76bcc9ed0c8db1000119f2d40ded1d9a1d7590600090a250506001600160a01b0390911660a05260018054911515600160a01b0260ff60a01b19909216919091179055506200019d92505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200012e57600080fd5b50565b600080600080608085870312156200014857600080fd5b8451620001558162000118565b6020860151909450620001688162000118565b60408601519093506200017b8162000118565b606086015190925080151581146200019257600080fd5b939692955090935050565b60805160a05161331e620002256000396000818161024201528181611a1c01528181611aa60152611b7d01526000818161013d0152818161028e01528181610514015281816108f50152818161094c01528181610ae201528181610eda01528181610f5801528181610fb1015281816110dd0152818161115b015261163b015261331e6000f3fe60806040526004361061012d5760003560e01c80637b7b554d116100a5578063d749325e11610074578063ef2c822f11610059578063ef2c822f146103fe578063f2fde38b14610411578063f33c86cd1461043157600080fd5b8063d749325e146103a9578063dca489e0146103eb57600080fd5b80637b7b554d146103385780638da5cb5b146103585780638f64d73a14610376578063d6f5195d1461039657600080fd5b80634912dd14116100fc578063629e1425116100e1578063629e1425146102f0578063693a749314610310578063715018a61461032357600080fd5b80634912dd14146102b05780635500c46d146102d057600080fd5b8063053e59d4146101dc5780630a75c936146102025780630ca1fc5c146102305780633fc8cef31461027c57600080fd5b366101d757336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101d55760405162461bcd60e51b815260206004820152602a60248201527f57617264656e526f757465723a2052656365697665204574686572206f6e6c7960448201527f2066726f6d20574554480000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b005b600080fd5b6101ef6101ea3660046128f8565b610451565b6040519081526020015b60405180910390f35b34801561020e57600080fd5b5061022261021d366004612a2b565b61069f565b6040516101f9929190612ab5565b34801561023c57600080fd5b506102647f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101f9565b34801561028857600080fd5b506102647f000000000000000000000000000000000000000000000000000000000000000081565b3480156102bc57600080fd5b506101d56102cb366004612b36565b6107a6565b3480156102dc57600080fd5b506101d56102eb366004612b62565b610818565b3480156102fc57600080fd5b506101ef61030b366004612b86565b6108d4565b6101ef61031e366004612bb6565b610b36565b34801561032f57600080fd5b506101d5610c2c565b34801561034457600080fd5b506101d5610353366004612bf8565b610c92565b34801561036457600080fd5b506000546001600160a01b0316610264565b34801561038257600080fd5b506101d5610391366004612c1a565b610cf8565b6101ef6103a4366004612bb6565b610e36565b3480156103b557600080fd5b506001546103db9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016101f9565b6101ef6103f9366004612b62565b610ec4565b6101ef61040c366004612c33565b61101a565b34801561041d57600080fd5b506101d561042c366004612b62565b6112a9565b34801561043d57600080fd5b50600154610264906001600160a01b031681565b60006001600160a01b038416610465573393505b600061047689888a33898989611388565b905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b038a161415610587578734146105125760405162461bcd60e51b815260206004820152603760248201527f57617264656e526f757465723a3a7377617053706c69743a204574686572207360448201527f6f7572636520616d6f756e74206d69736d61746368656400000000000000000060648201526084016101cc565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561056d57600080fd5b505af1158015610581573d6000803e3d6000fd5b50505050505b610593818c8c8c61158b565b6000632ead0eed60e01b8e8e8d8d868e8e8d338e8e6040516024016105c29b9a99989796959493929190612d29565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290506106308f828a8a8a6116cb565b604080518b8152602081018390526001600160a01b038981168284015260016060830152915192955033928b8316928e16917fa1053ef90d92e668a06dbab8af812d6d99e04d80c0d5af298fd8fdd3ab5f8280919081900360800190a450509c9b505050505050505050505050565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052906106ea8484611982565b6001600160a01b03909116835292506107038484611982565b6001600160a01b039091166020840152925061071f8484611982565b6001600160a01b039091166040840152925061073b8484611982565b6001600160a01b03909116606084015292506107578484611cc1565b6080840191909152925061076b8484611cc1565b60a0840191909152925061077f8484611cc1565b60c084019190915292506107938484611cc1565b60e0840191909152919491935090915050565b6000546001600160a01b031633146108005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101cc565b6108146001600160a01b0383163383611e1d565b5050565b6000546001600160a01b031633146108725760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101cc565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f305e87b67e942ca51cbdcd6a078f76bcc9ed0c8db1000119f2d40ded1d9a1d7590600090a250565b60006001600160a01b0382166108e8573391505b61091d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086611f26565b6040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561099857600080fd5b505af11580156109ac573d6000803e3d6000fd5b505050506000826001600160a01b03168460405160006040518083038185875af1925050503d80600081146109fd576040519150601f19603f3d011682016040523d82523d6000602084013e610a02565b606091505b5050905080610a9f5760405162461bcd60e51b815260206004820152604560248201527f57617264656e526f757465723a3a747261646557657468546f4574683a20547260448201527f616e73666572206574686572206261636b20746f20726563656976657220666160648201527f696c65642e000000000000000000000000000000000000000000000000000000608482015260a4016101cc565b60408051858152602081018690526001600160a01b0385811682840152600060608301529151869450339273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee927f0000000000000000000000000000000000000000000000000000000000000000909116917fa1053ef90d92e668a06dbab8af812d6d99e04d80c0d5af298fd8fdd3ab5f82809181900360800190a45092915050565b6000806000610b7a85858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250925061069f915050565b6040805160018082528183019092529294509092506000919060208083019080368337019050506040805160008082526020820190925291925050836000015182600081518110610bcd57610bcd612dee565b6001600160a01b03909216602092830291909101909101528351610c2190610bf78886818c612e1d565b858589602001518a608001518b604001518c60a001518d606001518e60c001518f60e00151610451565b979650505050505050565b6000546001600160a01b03163314610c865760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101cc565b610c906000612044565b565b6000546001600160a01b03163314610cec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101cc565b610cf5816120ac565b50565b6000546001600160a01b03163314610d525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101cc565b604051600090339083908381818185875af1925050503d8060008114610d94576040519150601f19603f3d011682016040523d82523d6000602084013e610d99565b606091505b50509050806108145760405162461bcd60e51b815260206004820152604a60248201527f57617264656e526f757465723a3a636f6c6c65637452656d61696e696e67457460448201527f6865723a205472616e73666572206574686572206261636b20746f2063616c6c60648201527f6572206661696c65642e00000000000000000000000000000000000000000000608482015260a4016101cc565b6000806000610e7a85858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250925061069f915050565b81519193509150610ebb90610e918684818a612e1d565b855160208701516080880151604089015160a08a015160608b015160c08c015160e08d015161101a565b95945050505050565b60006001600160a01b038216610ed8573391505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610f3357600080fd5b505af1158015610f47573d6000803e3d6000fd5b50610f839350506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915084905034611e1d565b506040805134808252602082018190526001600160a01b0384811683850152600060608401529251909233927f00000000000000000000000000000000000000000000000000000000000000009091169173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee917fa1053ef90d92e668a06dbab8af812d6d99e04d80c0d5af298fd8fdd3ab5f8280919081900360800190a4919050565b60006001600160a01b03841661102e573393505b600061103f89888a33898989611388565b905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b038a16141561118b578734146110db5760405162461bcd60e51b815260206004820152603260248201527f57617264656e526f757465723a3a737761703a20457468657220736f7572636560448201527f20616d6f756e74206d69736d617463686564000000000000000000000000000060648201526084016101cc565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561113657600080fd5b505af115801561114a573d6000803e3d6000fd5b506111869350506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691508c905083611e1d565b6111a0565b6111a06001600160a01b038a16338c84611f26565b600063eb766f9c60e01b8d8d8c858d8d8c338d8d6040516024016111cd9a99989796959493929190612e47565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905061123b8e828a8a8a6116cb565b604080518b8152602081018390526001600160a01b038981168284015260006060830152915192955033928b8316928e16917fa1053ef90d92e668a06dbab8af812d6d99e04d80c0d5af298fd8fdd3ab5f8280919081900360800190a450509b9a5050505050505050505050565b6000546001600160a01b031633146113035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101cc565b6001600160a01b03811661137f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101cc565b610cf581612044565b6001546040517f2db71f200000000000000000000000000000000000000000000000000000000081526001600160a01b0389811660048301528881166024830152604482018890528681166064830152858116608483015260a4820185905260c482018490526000928392839290911690632db71f209060e4016000604051808303816000875af1158015611421573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114499190810190612f1b565b81518a955091935091501561157e5760008260008151811061146d5761146d612dee565b602002602001015111156114e4576114bb878b8460008151811061149357611493612dee565b6020026020010151846000815181106114ae576114ae612dee565b6020026020010151612130565b816000815181106114ce576114ce612dee565b6020026020010151836114e19190613011565b92505b8151600214801561150f575060008260018151811061150557611505612dee565b6020026020010151115b1561157e5761155587868c8560018151811061152d5761152d612dee565b60200260200101518560018151811061154857611548612dee565b602002602001015161228c565b8160018151811061156857611568612dee565b60200260200101518361157b9190613011565b92505b5050979650505050505050565b8360005b84518110156116c3576000600186516115a89190613011565b8214156115b65750816115f6565b60648583815181106115ca576115ca612dee565b6020026020010151886115dd9190613028565b6115e79190613065565b90506115f38184613011565b92505b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03851614156116775761167286838151811061163057611630612dee565b6020026020010151827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611e1d9092919063ffffffff16565b6116b0565b6116b03387848151811061168d5761168d612dee565b602002602001015183876001600160a01b0316611f26909392919063ffffffff16565b50806116bb816130a0565b91505061158f565b505050505050565b60008073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0386161461177a576040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528616906370a0823190602401602060405180830381865afa158015611751573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177591906130d9565b611786565b826001600160a01b0316315b9050600080886001600160a01b0316886040516117a3919061311e565b6000604051808303816000865af19150503d80600081146117e0576040519150601f19603f3d011682016040523d82523d6000602084013e6117e5565b606091505b509150915081611831576044815110156117fe57600080fd5b60048101905080806020019051810190611818919061313a565b60405162461bcd60e51b81526004016101cc91906131bc565b505073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b038616146118ec576040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528291908716906370a0823190602401602060405180830381865afa1580156118b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118dd91906130d9565b6118e79190613011565b611900565b611900816001600160a01b03851631613011565b9150838210156119785760405162461bcd60e51b815260206004820152603b60248201527f57617264656e526f757465723a3a5f696e7465726e616c537761703a2064657360448201527f74696e6174696f6e20616d6f756e7420697320746f6f206c6f772e000000000060648201526084016101cc565b5095945050505050565b6000808061199085856123ea565b905061199d6001856131ef565b935060ff8116611a90576119b18585612450565b92506119be6014856131ef565b60015490945074010000000000000000000000000000000000000000900460ff1615611a8b576040517f4420e4860000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f00000000000000000000000000000000000000000000000000000000000000001690634420e486906024016020604051808303816000875af1158015611a65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8991906130d9565b505b611cb8565b8060ff1660011415611b67576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016638a186788611ad587876124c6565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815263ffffffff919091166004820152602401602060405180830381865afa158015611b2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b539190613207565b9250611b606004856131ef565b9350611cb8565b8060ff1660021415611c35576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016638a186788611bac878761252c565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815262ffffff9091166004820152602401602060405180830381865afa158015611c04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c289190613207565b9250611b606003856131ef565b8060ff1660031415611c4a5760009250611cb8565b60405162461bcd60e51b815260206004820152603460248201527f57617264656e44617461446573657269616c697a653a5f6c6f6f6b757041646460448201527f726573732062616420696e737472756374696f6e00000000000000000000000060648201526084016101cc565b50909391925050565b60008080611ccf85856123ea565b9050611cdc6001856131ef565b935060ff8116611d0757611cf08585612592565b67ffffffffffffffff169250611b606008856131ef565b8060ff1660011415611d3657611d1d85856125f8565b69ffffffffffffffffffff169250611b60600a856131ef565b8060ff1660021415611d6757611d4c858561265e565b6bffffffffffffffffffffffff169250611b60600c856131ef565b8060ff1660031415611d9a57611d7d85856126c4565b6dffffffffffffffffffffffffffff169250611b60600e856131ef565b8060ff1660041415611daf5760009250611cb8565b60405162461bcd60e51b815260206004820152603360248201527f57617264656e44617461446573657269616c697a653a5f6465636f6465416d6f60448201527f756e742062616420696e737472756374696f6e0000000000000000000000000060648201526084016101cc565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526024820183905284169063a9059cbb90604401600060405180830381600087803b158015611e8057600080fd5b505af1925050508015611e91575060015b611f2157611e9d613224565b806308c379a01415611ed75750611eb2613240565b80611ebd5750611ed9565b8060405162461bcd60e51b81526004016101cc91906131bc565b505b60405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a207472616e73666572206661696c65640060448201526064016101cc565b505050565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528381166024830152604482018390528516906323b872dd90606401600060405180830381600087803b158015611f9157600080fd5b505af1925050508015611fa2575060015b61203e57611fae613224565b806308c379a01415611fce5750611fc3613240565b80611ebd5750611fd0565b505b60405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a207472616e7366657246726f6d2066616960448201527f6c6564000000000000000000000000000000000000000000000000000000000060648201526084016101cc565b50505050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001805482151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040517ffe71ed30986640a3b75b5733cac475d354486c44a90725ed513ffaddf2c79ca29061212590831515815260200190565b60405180910390a150565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161415612224576000816001600160a01b03168360405160006040518083038185875af1925050503d80600081146121a2576040519150601f19603f3d011682016040523d82523d6000602084013e6121a7565b606091505b505090508061221e5760405162461bcd60e51b815260206004820152603860248201527f57617264656e526f757465723a3a5f636f6c6c6563744665653a205472616e7360448201527f66657220666565206f66206574686572206661696c65642e000000000000000060648201526084016101cc565b50612239565b6122396001600160a01b038416858385611f26565b806001600160a01b0316836001600160a01b03167f20e2995330eff898aba363dafa356ef1daadce6099c9cc7ca8d54eefe4592b4c8460405161227e91815260200190565b60405180910390a350505050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161415612380576000816001600160a01b03168360405160006040518083038185875af1925050503d80600081146122fe576040519150601f19603f3d011682016040523d82523d6000602084013e612303565b606091505b505090508061237a5760405162461bcd60e51b815260206004820152603860248201527f57617264656e526f757465723a3a5f706172746e65724665653a205472616e7360448201527f66657220666565206f66206574686572206661696c65642e000000000000000060648201526084016101cc565b50612395565b6123956001600160a01b038416868385611f26565b806001600160a01b0316836001600160a01b0316857f51819630bf3511ccdb6a21adf4073788982d983df3b6c609b201fd9dad81d2d9856040516123db91815260200190565b60405180910390a45050505050565b60006123f78260016131ef565b835110156124475760405162461bcd60e51b815260206004820152601360248201527f746f55696e74385f6f75744f66426f756e64730000000000000000000000000060448201526064016101cc565b50016001015190565b600061245d8260146131ef565b835110156124ad5760405162461bcd60e51b815260206004820152601560248201527f746f416464726573735f6f75744f66426f756e6473000000000000000000000060448201526064016101cc565b5001602001516c01000000000000000000000000900490565b60006124d38260046131ef565b835110156125235760405162461bcd60e51b815260206004820152601460248201527f746f55696e7433325f6f75744f66426f756e647300000000000000000000000060448201526064016101cc565b50016004015190565b60006125398260036131ef565b835110156125895760405162461bcd60e51b815260206004820152601460248201527f746f55696e7432345f6f75744f66426f756e647300000000000000000000000060448201526064016101cc565b50016003015190565b600061259f8260086131ef565b835110156125ef5760405162461bcd60e51b815260206004820152601460248201527f746f55696e7436345f6f75744f66426f756e647300000000000000000000000060448201526064016101cc565b50016008015190565b600061260582600a6131ef565b835110156126555760405162461bcd60e51b815260206004820152601460248201527f746f55696e7438305f6f75744f66426f756e647300000000000000000000000060448201526064016101cc565b5001600a015190565b600061266b82600c6131ef565b835110156126bb5760405162461bcd60e51b815260206004820152601460248201527f746f55696e7439365f6f75744f66426f756e647300000000000000000000000060448201526064016101cc565b5001600c015190565b60006126d182600e6131ef565b835110156127215760405162461bcd60e51b815260206004820152601560248201527f746f55696e743131325f6f75744f66426f756e6473000000000000000000000060448201526064016101cc565b5001600e015190565b6001600160a01b0381168114610cf557600080fd5b803561274a8161272a565b919050565b60008083601f84011261276157600080fd5b50813567ffffffffffffffff81111561277957600080fd5b60208301915083602082850101111561279157600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff821117156127ed576127ed612798565b6040525050565b600067ffffffffffffffff82111561280e5761280e612798565b5060051b60200190565b600082601f83011261282957600080fd5b81356020612836826127f4565b60405161284382826127c7565b83815260059390931b850182019282810191508684111561286357600080fd5b8286015b8481101561288757803561287a8161272a565b8352918301918301612867565b509695505050505050565b600082601f8301126128a357600080fd5b813560206128b0826127f4565b6040516128bd82826127c7565b83815260059390931b85018201928281019150868411156128dd57600080fd5b8286015b8481101561288757803583529183019183016128e1565b6000806000806000806000806000806000806101608d8f03121561291b57600080fd5b6129248d61273f565b9b5067ffffffffffffffff60208e0135111561293f57600080fd5b61294f8e60208f01358f0161274f565b909b50995067ffffffffffffffff60408e0135111561296d57600080fd5b61297d8e60408f01358f01612818565b985067ffffffffffffffff60608e0135111561299857600080fd5b6129a88e60608f01358f01612892565b97506129b660808e0161273f565b965060a08d013595506129cb60c08e0161273f565b945060e08d013593506129e16101008e0161273f565b92506101208d013591506101408d013590509295989b509295989b509295989b565b600067ffffffffffffffff821115612a1d57612a1d612798565b50601f01601f191660200190565b60008060408385031215612a3e57600080fd5b823567ffffffffffffffff811115612a5557600080fd5b8301601f81018513612a6657600080fd5b8035612a7181612a03565b604051612a7e82826127c7565b828152876020848601011115612a9357600080fd5b8260208501602083013760006020938201840152979590910135955050505050565b6000610120820190506001600160a01b03808551168352806020860151166020840152806040860151166040840152506060840151612aff60608401826001600160a01b03169052565b506080840151608083015260a084015160a083015260c084015160c083015260e084015160e0830152826101008301529392505050565b60008060408385031215612b4957600080fd5b8235612b548161272a565b946020939093013593505050565b600060208284031215612b7457600080fd5b8135612b7f8161272a565b9392505050565b60008060408385031215612b9957600080fd5b823591506020830135612bab8161272a565b809150509250929050565b60008060208385031215612bc957600080fd5b823567ffffffffffffffff811115612be057600080fd5b612bec8582860161274f565b90969095509350505050565b600060208284031215612c0a57600080fd5b81358015158114612b7f57600080fd5b600060208284031215612c2c57600080fd5b5035919050565b60008060008060008060008060008060006101408c8e031215612c5557600080fd5b8b35612c608161272a565b9a5060208c013567ffffffffffffffff811115612c7c57600080fd5b612c888e828f0161274f565b909b5099505060408c0135612c9c8161272a565b975060608c0135612cac8161272a565b965060808c0135955060a08c0135612cc38161272a565b945060c08c0135935060e08c0135612cda8161272a565b809350506101008c013591506101208c013590509295989b509295989b9093969950565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b61014081526000612d3f61014083018d8f612cfe565b8281036020840152808c5180835260208301915060208e01925060005b81811015612d7a578351835260209384019390920191600101612d5c565b50506001600160a01b038c1660408501529150612d949050565b886060830152876080830152612db560a08301886001600160a01b03169052565b6001600160a01b03861660c08301526001600160a01b03851660e083015261010082019390935261012001529998505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008085851115612e2d57600080fd5b83861115612e3a57600080fd5b5050820193919092039150565b6000610120808352612e5c8184018d8f612cfe565b6001600160a01b039b8c166020850152604084019a909a5250506060810196909652938716608086015291861660a085015290941660c083015260e0820193909352610100019190915292915050565b600082601f830112612ebd57600080fd5b81516020612eca826127f4565b604051612ed782826127c7565b83815260059390931b8501820192828101915086841115612ef757600080fd5b8286015b84811015612887578051612f0e8161272a565b8352918301918301612efb565b60008060408385031215612f2e57600080fd5b825167ffffffffffffffff80821115612f4657600080fd5b818501915085601f830112612f5a57600080fd5b81516020612f67826127f4565b604051612f7482826127c7565b83815260059390931b8501820192828101915089841115612f9457600080fd5b948201945b83861015612fb257855182529482019490820190612f99565b91880151919650909350505080821115612fcb57600080fd5b50612fd885828601612eac565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561302357613023612fe2565b500390565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561306057613060612fe2565b500290565b60008261309b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156130d2576130d2612fe2565b5060010190565b6000602082840312156130eb57600080fd5b5051919050565b60005b8381101561310d5781810151838201526020016130f5565b8381111561203e5750506000910152565b600082516131308184602087016130f2565b9190910192915050565b60006020828403121561314c57600080fd5b815167ffffffffffffffff81111561316357600080fd5b8201601f8101841361317457600080fd5b805161317f81612a03565b60405161318c82826127c7565b8281528660208486010111156131a157600080fd5b6131b28360208301602087016130f2565b9695505050505050565b60208152600082518060208401526131db8160408501602087016130f2565b601f01601f19169190910160400192915050565b6000821982111561320257613202612fe2565b500190565b60006020828403121561321957600080fd5b8151612b7f8161272a565b600060033d111561323d5760046000803e5060005160e01c5b90565b600060443d101561324e5790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff816024840111818411171561329c57505050505090565b82850191508151818111156132b45750505050505090565b843d87010160208285010111156132ce5750505050505090565b6132dd602082860101876127c7565b50909594505050505056fea2646970667358221220a180b913d1291e55709242f4a2075cad9cb6f99ef567338fb1d30a40b108e02a64736f6c634300080a0033000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000420000000000000000000000000000000000000600000000000000000000000071762f1fdc36afc769a25dcd73226c6edca6832a0000000000000000000000000000000000000000000000000000000000000001

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

000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000420000000000000000000000000000000000000600000000000000000000000071762f1fdc36afc769a25dcd73226c6edca6832a0000000000000000000000000000000000000000000000000000000000000001

-----Decoded View---------------
Arg [0] : _preTrade (address): 0xffffffffffffffffffffffffffffffffffffffff
Arg [1] : _weth (address): 0x4200000000000000000000000000000000000006
Arg [2] : _addressTable (address): 0x71762f1fdc36afc769a25dcd73226c6edca6832a
Arg [3] : _autoRegisterAddressMapping (bool): True

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
Arg [1] : 0000000000000000000000004200000000000000000000000000000000000006
Arg [2] : 00000000000000000000000071762f1fdc36afc769a25dcd73226c6edca6832a
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000001


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