false
false

Contract Address Details

0x572c749de059f5cb5659ba5c1b4576b237871af4

Contract Name
L2WethGateway
Creator
0x88888a–872063 at 0x59fc99–6549ad
Balance
0 ETH ( )
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
81239805
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
L2WethGateway




Optimization enabled
true
Compiler version
v0.6.11+commit.5ef660b1




Optimization runs
100
Verified at
2023-08-24T12:54:51.254000Z

contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol

// SPDX-License-Identifier: Apache-2.0

/*
 * Copyright 2020, Offchain Labs, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

pragma solidity ^0.6.11;

import "./L2ArbitrumGateway.sol";
import "../../libraries/IWETH9.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";

contract L2WethGateway is L2ArbitrumGateway {
    using SafeERC20 for IERC20;

    address public l1Weth;
    address public l2Weth;

    function initialize(
        address _l1Counterpart,
        address _router,
        address _l1Weth,
        address _l2Weth
    ) public {
        L2ArbitrumGateway._initialize(_l1Counterpart, _router);
        require(_l1Weth != address(0), "INVALID_L1WETH");
        require(_l2Weth != address(0), "INVALID_L2WETH");
        l1Weth = _l1Weth;
        l2Weth = _l2Weth;
    }

    /**
     * @notice internal utility function used to handle when no contract is deployed at expected address
     * @param l1ERC20 L1 address of ERC20
     */
    function handleNoContract(
        address l1ERC20,
        address, /* expectedL2Address */
        address _from,
        address, /* _to */
        uint256 _amount,
        bytes memory /* deployData */
    ) internal override returns (bool shouldHalt) {
        // it is assumed that the custom token is deployed in the L2 before deposits are made
        // trigger withdrawal
        // this codepath should only be hit if the system is setup incorrectly
        // this withdrawal is for error recovery, not composing with L2 dapps, so we ignore the return value
        triggerWithdrawal(l1ERC20, address(this), _from, _amount, "");
        return true;
    }

    /**
     * @notice Calculate the address used when bridging an ERC20 token
     * @dev the L1 and L2 address oracles may not always be in sync.
     * For example, a custom token may have been registered but not deploy or the contract self destructed.
     * @param l1ERC20 address of L1 token
     * @return L2 address of a bridged ERC20 token
     */
    function calculateL2TokenAddress(address l1ERC20) public view override returns (address) {
        if (l1ERC20 != l1Weth) {
            // invalid L1 weth address
            return address(0);
        }
        return l2Weth;
    }

    function inboundEscrowTransfer(
        address _l2TokenAddress,
        address _dest,
        uint256 _amount
    ) internal override {
        IWETH9(_l2TokenAddress).deposit{ value: _amount }();
        IERC20(_l2TokenAddress).safeTransfer(_dest, _amount);
    }

    function createOutboundTx(
        address _from,
        uint256 _tokenAmount,
        bytes memory _outboundCalldata
    ) internal override returns (uint256) {
        // exitNum incremented after being included in _outboundCalldata
        exitNum++;
        return
            sendTxToL1(
                // we send the amount of weth withdrawn as callvalue to the L1 gateway
                _tokenAmount,
                _from,
                counterpartGateway,
                _outboundCalldata
            );
    }

    receive() external payable {}
}
        

contracts/tokenbridge/libraries/gateway/TokenGateway.sol

// SPDX-License-Identifier: Apache-2.0

/*
 * Copyright 2020, Offchain Labs, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

pragma solidity ^0.6.11;

import "./ITokenGateway.sol";
import "@openzeppelin/contracts/utils/Address.sol";

abstract contract TokenGateway is ITokenGateway {
    using Address for address;

    address public counterpartGateway;
    address public router;

    // This modifier is overriden in gateways to validate the message sender
    // For L1 to L2 messages need to be validated against the aliased counterpartGateway
    // For L2 to L1 messages need to be validated against the bridge and L2ToL1Sender
    // prettier-ignore
    modifier onlyCounterpartGateway() virtual;

    function _initialize(address _counterpartGateway, address _router) internal virtual {
        // This initializes internal variables of the abstract contract it can be chained together with other functions.
        // It is virtual so subclasses can override or wrap around this logic.
        // An example where this is useful is different subclasses that validate the router address differently
        require(_counterpartGateway != address(0), "INVALID_COUNTERPART");
        require(counterpartGateway == address(0), "ALREADY_INIT");
        counterpartGateway = _counterpartGateway;
        router = _router;
    }

    function isRouter(address _target) internal view returns (bool isTargetRouter) {
        return _target == router;
    }

    /**
     * @notice Calculate the address used when bridging an ERC20 token
     * @dev the L1 and L2 address oracles may not always be in sync.
     * For example, a custom token may have been registered but not deploy or the contract self destructed.
     * @param l1ERC20 address of L1 token
     * @return L2 address of a bridged ERC20 token
     */
    function calculateL2TokenAddress(address l1ERC20)
        public
        view
        virtual
        override
        returns (address);
}
          

Contract ABI

[{"type":"event","name":"DepositFinalized","inputs":[{"type":"address","name":"l1Token","internalType":"address","indexed":true},{"type":"address","name":"_from","internalType":"address","indexed":true},{"type":"address","name":"_to","internalType":"address","indexed":true},{"type":"uint256","name":"_amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TxToL1","inputs":[{"type":"address","name":"_from","internalType":"address","indexed":true},{"type":"address","name":"_to","internalType":"address","indexed":true},{"type":"uint256","name":"_id","internalType":"uint256","indexed":true},{"type":"bytes","name":"_data","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"WithdrawalInitiated","inputs":[{"type":"address","name":"l1Token","internalType":"address","indexed":false},{"type":"address","name":"_from","internalType":"address","indexed":true},{"type":"address","name":"_to","internalType":"address","indexed":true},{"type":"uint256","name":"_l2ToL1Id","internalType":"uint256","indexed":true},{"type":"uint256","name":"_exitNum","internalType":"uint256","indexed":false},{"type":"uint256","name":"_amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"calculateL2TokenAddress","inputs":[{"type":"address","name":"l1ERC20","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"counterpartGateway","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"exitNum","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"finalizeInboundTransfer","inputs":[{"type":"address","name":"_token","internalType":"address"},{"type":"address","name":"_from","internalType":"address"},{"type":"address","name":"_to","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes","name":"outboundCalldata","internalType":"bytes"}],"name":"getOutboundCalldata","inputs":[{"type":"address","name":"_token","internalType":"address"},{"type":"address","name":"_from","internalType":"address"},{"type":"address","name":"_to","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"_l1Counterpart","internalType":"address"},{"type":"address","name":"_router","internalType":"address"},{"type":"address","name":"_l1Weth","internalType":"address"},{"type":"address","name":"_l2Weth","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"l1Weth","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"l2Weth","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[{"type":"bytes","name":"","internalType":"bytes"}],"name":"outboundTransfer","inputs":[{"type":"address","name":"_l1Token","internalType":"address"},{"type":"address","name":"_to","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"function","stateMutability":"payable","outputs":[{"type":"bytes","name":"res","internalType":"bytes"}],"name":"outboundTransfer","inputs":[{"type":"address","name":"_l1Token","internalType":"address"},{"type":"address","name":"_to","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"postUpgradeInit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"router","inputs":[]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

0x608060405234801561001057600080fd5b506116ec806100206000396000f3fe6080604052600436106100ab5760003560e01c806395fcea781161006457806395fcea78146102d4578063a0c76a96146102e9578063a7e28d48146103c2578063d2ce7d65146103f5578063f887ea401461048f578063f8c8765e146104a4576100b2565b8063015234ab146100b7578063146bf4b1146100de578063247b27681461010f5780632db09c1c146101245780632e567b36146101395780637b3a3c8b146101d1576100b2565b366100b257005b600080fd5b3480156100c357600080fd5b506100cc6104ef565b60408051918252519081900360200190f35b3480156100ea57600080fd5b506100f36104f5565b604080516001600160a01b039092168252519081900360200190f35b34801561011b57600080fd5b506100f3610504565b34801561013057600080fd5b506100f3610513565b6101cf600480360360a081101561014f57600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561019157600080fd5b8201836020820111156101a357600080fd5b803590602001918460018302840111600160201b831117156101c457600080fd5b509092509050610522565b005b61025f600480360360808110156101e757600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561022157600080fd5b82018360208201111561023357600080fd5b803590602001918460018302840111600160201b8311171561025457600080fd5b5090925090506107c1565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610299578181015183820152602001610281565b50505050905090810190601f1680156102c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102e057600080fd5b506101cf6107dd565b3480156102f557600080fd5b5061025f600480360360a081101561030c57600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561034e57600080fd5b82018360208201111561036057600080fd5b803590602001918460018302840111600160201b8311171561038157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061083a945050505050565b3480156103ce57600080fd5b506100f3600480360360208110156103e557600080fd5b50356001600160a01b0316610932565b61025f600480360360c081101561040b57600080fd5b6001600160a01b0382358116926020810135909116916040820135916060810135916080820135919081019060c0810160a0820135600160201b81111561045157600080fd5b82018360208201111561046357600080fd5b803590602001918460018302840111600160201b8311171561048457600080fd5b509092509050610965565b34801561049b57600080fd5b506100f3610bbf565b3480156104b057600080fd5b506101cf600480360360808110156104c757600080fd5b506001600160a01b038135811691602081013582169160408201358116916060013516610bce565b60025481565b6003546001600160a01b031681565b6004546001600160a01b031681565b6000546001600160a01b031681565b600054610537906001600160a01b0316610ca0565b6001600160a01b0316336001600160a01b031614610597576040805162461bcd60e51b81526020600482015260186024820152774f4e4c595f434f554e544552504152545f4741544557415960401b604482015290519081900360640190fd5b6060806105a48484610cae565b9150915080516000146105c257506040805160208101909152600081525b60006105cd89610932565b90506105e1816001600160a01b0316610dd8565b6106085760006105f58a838b8b8b89610dde565b9050801561060657505050506107b9565b505b60408051600481526024810182526020810180516001600160e01b031663c2eeeebd60e01b178152915181516000936060936001600160a01b038716939092909182918083835b6020831061066e5780518252601f19909201916020918201910161064f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146106ce576040519150601f19603f3d011682016040523d82523d6000602084013e6106d3565b606091505b509150915060008215806106e8575060208251105b156106f557506001610724565b600061070283600c610e0a565b90508c6001600160a01b0316816001600160a01b03161461072257600191505b505b8015610752576107468c308d8c60405180602001604052806000815250610e6a565b505050505050506107b9565b505050610760818888610eea565b866001600160a01b0316886001600160a01b03168a6001600160a01b03167fc7f2e9c55c40a50fbc217dfc70cd39a222940dfa62145aa0ca49eb9535d4fcb2896040518082815260200191505060405180910390a45050505b505050505050565b60606107d38686866000808888610965565b9695505050505050565b60006107e7610f59565b9050336001600160a01b03821614610837576040805162461bcd60e51b815260206004820152600e60248201526d2727aa2fa32927a6afa0a226a4a760911b604482015290519081900360640190fd5b50565b6060632e567b3660e01b8686868661085460025488610f7e565b6040516001600160a01b0380871660248301908152868216604484015290851660648301526084820184905260a060a48301908152835160c484015283519192909160e490910190602085019080838360005b838110156108bf5781810151838201526020016108a7565b50505050905090810190601f1680156108ec5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909a16999099179098525095965050505050505095945050505050565b6003546000906001600160a01b0383811691161461095257506000610960565b506004546001600160a01b03165b919050565b606034156109a5576040805162461bcd60e51b81526020600482015260086024820152674e4f5f56414c554560c01b604482015290519081900360640190fd5b600060606109b233611011565b156109cb576109c18585611025565b9092509050610a08565b33915084848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293505050505b805115610a52576040805162461bcd60e51b8152602060048201526013602482015272115615149057d110551057d11254d050931151606a1b604482015290519081900360640190fd5b600080610a5e8c610932565b9050610a72816001600160a01b0316610dd8565b610ab8576040805162461bcd60e51b81526020600482015260126024820152711513d2d15397d393d517d111541313d6515160721b604482015290519081900360640190fd5b8b6001600160a01b0316816001600160a01b031663c2eeeebd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610afb57600080fd5b505afa158015610b0f573d6000803e3d6000fd5b505050506040513d6020811015610b2557600080fd5b50516001600160a01b031614610b7a576040805162461bcd60e51b81526020600482015260156024820152742727aa2fa2ac2822a1aa22a22fa618afaa27a5a2a760591b604482015290519081900360640190fd5b610b8581858c611063565b9950610b948c858d8d87610e6a565b6040805160208082019390935281518082039093018352810190529c9b505050505050505050505050565b6001546001600160a01b031681565b610bd884846110d8565b6001600160a01b038216610c24576040805162461bcd60e51b815260206004820152600e60248201526d0929cac82989288be9862ae8aa8960931b604482015290519081900360640190fd5b6001600160a01b038116610c70576040805162461bcd60e51b815260206004820152600e60248201526d0929cac82989288be9864ae8aa8960931b604482015290519081900360640190fd5b600380546001600160a01b039384166001600160a01b031991821617909155600480549290931691161790555050565b61111161111160901b010190565b60608083836040811015610cc157600080fd5b810190602081018135600160201b811115610cdb57600080fd5b820183602082011115610ced57600080fd5b803590602001918460018302840111600160201b83111715610d0e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610d6057600080fd5b820183602082011115610d7257600080fd5b803590602001918460018302840111600160201b83111715610d9357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250969b929a509198505050505050505050565b3b151590565b6000610dfc8730878660405180602001604052806000815250610e6a565b506001979650505050505050565b60008160140183511015610e5a576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b500160200151600160601b900490565b60025460009081610e888786610e838b838b848b61083a565b61112e565b604080516001600160a01b038b811682526020820186905281830189905291519293508392828a16928b16917f3073a74ecb728d10be779fe19a74a1428e20468f5b4d167bf9c73d9067847d73919081900360600190a4979650505050505050565b826001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610f2557600080fd5b505af1158015610f39573d6000803e3d6000fd5b50610f54935050506001600160a01b0385169050838361115a565b505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b606082826040516020018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610fc8578181015183820152602001610fb0565b50505050905090810190601f168015610ff55780820380516001836020036101000a031916815260200191505b5060408051601f19818403018152919052979650505050505050565b6001546001600160a01b0390811691161490565b600060608383604081101561103957600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610d6057600080fd5b604080516374f4f54760e01b81526001600160a01b0384811660048301526024820184905291516000928616916374f4f547916044808301928692919082900301818387803b1580156110b557600080fd5b505af11580156110c9573d6000803e3d6000fd5b505050508190505b9392505050565b6110e282826111ac565b6001600160a01b03811661112a576040805162461bcd60e51b815260206004820152600a6024820152692120a22fa927aaaa22a960b11b604482015290519081900360640190fd5b5050565b6002805460010190556000805461115290849086906001600160a01b031685611278565b949350505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610f54908490611411565b6001600160a01b0382166111fd576040805162461bcd60e51b81526020600482015260136024820152721253959053125117d0d3d55395115494105495606a1b604482015290519081900360640190fd5b6000546001600160a01b03161561124a576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600080546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b604080516349460b4d60e11b81526001600160a01b0384166004820190815260248201928352835160448301528351600093849360649363928c169a938b938a938a93929088019060208501908083838d5b838110156112e25781810151838201526020016112ca565b50505050905090810190601f16801561130f5780820380516001836020036101000a031916815260200191505b5093505050506020604051808303818588803b15801561132e57600080fd5b505af1158015611342573d6000803e3d6000fd5b50505050506040513d602081101561135957600080fd5b5051604080516020808252865182820152865193945084936001600160a01b03808a1694908b16937f2b986d32a0536b7e19baa48ab949fec7b903b7fad7730820b20632d100cc3a68938a93919283929083019185019080838360005b838110156113ce5781810151838201526020016113b6565b50505050905090810190601f1680156113fb5780820380516001836020036101000a031916815260200191505b509250505060405180910390a495945050505050565b6060611466826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114c29092919063ffffffff16565b805190915015610f545780806020019051602081101561148557600080fd5b5051610f545760405162461bcd60e51b815260040180806020018281038252602a81526020018061168d602a913960400191505060405180910390fd5b60606111528484600085856114d685610dd8565b611527576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106115665780518252601f199092019160209182019101611547565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146115c8576040519150601f19603f3d011682016040523d82523d6000602084013e6115cd565b606091505b50915091506115dd8282866115e8565b979650505050505050565b606083156115f75750816110d1565b8251156116075782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611651578181015183820152602001611639565b50505050905090810190601f16801561167e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122023c929e5bf7855752931809fd3c464304201c64ecd7e5daf9ba4e23844c1481964736f6c634300060b0033

Deployed ByteCode

0x6080604052600436106100ab5760003560e01c806395fcea781161006457806395fcea78146102d4578063a0c76a96146102e9578063a7e28d48146103c2578063d2ce7d65146103f5578063f887ea401461048f578063f8c8765e146104a4576100b2565b8063015234ab146100b7578063146bf4b1146100de578063247b27681461010f5780632db09c1c146101245780632e567b36146101395780637b3a3c8b146101d1576100b2565b366100b257005b600080fd5b3480156100c357600080fd5b506100cc6104ef565b60408051918252519081900360200190f35b3480156100ea57600080fd5b506100f36104f5565b604080516001600160a01b039092168252519081900360200190f35b34801561011b57600080fd5b506100f3610504565b34801561013057600080fd5b506100f3610513565b6101cf600480360360a081101561014f57600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561019157600080fd5b8201836020820111156101a357600080fd5b803590602001918460018302840111600160201b831117156101c457600080fd5b509092509050610522565b005b61025f600480360360808110156101e757600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561022157600080fd5b82018360208201111561023357600080fd5b803590602001918460018302840111600160201b8311171561025457600080fd5b5090925090506107c1565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610299578181015183820152602001610281565b50505050905090810190601f1680156102c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102e057600080fd5b506101cf6107dd565b3480156102f557600080fd5b5061025f600480360360a081101561030c57600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561034e57600080fd5b82018360208201111561036057600080fd5b803590602001918460018302840111600160201b8311171561038157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061083a945050505050565b3480156103ce57600080fd5b506100f3600480360360208110156103e557600080fd5b50356001600160a01b0316610932565b61025f600480360360c081101561040b57600080fd5b6001600160a01b0382358116926020810135909116916040820135916060810135916080820135919081019060c0810160a0820135600160201b81111561045157600080fd5b82018360208201111561046357600080fd5b803590602001918460018302840111600160201b8311171561048457600080fd5b509092509050610965565b34801561049b57600080fd5b506100f3610bbf565b3480156104b057600080fd5b506101cf600480360360808110156104c757600080fd5b506001600160a01b038135811691602081013582169160408201358116916060013516610bce565b60025481565b6003546001600160a01b031681565b6004546001600160a01b031681565b6000546001600160a01b031681565b600054610537906001600160a01b0316610ca0565b6001600160a01b0316336001600160a01b031614610597576040805162461bcd60e51b81526020600482015260186024820152774f4e4c595f434f554e544552504152545f4741544557415960401b604482015290519081900360640190fd5b6060806105a48484610cae565b9150915080516000146105c257506040805160208101909152600081525b60006105cd89610932565b90506105e1816001600160a01b0316610dd8565b6106085760006105f58a838b8b8b89610dde565b9050801561060657505050506107b9565b505b60408051600481526024810182526020810180516001600160e01b031663c2eeeebd60e01b178152915181516000936060936001600160a01b038716939092909182918083835b6020831061066e5780518252601f19909201916020918201910161064f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146106ce576040519150601f19603f3d011682016040523d82523d6000602084013e6106d3565b606091505b509150915060008215806106e8575060208251105b156106f557506001610724565b600061070283600c610e0a565b90508c6001600160a01b0316816001600160a01b03161461072257600191505b505b8015610752576107468c308d8c60405180602001604052806000815250610e6a565b505050505050506107b9565b505050610760818888610eea565b866001600160a01b0316886001600160a01b03168a6001600160a01b03167fc7f2e9c55c40a50fbc217dfc70cd39a222940dfa62145aa0ca49eb9535d4fcb2896040518082815260200191505060405180910390a45050505b505050505050565b60606107d38686866000808888610965565b9695505050505050565b60006107e7610f59565b9050336001600160a01b03821614610837576040805162461bcd60e51b815260206004820152600e60248201526d2727aa2fa32927a6afa0a226a4a760911b604482015290519081900360640190fd5b50565b6060632e567b3660e01b8686868661085460025488610f7e565b6040516001600160a01b0380871660248301908152868216604484015290851660648301526084820184905260a060a48301908152835160c484015283519192909160e490910190602085019080838360005b838110156108bf5781810151838201526020016108a7565b50505050905090810190601f1680156108ec5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909a16999099179098525095965050505050505095945050505050565b6003546000906001600160a01b0383811691161461095257506000610960565b506004546001600160a01b03165b919050565b606034156109a5576040805162461bcd60e51b81526020600482015260086024820152674e4f5f56414c554560c01b604482015290519081900360640190fd5b600060606109b233611011565b156109cb576109c18585611025565b9092509050610a08565b33915084848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293505050505b805115610a52576040805162461bcd60e51b8152602060048201526013602482015272115615149057d110551057d11254d050931151606a1b604482015290519081900360640190fd5b600080610a5e8c610932565b9050610a72816001600160a01b0316610dd8565b610ab8576040805162461bcd60e51b81526020600482015260126024820152711513d2d15397d393d517d111541313d6515160721b604482015290519081900360640190fd5b8b6001600160a01b0316816001600160a01b031663c2eeeebd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610afb57600080fd5b505afa158015610b0f573d6000803e3d6000fd5b505050506040513d6020811015610b2557600080fd5b50516001600160a01b031614610b7a576040805162461bcd60e51b81526020600482015260156024820152742727aa2fa2ac2822a1aa22a22fa618afaa27a5a2a760591b604482015290519081900360640190fd5b610b8581858c611063565b9950610b948c858d8d87610e6a565b6040805160208082019390935281518082039093018352810190529c9b505050505050505050505050565b6001546001600160a01b031681565b610bd884846110d8565b6001600160a01b038216610c24576040805162461bcd60e51b815260206004820152600e60248201526d0929cac82989288be9862ae8aa8960931b604482015290519081900360640190fd5b6001600160a01b038116610c70576040805162461bcd60e51b815260206004820152600e60248201526d0929cac82989288be9864ae8aa8960931b604482015290519081900360640190fd5b600380546001600160a01b039384166001600160a01b031991821617909155600480549290931691161790555050565b61111161111160901b010190565b60608083836040811015610cc157600080fd5b810190602081018135600160201b811115610cdb57600080fd5b820183602082011115610ced57600080fd5b803590602001918460018302840111600160201b83111715610d0e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610d6057600080fd5b820183602082011115610d7257600080fd5b803590602001918460018302840111600160201b83111715610d9357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250969b929a509198505050505050505050565b3b151590565b6000610dfc8730878660405180602001604052806000815250610e6a565b506001979650505050505050565b60008160140183511015610e5a576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b500160200151600160601b900490565b60025460009081610e888786610e838b838b848b61083a565b61112e565b604080516001600160a01b038b811682526020820186905281830189905291519293508392828a16928b16917f3073a74ecb728d10be779fe19a74a1428e20468f5b4d167bf9c73d9067847d73919081900360600190a4979650505050505050565b826001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610f2557600080fd5b505af1158015610f39573d6000803e3d6000fd5b50610f54935050506001600160a01b0385169050838361115a565b505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b606082826040516020018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610fc8578181015183820152602001610fb0565b50505050905090810190601f168015610ff55780820380516001836020036101000a031916815260200191505b5060408051601f19818403018152919052979650505050505050565b6001546001600160a01b0390811691161490565b600060608383604081101561103957600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610d6057600080fd5b604080516374f4f54760e01b81526001600160a01b0384811660048301526024820184905291516000928616916374f4f547916044808301928692919082900301818387803b1580156110b557600080fd5b505af11580156110c9573d6000803e3d6000fd5b505050508190505b9392505050565b6110e282826111ac565b6001600160a01b03811661112a576040805162461bcd60e51b815260206004820152600a6024820152692120a22fa927aaaa22a960b11b604482015290519081900360640190fd5b5050565b6002805460010190556000805461115290849086906001600160a01b031685611278565b949350505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610f54908490611411565b6001600160a01b0382166111fd576040805162461bcd60e51b81526020600482015260136024820152721253959053125117d0d3d55395115494105495606a1b604482015290519081900360640190fd5b6000546001600160a01b03161561124a576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600080546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b604080516349460b4d60e11b81526001600160a01b0384166004820190815260248201928352835160448301528351600093849360649363928c169a938b938a938a93929088019060208501908083838d5b838110156112e25781810151838201526020016112ca565b50505050905090810190601f16801561130f5780820380516001836020036101000a031916815260200191505b5093505050506020604051808303818588803b15801561132e57600080fd5b505af1158015611342573d6000803e3d6000fd5b50505050506040513d602081101561135957600080fd5b5051604080516020808252865182820152865193945084936001600160a01b03808a1694908b16937f2b986d32a0536b7e19baa48ab949fec7b903b7fad7730820b20632d100cc3a68938a93919283929083019185019080838360005b838110156113ce5781810151838201526020016113b6565b50505050905090810190601f1680156113fb5780820380516001836020036101000a031916815260200191505b509250505060405180910390a495945050505050565b6060611466826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114c29092919063ffffffff16565b805190915015610f545780806020019051602081101561148557600080fd5b5051610f545760405162461bcd60e51b815260040180806020018281038252602a81526020018061168d602a913960400191505060405180910390fd5b60606111528484600085856114d685610dd8565b611527576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106115665780518252601f199092019160209182019101611547565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146115c8576040519150601f19603f3d011682016040523d82523d6000602084013e6115cd565b606091505b50915091506115dd8282866115e8565b979650505050505050565b606083156115f75750816110d1565b8251156116075782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611651578181015183820152602001611639565b50505050905090810190601f16801561167e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122023c929e5bf7855752931809fd3c464304201c64ecd7e5daf9ba4e23844c1481964736f6c634300060b0033