Contract 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b 3

 
Txn Hash Method
Block
From
To
Value
0x1fe250cfd0894e2d8cb1a3f8479a1235cf2fc7fbc5a154fa5ffe0976ec60663d0x608060409550692023-02-01 15:25:04129 days 6 hrs ago0x6dcb5e43b05918505f65bf423088af172c32be33 IN  Create: Portal0 Ether0.0043676271
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x1abea3b1be173b21b8530d7cf2b6bd5ab39f524b9d7095e9b030b6bbcffb950e10229592023-06-10 20:08:261 hr 46 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0xefdb8540af5f0ce08d08fb27cde6a66ef06d45cdde217f45ac772cb81b72a78810229582023-06-10 20:06:231 hr 48 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0xf27de584b35fe89b409d9a9895a748dba5848fdda94e7a62cc955e9e28cb5caf10229532023-06-10 19:55:291 hr 58 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0xd64e741234d1cf7f181ca8b2436c4742c8236b61d6f80bc7d0205b6bdbb1154810229522023-06-10 19:55:051 hr 59 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0xa82f5afdb2c643df840109952e611d352a14e1d5e15cd6d12d89abdad3dabea610229492023-06-10 19:50:062 hrs 4 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0xeec4c250bafe873eef2fd162c7c45ce742b387b42c20efd367fc1d56917955f110228402023-06-10 13:34:088 hrs 20 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0x220fb68d96a2e5dfd73816349d86c87a7c70bf12585070ce7debc1322cd107b810228102023-06-10 12:39:259 hrs 15 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0xb9acb5de803868828cb0bfbebde3b5d7fce6fa909874dc1f3f0a142cd026bc9e10228002023-06-10 12:32:429 hrs 21 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0x31d82b5f943bee96d4e88a16e974f82e9cf5034b9a579cac7bca1f883071dbc810227942023-06-10 12:29:099 hrs 25 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0x84e51a29a03305662fbb4c6983a92117cf3df61692b0fd621daba9db5c3ec11010227922023-06-10 12:26:049 hrs 28 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0xa140ca1019a620cc4a15e681ed34806d8c660005a3c401ca48cc9244111319c810227882023-06-10 12:21:049 hrs 33 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0xf12bd9e251f98a9b4d2f4b0adff9f6173449bbf1f95d224582b72c7b7dad226810227572023-06-10 11:08:2610 hrs 46 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0x22410fd86b6cdcbec259e49bf898704c39f2b4051824841178bc871ea0fda55410227552023-06-10 11:01:4510 hrs 52 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0x3afd699e6ce2e47f1aa2ec8a5fa27c80d01d75fef18a7466879acb79c052d10f10227542023-06-10 10:56:3110 hrs 57 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0x306a13c06cceebe4ff5b427d91bd48afec431f1ef1526b798a6245b22ec4526510227522023-06-10 10:55:0410 hrs 59 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0xa3142afcef2aba5fa7f436d07409d5bead27a737a52f850da1d02a725d50455e10227502023-06-10 10:50:0411 hrs 4 mins ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0x3386ebf76b218715181d4651c0c692ef6b3e17813d56009dd1cc52efe45a5ff010222722023-06-09 11:47:211 day 10 hrs ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0x05b85442e9ed47e7c9f269f43f4ec564e6431770346684372f89b1d4b4be275810222682023-06-09 11:43:501 day 10 hrs ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0x13c3f345c77dcd4d3a7de2920cb341a86c4225bbb98809452aad3c3bc4d6e84410222372023-06-09 9:27:311 day 12 hrs ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0x47cc4317ca6ce73086da694f9181df6fb94093d3c22c32d048e4c72a2d65dea410222162023-06-09 7:16:551 day 14 hrs ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0x14b9692f2df67ffca13cbb431db7405f4c69079591921e667a3425e182621e3710222152023-06-09 7:15:041 day 14 hrs ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0x6337ff7332c8be7a22d42f10ab1124c14f9301b8e78d8c9e04af6cb9823a1ea210222142023-06-09 7:13:361 day 14 hrs ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0xd3d7927be90c6208ae1d091733fad176116f4193a834d8b29fc2543b266f1b6a10220572023-06-08 16:47:322 days 5 hrs ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0xf41c02d99ca398653c1d3e53e872948642941782abbdc849391277231537025010220562023-06-08 16:46:082 days 5 hrs ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
0x414858d40b9f7d424c1e5dafb41f0f607c3aaa05dd3dab014126d4f7ba943b2610220552023-06-08 16:43:272 days 5 hrs ago 0xb8f275fbf7a959f4bce59999a2ef122a099e81a8 0xf1c374d065719ce1fdc63e2c5c13146813c0a83b0 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Portal

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion
File 1 of 14 : Portal.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol";
import "./interfaces/IBridge.sol";
import "@uniswap/lib/contracts/libraries/TransferHelper.sol";
import "../utils/RelayRecipientUpgradeable.sol";
import "./interfaces/IWrapper.sol";
import "./metarouter/interfaces/IMetaRouter.sol";

/**
 * @title A contract that synthesizes tokens
 * @notice In order to create a synthetic representation on another network, the user must call synthesize function here
 * @dev All function calls are currently implemented without side effects
 */
contract Portal is RelayRecipientUpgradeable {
    /// ** PUBLIC states **

    address public wrapper;
    address public bridge;
    uint256 public requestCount;
    bool public paused;
    mapping(bytes32 => TxState) public requests;
    mapping(bytes32 => UnsynthesizeState) public unsynthesizeStates;
    mapping(address => uint256) public balanceOf;
    mapping(address => uint256) public tokenThreshold;
    mapping(address => bool) public tokenWhitelist;

    IMetaRouter public metaRouter;

    /// ** STRUCTS **

    enum RequestState {
        Default,
        Sent,
        Reverted
    }
    enum UnsynthesizeState {
        Default,
        Unsynthesized,
        RevertRequest
    }

    struct TxState {
        address recipient;
        address chain2address;
        uint256 amount;
        address rtoken;
        RequestState state;
    }

    struct SynthesizeWithPermitTransaction {
        uint256 stableBridgingFee;
        bytes approvalData;
        address token;
        uint256 amount;
        address chain2address;
        address receiveSide;
        address oppositeBridge;
        address revertableAddress;
        uint256 chainID;
        bytes32 clientID;
    }

    /// ** EVENTS **

    event SynthesizeRequest(
        bytes32 id,
        address indexed from,
        uint256 indexed chainID,
        address indexed revertableAddress,
        address to,
        uint256 amount,
        address token
    );

    event RevertBurnRequest(bytes32 indexed id, address indexed to);

    event ClientIdLog(bytes32 requestId, bytes32 indexed clientId);

    event MetaRevertRequest(bytes32 indexed id, address indexed to);

    event BurnCompleted(
        bytes32 indexed id,
        address indexed to,
        uint256 amount,
        uint256 bridgingFee,
        address token
    );

    event RevertSynthesizeCompleted(
        bytes32 indexed id,
        address indexed to,
        uint256 amount,
        uint256 bridgingFee,
        address token
    );

    event Paused(address account);

    event Unpaused(address account);

    event SetWhitelistToken(address token, bool activate);

    event SetTokenThreshold(address token, uint256 threshold);

    event SetMetaRouter(address metaRouter);

    /// ** MODIFIERs **

    modifier onlyBridge() {
        require(bridge == msg.sender, "Symb: caller is not the bridge");
        _;
    }

    modifier whenNotPaused() {
        require(!paused, "Symb: paused");
        _;
    }

    /// ** INITIALIZER **

    /**
     * init
     */
    function initialize(
        address _bridge,
        address _trustedForwarder,
        address _wrapper,
        address _whitelistedToken,
        IMetaRouter _metaRouter
    ) public virtual initializer {
        __RelayRecipient_init(_trustedForwarder);
        bridge = _bridge;
        wrapper = _wrapper;
        metaRouter = _metaRouter;

        if (_whitelistedToken != address(0)) {
            tokenWhitelist[_whitelistedToken] = true;
        }
    }

    /// ** EXTERNAL PURE functions **

    /**
     * @notice Returns version
     */
    function versionRecipient() external pure returns (string memory) {
        return "2.0.1";
    }

    // ** EXTERNAL functions **

    /**
     * @notice Sends synthesize request
     * @dev Token -> sToken on a second chain
     * @param _stableBridgingFee Bridging fee on another network
     * @param _token The address of the token that the user wants to synthesize
     * @param _amount Number of tokens to synthesize
     * @param _chain2address The address to which the user wants to receive the synth asset on another network
     * @param _receiveSide Synthesis address on another network
     * @param _oppositeBridge Bridge address on another network
     * @param _revertableAddress An address on another network that allows the user to revert a stuck request
     * @param _chainID Chain id of the network where synthesization will take place
     */
    function synthesize(
        uint256 _stableBridgingFee,
        address _token,
        uint256 _amount,
        address _chain2address,
        address _receiveSide,
        address _oppositeBridge,
        address _revertableAddress,
        uint256 _chainID,
        bytes32 _clientID
    ) external whenNotPaused returns (bytes32) {
        require(tokenWhitelist[_token], "Symb: unauthorized token");
        require(_amount >= tokenThreshold[_token], "Symb: amount under threshold");
        TransferHelper.safeTransferFrom(
            _token,
            _msgSender(),
            address(this),
            _amount
        );

        return
        sendSynthesizeRequest(
            _stableBridgingFee,
            _token,
            _amount,
            _chain2address,
            _receiveSide,
            _oppositeBridge,
            _revertableAddress,
            _chainID,
            _clientID
        );
    }

    /**
     * @notice Sends metaSynthesizeOffchain request
     * @dev Token -> sToken on a second chain -> final token on a second chain
     * @param _metaSynthesizeTransaction metaSynthesize offchain transaction data
     */
    function metaSynthesize(
        MetaRouteStructs.MetaSynthesizeTransaction
        memory _metaSynthesizeTransaction
    ) external whenNotPaused returns (bytes32) {
        require(tokenWhitelist[_metaSynthesizeTransaction.rtoken], "Symb: unauthorized token");
        require(_metaSynthesizeTransaction.amount >= tokenThreshold[_metaSynthesizeTransaction.rtoken],
            "Symb: amount under threshold");

        TransferHelper.safeTransferFrom(
            _metaSynthesizeTransaction.rtoken,
            _msgSender(),
            address(this),
            _metaSynthesizeTransaction.amount
        );

        return sendMetaSynthesizeRequest(_metaSynthesizeTransaction);
    }

    /**
     * @notice Native -> sToken on a second chain
     * @param _stableBridgingFee Bridging fee on another network
     * @param _chain2address The address to which the user wants to receive the synth asset on another network
     * @param _receiveSide Synthesis address on another network
     * @param _oppositeBridge Bridge address on another network
     * @param _chainID Chain id of the network where synthesization will take place
     */
    function synthesizeNative(
        uint256 _stableBridgingFee,
        address _chain2address,
        address _receiveSide,
        address _oppositeBridge,
        address _revertableAddress,
        uint256 _chainID,
        bytes32 _clientID
    ) external payable whenNotPaused returns (bytes32) {
        require(tokenWhitelist[wrapper], "Symb: unauthorized token");
        require(msg.value >= tokenThreshold[wrapper], "Symb: amount under threshold");

        IWrapper(wrapper).deposit{value : msg.value}();

        return
        sendSynthesizeRequest(
            _stableBridgingFee,
            wrapper,
            msg.value,
            _chain2address,
            _receiveSide,
            _oppositeBridge,
            _revertableAddress,
            _chainID,
            _clientID
        );
    }

    /**
     * @notice Token -> sToken on a second chain withPermit
     * @param _syntWithPermitTx SynthesizeWithPermit offchain transaction data
     */
    function synthesizeWithPermit(
        SynthesizeWithPermitTransaction memory _syntWithPermitTx
    ) external whenNotPaused returns (bytes32) {
        require(tokenWhitelist[_syntWithPermitTx.token], "Symb: unauthorized token");
        require(_syntWithPermitTx.amount >= tokenThreshold[_syntWithPermitTx.token], "Symb: amount under threshold");
        {
            (
            address owner,
            uint256 value,
            uint256 deadline,
            uint8 v,
            bytes32 r,
            bytes32 s
            ) = abi.decode(
                _syntWithPermitTx.approvalData,
                (address, uint256, uint256, uint8, bytes32, bytes32)
            );
            IERC20Permit(_syntWithPermitTx.token).permit(
                owner,
                address(this),
                value,
                deadline,
                v,
                r,
                s
            );
        }

        TransferHelper.safeTransferFrom(
            _syntWithPermitTx.token,
            _msgSender(),
            address(this),
            _syntWithPermitTx.amount
        );

        return
        sendSynthesizeRequest(
            _syntWithPermitTx.stableBridgingFee,
            _syntWithPermitTx.token,
            _syntWithPermitTx.amount,
            _syntWithPermitTx.chain2address,
            _syntWithPermitTx.receiveSide,
            _syntWithPermitTx.oppositeBridge,
            _syntWithPermitTx.revertableAddress,
            _syntWithPermitTx.chainID,
            _syntWithPermitTx.clientID
        );
    }

    /**
     * @notice Emergency unsynthesize
     * @dev Can called only by bridge after initiation on a second chain
     * @dev If a transaction arrives at the synthesization chain with an already completed revert synthesize contract will fail this transaction,
     * since the state was changed during the call to the desynthesis request
     * @param _stableBridgingFee Bridging fee
     * @param _externalID the synthesize transaction that was received from the event when it was originally called synthesize on the Portal contract
     */
    function revertSynthesize(uint256 _stableBridgingFee, bytes32 _externalID) external onlyBridge whenNotPaused {
        TxState storage txState = requests[_externalID];
        require(
            txState.state == RequestState.Sent,
            "Symb: state not open or tx does not exist"
        );
        txState.state = RequestState.Reverted;
        // close
        balanceOf[txState.rtoken] = balanceOf[txState.rtoken] - txState.amount;

        TransferHelper.safeTransfer(
            txState.rtoken,
            txState.recipient,
            txState.amount - _stableBridgingFee
        );

        TransferHelper.safeTransfer(
            txState.rtoken,
            bridge,
            _stableBridgingFee
        );

        emit RevertSynthesizeCompleted(
            _externalID,
            txState.recipient,
            txState.amount - _stableBridgingFee, 
            _stableBridgingFee,
            txState.rtoken
        );
    }

    /**
     * @notice Revert synthesize
     * @dev After revertSynthesizeRequest in Synthesis this method is called
     * @param _stableBridgingFee Bridging fee
     * @param _externalID the burn transaction that was received from the event when it was originally called burn on the Synthesis contract
     * @param _token The address of the token to unsynthesize
     * @param _amount Number of tokens to unsynthesize
     * @param _to The address to receive tokens
     */
    function unsynthesize(
        uint256 _stableBridgingFee,
        bytes32 _externalID,
        address _token,
        uint256 _amount,
        address _to
    ) external onlyBridge whenNotPaused {
        require(
            unsynthesizeStates[_externalID] == UnsynthesizeState.Default,
            "Symb: synthetic tokens emergencyUnburn"
        );
        balanceOf[_token] = balanceOf[_token] - _amount;
        unsynthesizeStates[_externalID] = UnsynthesizeState.Unsynthesized;
        TransferHelper.safeTransfer(_token, _to, _amount - _stableBridgingFee);
        TransferHelper.safeTransfer(_token, bridge, _stableBridgingFee);
        emit BurnCompleted(_externalID, _to, _amount - _stableBridgingFee, _stableBridgingFee, _token);
    }

    /**
     * @notice Unsynthesize and final call on second chain
     * @dev Token -> sToken on a first chain -> final token on a second chain
     * @param _stableBridgingFee Number of tokens to send to bridge (fee)
     * @param _externalID the metaBurn transaction that was received from the event when it was originally called metaBurn on the Synthesis contract
     * @param _to The address to receive tokens
     * @param _amount Number of tokens to unsynthesize
     * @param _rToken The address of the token to unsynthesize
     * @param _finalReceiveSide router for final call
     * @param _finalCalldata encoded call of a final function
     * @param _finalOffset offset to patch _amount to _finalCalldata
     */
    function metaUnsynthesize(
        uint256 _stableBridgingFee,
        bytes32 _externalID,
        address _to,
        uint256 _amount,
        address _rToken,
        address _finalReceiveSide,
        bytes memory _finalCalldata,
        uint256 _finalOffset
    ) external onlyBridge whenNotPaused {
        require(
            unsynthesizeStates[_externalID] == UnsynthesizeState.Default,
            "Symb: synthetic tokens emergencyUnburn"
        );

        balanceOf[_rToken] = balanceOf[_rToken] - _amount;
        unsynthesizeStates[_externalID] = UnsynthesizeState.Unsynthesized;
        TransferHelper.safeTransfer(_rToken, bridge, _stableBridgingFee);
        _amount = _amount - _stableBridgingFee;

        if (_finalCalldata.length == 0) {
            TransferHelper.safeTransfer(_rToken, _to, _amount);
            emit BurnCompleted(_externalID, address(this), _amount, _stableBridgingFee, _rToken);
            return;
        }

        // transfer ERC20 tokens to MetaRouter
        TransferHelper.safeTransfer(
            _rToken,
            address(metaRouter),
            _amount
        );

        // metaRouter call
        metaRouter.externalCall(_rToken, _amount, _finalReceiveSide, _finalCalldata, _finalOffset);

        emit BurnCompleted(_externalID, address(this), _amount, _stableBridgingFee, _rToken);
    }

    /**
     * @notice Revert burnSyntheticToken() operation
     * @dev Can called only by bridge after initiation on a second chain
     * @dev Further, this transaction also enters the relay network and is called on the other side under the method "revertBurn"
     * @param _stableBridgingFee Bridging fee on another network
     * @param _internalID the synthesize transaction that was received from the event when it was originally called burn on the Synthesize contract
     * @param _receiveSide Synthesis address on another network
     * @param _oppositeBridge Bridge address on another network
     * @param _chainId Chain id of the network
     */
    function revertBurnRequest(
        uint256 _stableBridgingFee,
        bytes32 _internalID,
        address _receiveSide,
        address _oppositeBridge,
        uint256 _chainId,
        bytes32 _clientID
    ) external whenNotPaused {
        bytes32 externalID = keccak256(abi.encodePacked(_internalID, address(this), _msgSender(), block.chainid));

        require(
            unsynthesizeStates[externalID] != UnsynthesizeState.Unsynthesized,
            "Symb: Real tokens already transfered"
        );
        unsynthesizeStates[externalID] = UnsynthesizeState.RevertRequest;

        {
            bytes memory out = abi.encodeWithSelector(
                bytes4(keccak256(bytes("revertBurn(uint256,bytes32)"))),
                _stableBridgingFee,
                externalID
            );
            IBridge(bridge).transmitRequestV2(
                out,
                _receiveSide,
                _oppositeBridge,
                _chainId
            );
        }

        emit RevertBurnRequest(_internalID, _msgSender());
        emit ClientIdLog(_internalID, _clientID);
    }

     function metaRevertRequest(
        MetaRouteStructs.MetaRevertTransaction memory _metaRevertTransaction
    ) external whenNotPaused {
         if (_metaRevertTransaction.swapCalldata.length != 0){
            bytes32 externalID = keccak256(abi.encodePacked(_metaRevertTransaction.internalID, address(this), _msgSender(), block.chainid));

            require(
                unsynthesizeStates[externalID] != UnsynthesizeState.Unsynthesized,
                "Symb: Real tokens already transfered"
            );

            unsynthesizeStates[externalID] = UnsynthesizeState.RevertRequest;

            {
                bytes memory out = abi.encodeWithSelector(
                    bytes4(keccak256(bytes("revertMetaBurn(uint256,bytes32,address,bytes,address,address,bytes)"))),
                        _metaRevertTransaction.stableBridgingFee,
                        externalID,
                        _metaRevertTransaction.router,
                        _metaRevertTransaction.swapCalldata,
                        _metaRevertTransaction.sourceChainSynthesis,
                        _metaRevertTransaction.burnToken,
                        _metaRevertTransaction.burnCalldata
                );

                IBridge(bridge).transmitRequestV2(
                    out,
                    _metaRevertTransaction.receiveSide,
                    _metaRevertTransaction.managerChainBridge,
                    _metaRevertTransaction.managerChainId
                );
                emit RevertBurnRequest(_metaRevertTransaction.internalID, _msgSender());
                emit ClientIdLog(_metaRevertTransaction.internalID, _metaRevertTransaction.clientID);
            }
         } else {
             if (_metaRevertTransaction.burnCalldata.length != 0){
                 bytes32 externalID = keccak256(abi.encodePacked(_metaRevertTransaction.internalID, address(this), _msgSender(), block.chainid));

                 require(
                     unsynthesizeStates[externalID] != UnsynthesizeState.Unsynthesized,
                     "Symb: Real tokens already transfered"
                 );

                 unsynthesizeStates[externalID] = UnsynthesizeState.RevertRequest;

                 bytes memory out = abi.encodeWithSelector(
                     bytes4(keccak256(bytes("revertBurnAndBurn(uint256,bytes32,address,address,uint256,address)"))),
                        _metaRevertTransaction.stableBridgingFee,
                         externalID,
                         address(this),
                        _metaRevertTransaction.sourceChainBridge,
                        block.chainid,
                        _msgSender()
                 );

                 IBridge(bridge).transmitRequestV2(
                     out,
                     _metaRevertTransaction.sourceChainSynthesis,
                     _metaRevertTransaction.managerChainBridge,
                     _metaRevertTransaction.managerChainId
                 );
                 emit RevertBurnRequest(_metaRevertTransaction.internalID, _msgSender());
                 emit ClientIdLog(_metaRevertTransaction.internalID, _metaRevertTransaction.clientID);
             } else {
                 bytes memory out = abi.encodeWithSelector(
                     bytes4(keccak256(bytes("revertSynthesizeRequestByBridge(uint256,bytes32,address,address,uint256,address,bytes32)"))),
                        _metaRevertTransaction.stableBridgingFee,
                        _metaRevertTransaction.internalID,
                        _metaRevertTransaction.receiveSide,
                        _metaRevertTransaction.sourceChainBridge,
                        block.chainid,
                        _msgSender(),
                        _metaRevertTransaction.clientID
                 );

                 IBridge(bridge).transmitRequestV2(
                     out,
                     _metaRevertTransaction.sourceChainSynthesis,
                     _metaRevertTransaction.managerChainBridge,
                     _metaRevertTransaction.managerChainId
                 );
             }
         }
         emit MetaRevertRequest(_metaRevertTransaction.internalID, _msgSender());
    }

    // ** ONLYOWNER functions **

    /**
     * @notice Set paused flag to true
     */
    function pause() external onlyOwner {
        paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @notice Set paused flag to false
     */
    function unpause() external onlyOwner {
        paused = false;
        emit Unpaused(_msgSender());
    }

    /**
     * @notice Sets token to tokenWhitelist
     * @param _token Address of token to add to whitelist
     * @param _activate true - add to whitelist, false - remove from whitelist
     */
    function setWhitelistToken(address _token, bool _activate) external onlyOwner {
        tokenWhitelist[_token] = _activate;
        emit SetWhitelistToken(_token, _activate);
    }

    /**
     * @notice Sets minimal price for token
     * @param _token Address of token to set threshold
     * @param _threshold threshold to set
     */
    function setTokenThreshold(address _token, uint256 _threshold) external onlyOwner {
        tokenThreshold[_token] = _threshold;
        emit SetTokenThreshold(_token, _threshold);
    }

    /**
     * @notice Sets MetaRouter address
     * @param _metaRouter Address of metaRouter
     */
    function setMetaRouter(IMetaRouter _metaRouter) external onlyOwner {
        require(address(_metaRouter) != address(0), "Symb: metaRouter cannot be zero address");
        metaRouter = _metaRouter;
        emit SetMetaRouter(address(_metaRouter));
    }

    /// ** INTERNAL functions **

    /**
     * @dev Sends synthesize request
     * @dev Internal function used in synthesize, synthesizeNative, synthesizeWithPermit
     */
    function sendSynthesizeRequest(
        uint256 _stableBridgingFee,
        address _token,
        uint256 _amount,
        address _chain2address,
        address _receiveSide,
        address _oppositeBridge,
        address _revertableAddress,
        uint256 _chainID,
        bytes32 _clientID
    ) internal returns (bytes32 internalID) {
        balanceOf[_token] = balanceOf[_token] + _amount;

        if (_revertableAddress == address(0)) {
            _revertableAddress = _chain2address;
        }

        internalID = keccak256(abi.encodePacked(this, requestCount, block.chainid));
        {
            bytes32 externalID = keccak256(abi.encodePacked(internalID, _receiveSide, _revertableAddress, _chainID));

            {
                bytes memory out = abi.encodeWithSelector(
                    bytes4(
                        keccak256(
                            bytes(
                                "mintSyntheticToken(uint256,bytes32,address,uint256,uint256,address)"
                            )
                        )
                    ),
                    _stableBridgingFee,
                    externalID,
                    _token,
                    block.chainid,
                    _amount,
                    _chain2address
                );

                requests[externalID] = TxState({
                recipient : _msgSender(),
                chain2address : _chain2address,
                rtoken : _token,
                amount : _amount,
                state : RequestState.Sent
                });

                requestCount++;
                IBridge(bridge).transmitRequestV2(
                    out,
                    _receiveSide,
                    _oppositeBridge,
                    _chainID
                );
            }
        }

        emit SynthesizeRequest(
            internalID,
            _msgSender(),
            _chainID,
            _revertableAddress,
            _chain2address,
            _amount,
            _token
        );
        emit ClientIdLog(internalID, _clientID);
    }

    /**
     * @dev Sends metaSynthesizeOffchain request
     * @dev Internal function used in metaSynthesizeOffchain
     */
    function sendMetaSynthesizeRequest(
        MetaRouteStructs.MetaSynthesizeTransaction
        memory _metaSynthesizeTransaction
    ) internal returns (bytes32 internalID) {
        balanceOf[_metaSynthesizeTransaction.rtoken] =
        balanceOf[_metaSynthesizeTransaction.rtoken] +
        _metaSynthesizeTransaction.amount;

        if (_metaSynthesizeTransaction.revertableAddress == address(0)) {
            _metaSynthesizeTransaction.revertableAddress = _metaSynthesizeTransaction.chain2address;
        }

        internalID = keccak256(abi.encodePacked(this, requestCount, block.chainid));
        bytes32 externalID = keccak256(
            abi.encodePacked(internalID, _metaSynthesizeTransaction.receiveSide, _metaSynthesizeTransaction.revertableAddress, _metaSynthesizeTransaction.chainID)
        );

        MetaRouteStructs.MetaMintTransaction
        memory _metaMintTransaction = MetaRouteStructs.MetaMintTransaction(
            _metaSynthesizeTransaction.stableBridgingFee,
            _metaSynthesizeTransaction.amount,
            externalID,
            _metaSynthesizeTransaction.rtoken,
            block.chainid,
            _metaSynthesizeTransaction.chain2address,
            _metaSynthesizeTransaction.swapTokens,
            _metaSynthesizeTransaction.secondDexRouter,
            _metaSynthesizeTransaction.secondSwapCalldata,
            _metaSynthesizeTransaction.finalReceiveSide,
            _metaSynthesizeTransaction.finalCalldata,
            _metaSynthesizeTransaction.finalOffset
        );

        {
            bytes memory out = abi.encodeWithSignature(
            "metaMintSyntheticToken((uint256,uint256,bytes32,address,uint256,address,address[],"
            "address,bytes,address,bytes,uint256))",
            _metaMintTransaction
            );

            requests[externalID] = TxState({
            recipient : _metaSynthesizeTransaction.syntCaller,
            chain2address : _metaSynthesizeTransaction.chain2address,
            rtoken : _metaSynthesizeTransaction.rtoken,
            amount : _metaSynthesizeTransaction.amount,
            state : RequestState.Sent
            });

            requestCount++;
            IBridge(bridge).transmitRequestV2(
                out,
                _metaSynthesizeTransaction.receiveSide,
                _metaSynthesizeTransaction.oppositeBridge,
                _metaSynthesizeTransaction.chainID
            );
        }

        emit SynthesizeRequest(
            internalID,
            _metaSynthesizeTransaction.syntCaller,
            _metaSynthesizeTransaction.chainID,
            _metaSynthesizeTransaction.revertableAddress,
            _metaSynthesizeTransaction.chain2address,
            _metaSynthesizeTransaction.amount,
            _metaSynthesizeTransaction.rtoken
        );
        emit ClientIdLog(internalID, _metaSynthesizeTransaction.clientID);
    }
}

File 2 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 3 of 14 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 4 of 14 : IBridge.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

interface IBridge {
  function transmitRequestV2(
    bytes memory _callData,
    address _receiveSide,
    address _oppositeBridge,
    uint256 _chainId
  ) external;
  
  function receiveRequestV2(
    bytes memory _callData,
    address _receiveSide
  ) external;
}

File 5 of 14 : TransferHelper.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.6.0;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeApprove: approve failed'
        );
    }

    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeTransfer: transfer failed'
        );
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::transferFrom: transferFrom failed'
        );
    }

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');
    }
}

File 6 of 14 : RelayRecipientUpgradeable.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

abstract contract RelayRecipientUpgradeable is OwnableUpgradeable {
    address private _trustedForwarder;

    function __RelayRecipient_init(address trustedForwarder)
        internal
        onlyInitializing
    {
        __Ownable_init();
        _trustedForwarder = trustedForwarder;
    }

    function isTrustedForwarder(address forwarder)
        public
        view
        virtual
        returns (bool)
    {
        return forwarder == _trustedForwarder;
    }

    function _msgSender()
        internal
        view
        virtual
        override
        returns (address sender)
    {
        if (isTrustedForwarder(msg.sender)) {
            // The assembly code is more direct than the Solidity version using `abi.decode`.
            assembly {
                sender := shr(96, calldataload(sub(calldatasize(), 20)))
            }
        } else {
            return super._msgSender();
        }
    }

    function _msgData()
        internal
        view
        virtual
        override
        returns (bytes calldata)
    {
        if (isTrustedForwarder(msg.sender)) {
            return msg.data[:msg.data.length - 20];
        } else {
            return super._msgData();
        }
    }
}

File 7 of 14 : IWrapper.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

interface IWrapper {
    function deposit() external payable;
    function withdraw(uint256 amount) external;
}

File 8 of 14 : IMetaRouter.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

import "../MetaRouteStructs.sol";

interface IMetaRouter {
    function metaRoute(
        MetaRouteStructs.MetaRouteTransaction calldata _metarouteTransaction
    ) external payable;

    function externalCall(
        address _token,
        uint256 _amount,
        address _receiveSide,
        bytes calldata _calldata,
        uint256 _offset
    ) external;

    function returnSwap(
        address _token,
        uint256 _amount,
        address _router,
        bytes calldata _swapCalldata,
        address _burnToken,
        address _synthesis,
        bytes calldata _burnCalldata
    ) external;

    function metaMintSwap(
        MetaRouteStructs.MetaMintTransaction calldata _metaMintTransaction
    ) 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 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _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);
    }
    uint256[49] private __gap;
}

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

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}

File 12 of 14 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 13 of 14 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (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 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 14 of 14 : MetaRouteStructs.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

library MetaRouteStructs {
    struct MetaBurnTransaction {
        uint256 stableBridgingFee;
        uint256 amount;
        address syntCaller;
        address finalReceiveSide;
        address sToken;
        bytes finalCallData;
        uint256 finalOffset;
        address chain2address;
        address receiveSide;
        address oppositeBridge;
        address revertableAddress;
        uint256 chainID;
        bytes32 clientID;
    }

    struct MetaMintTransaction {
        uint256 stableBridgingFee;
        uint256 amount;
        bytes32 externalID;
        address tokenReal;
        uint256 chainID;
        address to;
        address[] swapTokens;
        address secondDexRouter;
        bytes secondSwapCalldata;
        address finalReceiveSide;
        bytes finalCalldata;
        uint256 finalOffset;
    }

    struct MetaRouteTransaction {
        bytes firstSwapCalldata;
        bytes secondSwapCalldata;
        address[] approvedTokens;
        address firstDexRouter;
        address secondDexRouter;
        uint256 amount;
        bool nativeIn;
        address relayRecipient;
        bytes otherSideCalldata;
    }

    struct MetaSynthesizeTransaction {
        uint256 stableBridgingFee;
        uint256 amount;
        address rtoken;
        address chain2address;
        address receiveSide;
        address oppositeBridge;
        address syntCaller;
        uint256 chainID;
        address[] swapTokens;
        address secondDexRouter;
        bytes secondSwapCalldata;
        address finalReceiveSide;
        bytes finalCalldata;
        uint256 finalOffset;
        address revertableAddress;
        bytes32 clientID;
    }

    struct MetaRevertTransaction {
        uint256 stableBridgingFee;
        bytes32 internalID;
        address receiveSide;
        address managerChainBridge;
        address sourceChainBridge;
        uint256 managerChainId;
        uint256 sourceChainId;
        address router;
        bytes swapCalldata;
        address sourceChainSynthesis;
        address burnToken;
        bytes burnCalldata;
        bytes32 clientID;
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bridgingFee","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"BurnCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"clientId","type":"bytes32"}],"name":"ClientIdLog","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"MetaRevertRequest","type":"event"},{"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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"RevertBurnRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bridgingFee","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"RevertSynthesizeCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"metaRouter","type":"address"}],"name":"SetMetaRouter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"threshold","type":"uint256"}],"name":"SetTokenThreshold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"activate","type":"bool"}],"name":"SetWhitelistToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"uint256","name":"chainID","type":"uint256"},{"indexed":true,"internalType":"address","name":"revertableAddress","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"SynthesizeRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bridge","type":"address"},{"internalType":"address","name":"_trustedForwarder","type":"address"},{"internalType":"address","name":"_wrapper","type":"address"},{"internalType":"address","name":"_whitelistedToken","type":"address"},{"internalType":"contract IMetaRouter","name":"_metaRouter","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"stableBridgingFee","type":"uint256"},{"internalType":"bytes32","name":"internalID","type":"bytes32"},{"internalType":"address","name":"receiveSide","type":"address"},{"internalType":"address","name":"managerChainBridge","type":"address"},{"internalType":"address","name":"sourceChainBridge","type":"address"},{"internalType":"uint256","name":"managerChainId","type":"uint256"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"address","name":"router","type":"address"},{"internalType":"bytes","name":"swapCalldata","type":"bytes"},{"internalType":"address","name":"sourceChainSynthesis","type":"address"},{"internalType":"address","name":"burnToken","type":"address"},{"internalType":"bytes","name":"burnCalldata","type":"bytes"},{"internalType":"bytes32","name":"clientID","type":"bytes32"}],"internalType":"struct MetaRouteStructs.MetaRevertTransaction","name":"_metaRevertTransaction","type":"tuple"}],"name":"metaRevertRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"metaRouter","outputs":[{"internalType":"contract IMetaRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"stableBridgingFee","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"rtoken","type":"address"},{"internalType":"address","name":"chain2address","type":"address"},{"internalType":"address","name":"receiveSide","type":"address"},{"internalType":"address","name":"oppositeBridge","type":"address"},{"internalType":"address","name":"syntCaller","type":"address"},{"internalType":"uint256","name":"chainID","type":"uint256"},{"internalType":"address[]","name":"swapTokens","type":"address[]"},{"internalType":"address","name":"secondDexRouter","type":"address"},{"internalType":"bytes","name":"secondSwapCalldata","type":"bytes"},{"internalType":"address","name":"finalReceiveSide","type":"address"},{"internalType":"bytes","name":"finalCalldata","type":"bytes"},{"internalType":"uint256","name":"finalOffset","type":"uint256"},{"internalType":"address","name":"revertableAddress","type":"address"},{"internalType":"bytes32","name":"clientID","type":"bytes32"}],"internalType":"struct MetaRouteStructs.MetaSynthesizeTransaction","name":"_metaSynthesizeTransaction","type":"tuple"}],"name":"metaSynthesize","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stableBridgingFee","type":"uint256"},{"internalType":"bytes32","name":"_externalID","type":"bytes32"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_rToken","type":"address"},{"internalType":"address","name":"_finalReceiveSide","type":"address"},{"internalType":"bytes","name":"_finalCalldata","type":"bytes"},{"internalType":"uint256","name":"_finalOffset","type":"uint256"}],"name":"metaUnsynthesize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"requests","outputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"chain2address","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"rtoken","type":"address"},{"internalType":"enum Portal.RequestState","name":"state","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stableBridgingFee","type":"uint256"},{"internalType":"bytes32","name":"_internalID","type":"bytes32"},{"internalType":"address","name":"_receiveSide","type":"address"},{"internalType":"address","name":"_oppositeBridge","type":"address"},{"internalType":"uint256","name":"_chainId","type":"uint256"},{"internalType":"bytes32","name":"_clientID","type":"bytes32"}],"name":"revertBurnRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stableBridgingFee","type":"uint256"},{"internalType":"bytes32","name":"_externalID","type":"bytes32"}],"name":"revertSynthesize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMetaRouter","name":"_metaRouter","type":"address"}],"name":"setMetaRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"setTokenThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_activate","type":"bool"}],"name":"setWhitelistToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stableBridgingFee","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_chain2address","type":"address"},{"internalType":"address","name":"_receiveSide","type":"address"},{"internalType":"address","name":"_oppositeBridge","type":"address"},{"internalType":"address","name":"_revertableAddress","type":"address"},{"internalType":"uint256","name":"_chainID","type":"uint256"},{"internalType":"bytes32","name":"_clientID","type":"bytes32"}],"name":"synthesize","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stableBridgingFee","type":"uint256"},{"internalType":"address","name":"_chain2address","type":"address"},{"internalType":"address","name":"_receiveSide","type":"address"},{"internalType":"address","name":"_oppositeBridge","type":"address"},{"internalType":"address","name":"_revertableAddress","type":"address"},{"internalType":"uint256","name":"_chainID","type":"uint256"},{"internalType":"bytes32","name":"_clientID","type":"bytes32"}],"name":"synthesizeNative","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"stableBridgingFee","type":"uint256"},{"internalType":"bytes","name":"approvalData","type":"bytes"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"chain2address","type":"address"},{"internalType":"address","name":"receiveSide","type":"address"},{"internalType":"address","name":"oppositeBridge","type":"address"},{"internalType":"address","name":"revertableAddress","type":"address"},{"internalType":"uint256","name":"chainID","type":"uint256"},{"internalType":"bytes32","name":"clientID","type":"bytes32"}],"internalType":"struct Portal.SynthesizeWithPermitTransaction","name":"_syntWithPermitTx","type":"tuple"}],"name":"synthesizeWithPermit","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stableBridgingFee","type":"uint256"},{"internalType":"bytes32","name":"_externalID","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"unsynthesize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"unsynthesizeStates","outputs":[{"internalType":"enum Portal.UnsynthesizeState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"wrapper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061415b806100206000396000f3fe6080604052600436106101cd5760003560e01c80638456cb59116100f7578063ce654c1711610095578063f2fde38b11610064578063f2fde38b146105bc578063fab92894146105dc578063fb7c7c2a14610619578063fce633c21461063957600080fd5b8063ce654c171461053c578063dbec15bb1461055c578063e78cea921461057c578063eadd5c341461059c57600080fd5b80639d866985116100d15780639d86698514610470578063ac210cc7146104dc578063b1659a3c146104fc578063c42a28941461051c57600080fd5b80638456cb59146104095780638bb398021461041e5780638da5cb5b1461043e57600080fd5b8063572b6c051161016f57806370a082311161013e57806370a0823114610377578063715018a6146103a4578063753d7563146103b95780637c374f99146103e957600080fd5b8063572b6c05146102db5780635badbe4c1461031a5780635c975abb14610330578063687752781461034a57600080fd5b8063316784f5116101ab578063316784f51461023a5780633f4ba83a1461025a578063486ff0cd1461026f5780634afbb9f1146102bb57600080fd5b806308759e9b146101d25780631459457a146101f45780632816f4db14610214575b600080fd5b3480156101de57600080fd5b506101f26101ed366004613a2f565b610659565b005b34801561020057600080fd5b506101f261020f366004613448565b610908565b6102276102223660046138fb565b610a8b565b6040519081526020015b60405180910390f35b34801561024657600080fd5b506101f2610255366004613ad3565b610c38565b34801561026657600080fd5b506101f2610f38565b34801561027b57600080fd5b50604080518082018252600581527f322e302e31000000000000000000000000000000000000000000000000000000602082015290516102319190613cc8565b3480156102c757600080fd5b506101f26102d6366004613a8b565b611001565b3480156102e757600080fd5b5061030a6102f63660046133be565b6065546001600160a01b0391821691161490565b6040519015158152602001610231565b34801561032657600080fd5b5061022760685481565b34801561033c57600080fd5b5060695461030a9060ff1681565b34801561035657600080fd5b506102276103653660046133be565b606d6020526000908152604090205481565b34801561038357600080fd5b506102276103923660046133be565b606c6020526000908152604090205481565b3480156103b057600080fd5b506101f2611219565b3480156103c557600080fd5b5061030a6103d43660046133be565b606e6020526000908152604090205460ff1681565b3480156103f557600080fd5b506101f26104043660046134b9565b61129e565b34801561041557600080fd5b506101f261137b565b34801561042a57600080fd5b506101f26104393660046134f2565b61142a565b34801561044a57600080fd5b506033546001600160a01b03165b6040516001600160a01b039091168152602001610231565b34801561047c57600080fd5b506104cb61048b36600461353b565b606a6020526000908152604090208054600182015460028301546003909301546001600160a01b039283169391831692811690600160a01b900460ff1685565b604051610231959493929190613bfb565b3480156104e857600080fd5b50606654610458906001600160a01b031681565b34801561050857600080fd5b50610227610517366004613975565b6114f4565b34801561052857600080fd5b506101f2610537366004613a0d565b61163b565b34801561054857600080fd5b50610227610557366004613689565b6118bc565b34801561056857600080fd5b50606f54610458906001600160a01b031681565b34801561058857600080fd5b50606754610458906001600160a01b031681565b3480156105a857600080fd5b506101f26105b73660046133be565b611a08565b3480156105c857600080fd5b506101f26105d73660046133be565b611b5e565b3480156105e857600080fd5b5061060c6105f736600461353b565b606b6020526000908152604090205460ff1681565b6040516102319190613cb5565b34801561062557600080fd5b5061022761063436600461380c565b611c5f565b34801561064557600080fd5b506101f2610654366004613554565b611eab565b60695460ff16156106a05760405162461bcd60e51b815260206004820152600c60248201526b14de5b588e881c185d5cd95960a21b60448201526064015b60405180910390fd5b600085306106ac61252a565b6040805160208101949094526bffffffffffffffffffffffff19606093841b811691850191909152911b16605482015246606882015260880160408051601f198184030181529190528051602090910120905060016000828152606b602052604090205460ff16600281111561072457610724613f98565b141561077e5760405162461bcd60e51b8152602060048201526024808201527f53796d623a205265616c20746f6b656e7320616c7265616479207472616e7366604482015263195c995960e21b6064820152608401610697565b6000818152606b6020908152604091829020805460ff1916600217905581518083018352601b81527f7265766572744275726e2875696e743235362c62797465733332290000000000908201528151602481018a90526044808201859052835180830390910181526064909101835290810180516001600160e01b03167ff70519ae000000000000000000000000000000000000000000000000000000001790526067549151633675e4e160e11b815290916001600160a01b031690636cebc9c2906108549084908a908a908a90600401613c7f565b600060405180830381600087803b15801561086e57600080fd5b505af1158015610882573d6000803e3d6000fd5b505050505061088f61252a565b6001600160a01b0316867f40590cc12db0488520ce425059f83f8caed91bdf98de5ff829dc57c63843161b60405160405180910390a3817f5a297b2c9a9f94a0f4e5a796c74ad38e219d1185fccf5f79c18726a830c2b6f5876040516108f791815260200190565b60405180910390a250505050505050565b600054610100900460ff166109235760005460ff1615610927565b303b155b6109995760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610697565b600054610100900460ff161580156109d857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b6109e185612570565b606780546001600160a01b0380891673ffffffffffffffffffffffffffffffffffffffff199283161790925560668054878416908316179055606f80548584169216919091179055831615610a54576001600160a01b0383166000908152606e60205260409020805460ff191660011790555b8015610a8357600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b505050505050565b60695460009060ff1615610ad05760405162461bcd60e51b815260206004820152600c60248201526b14de5b588e881c185d5cd95960a21b6044820152606401610697565b6066546001600160a01b03166000908152606e602052604090205460ff16610b3a5760405162461bcd60e51b815260206004820152601860248201527f53796d623a20756e617574686f72697a656420746f6b656e00000000000000006044820152606401610697565b6066546001600160a01b03166000908152606d6020526040902054341015610ba45760405162461bcd60e51b815260206004820152601c60248201527f53796d623a20616d6f756e7420756e646572207468726573686f6c64000000006044820152606401610697565b606660009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610bf457600080fd5b505af1158015610c08573d6000803e3d6000fd5b5050606654610c2c93508b92506001600160a01b03169050348a8a8a8a8a8a612612565b98975050505050505050565b6067546001600160a01b03163314610c925760405162461bcd60e51b815260206004820152601e60248201527f53796d623a2063616c6c6572206973206e6f74207468652062726964676500006044820152606401610697565b60695460ff1615610cd45760405162461bcd60e51b815260206004820152600c60248201526b14de5b588e881c185d5cd95960a21b6044820152606401610697565b6000878152606b602052604081205460ff166002811115610cf757610cf7613f98565b14610d6a5760405162461bcd60e51b815260206004820152602660248201527f53796d623a2073796e74686574696320746f6b656e7320656d657267656e637960448201527f556e6275726e00000000000000000000000000000000000000000000000000006064820152608401610697565b6001600160a01b0384166000908152606c6020526040902054610d8e908690613f02565b6001600160a01b038581166000908152606c60209081526040808320949094558a8252606b905291909120805460ff19166001179055606754610dd4918691168a6129cb565b610dde8886613f02565b9450815160001415610e4657610df58487876129cb565b60408051868152602081018a90526001600160a01b038616818301529051309189917fd31ae0a5fc46ab05b27d837efddb13837db6eb85442f9b1d3f609bf1552f3f4f9181900360600190a3610f2e565b606f54610e5e9085906001600160a01b0316876129cb565b606f546040517fe1ee0f790000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063e1ee0f7990610eaf9087908990889088908890600401613c3b565b600060405180830381600087803b158015610ec957600080fd5b505af1158015610edd573d6000803e3d6000fd5b505060408051888152602081018c90526001600160a01b0388168183015290513093508a92507fd31ae0a5fc46ab05b27d837efddb13837db6eb85442f9b1d3f609bf1552f3f4f9181900360600190a35b5050505050505050565b610f4061252a565b6001600160a01b0316610f5b6033546001600160a01b031690565b6001600160a01b031614610fb15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610697565b6069805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fe461252a565b6040516001600160a01b03909116815260200160405180910390a1565b6067546001600160a01b0316331461105b5760405162461bcd60e51b815260206004820152601e60248201527f53796d623a2063616c6c6572206973206e6f74207468652062726964676500006044820152606401610697565b60695460ff161561109d5760405162461bcd60e51b815260206004820152600c60248201526b14de5b588e881c185d5cd95960a21b6044820152606401610697565b6000848152606b602052604081205460ff1660028111156110c0576110c0613f98565b146111335760405162461bcd60e51b815260206004820152602660248201527f53796d623a2073796e74686574696320746f6b656e7320656d657267656e637960448201527f556e6275726e00000000000000000000000000000000000000000000000000006064820152608401610697565b6001600160a01b0383166000908152606c6020526040902054611157908390613f02565b6001600160a01b0384166000908152606c6020908152604080832093909355868252606b905220805460ff1916600117905561119d83826111988886613f02565b6129cb565b6067546111b59084906001600160a01b0316876129cb565b6001600160a01b038116847fd31ae0a5fc46ab05b27d837efddb13837db6eb85442f9b1d3f609bf1552f3f4f6111eb8886613f02565b60408051918252602082018a90526001600160a01b0388169082015260600160405180910390a35050505050565b61122161252a565b6001600160a01b031661123c6033546001600160a01b031690565b6001600160a01b0316146112925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610697565b61129c6000612b25565b565b6112a661252a565b6001600160a01b03166112c16033546001600160a01b031690565b6001600160a01b0316146113175760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610697565b6001600160a01b0382166000818152606e6020908152604091829020805460ff19168515159081179091558251938452908301527f0a4552f1105808db6a44587c9ef0a7c4064bf620b9d843b514ad7365bd52239a91015b60405180910390a15050565b61138361252a565b6001600160a01b031661139e6033546001600160a01b031690565b6001600160a01b0316146113f45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610697565b6069805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fe461252a565b61143261252a565b6001600160a01b031661144d6033546001600160a01b031690565b6001600160a01b0316146114a35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610697565b6001600160a01b0382166000818152606d6020908152604091829020849055815192835282018390527fa6742efd4f410d6fd9688a6cf6a15b6d51121097a263056a3576baaacdc4a9ae910161136f565b60695460009060ff16156115395760405162461bcd60e51b815260206004820152600c60248201526b14de5b588e881c185d5cd95960a21b6044820152606401610697565b6001600160a01b0389166000908152606e602052604090205460ff166115a15760405162461bcd60e51b815260206004820152601860248201527f53796d623a20756e617574686f72697a656420746f6b656e00000000000000006044820152606401610697565b6001600160a01b0389166000908152606d60205260409020548810156116095760405162461bcd60e51b815260206004820152601c60248201527f53796d623a20616d6f756e7420756e646572207468726573686f6c64000000006044820152606401610697565b61161c8961161561252a565b308b612b84565b61162d8a8a8a8a8a8a8a8a8a612612565b9a9950505050505050505050565b6067546001600160a01b031633146116955760405162461bcd60e51b815260206004820152601e60248201527f53796d623a2063616c6c6572206973206e6f74207468652062726964676500006044820152606401610697565b60695460ff16156116d75760405162461bcd60e51b815260206004820152600c60248201526b14de5b588e881c185d5cd95960a21b6044820152606401610697565b6000818152606a6020526040902060016003820154600160a01b900460ff16600281111561170757611707613f98565b1461177a5760405162461bcd60e51b815260206004820152602960248201527f53796d623a207374617465206e6f74206f70656e206f7220747820646f65732060448201527f6e6f7420657869737400000000000000000000000000000000000000000000006064820152608401610697565b600381018054740200000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff82161790915560028201546001600160a01b039091166000908152606c60205260409020546117e69190613f02565b6003820180546001600160a01b039081166000908152606c6020526040902092909255548254600284015461182993928316929190911690611198908790613f02565b6003810154606754611848916001600160a01b039081169116856129cb565b805460028201546001600160a01b039091169083907fefcdf9ea4e65571d2ce9c030c46954e950662df8a7d8bd039fc4417e37b2f88c9061188a908790613f02565b600385015460408051928352602083018990526001600160a01b039091169082015260600160405180910390a3505050565b60695460009060ff16156119015760405162461bcd60e51b815260206004820152600c60248201526b14de5b588e881c185d5cd95960a21b6044820152606401610697565b6040808301516001600160a01b03166000908152606e602052205460ff1661196b5760405162461bcd60e51b815260206004820152601860248201527f53796d623a20756e617574686f72697a656420746f6b656e00000000000000006044820152606401610697565b6040808301516001600160a01b03166000908152606d6020908152919020549083015110156119dc5760405162461bcd60e51b815260206004820152601c60248201527f53796d623a20616d6f756e7420756e646572207468726573686f6c64000000006044820152606401610697565b6119f782604001516119ec61252a565b308560200151612b84565b611a0082612cdf565b90505b919050565b611a1061252a565b6001600160a01b0316611a2b6033546001600160a01b031690565b6001600160a01b031614611a815760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610697565b6001600160a01b038116611afd5760405162461bcd60e51b815260206004820152602760248201527f53796d623a206d657461526f757465722063616e6e6f74206265207a65726f2060448201527f61646472657373000000000000000000000000000000000000000000000000006064820152608401610697565b606f805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fd5c54ab1d37bfef4dd2253d9d73c292e46f5bd8a67ca5920aab4c2e1993178e79060200160405180910390a150565b611b6661252a565b6001600160a01b0316611b816033546001600160a01b031690565b6001600160a01b031614611bd75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610697565b6001600160a01b038116611c535760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610697565b611c5c81612b25565b50565b60695460009060ff1615611ca45760405162461bcd60e51b815260206004820152600c60248201526b14de5b588e881c185d5cd95960a21b6044820152606401610697565b6040808301516001600160a01b03166000908152606e602052205460ff16611d0e5760405162461bcd60e51b815260206004820152601860248201527f53796d623a20756e617574686f72697a656420746f6b656e00000000000000006044820152606401610697565b6040808301516001600160a01b03166000908152606d602052205460608301511015611d7c5760405162461bcd60e51b815260206004820152601c60248201527f53796d623a20616d6f756e7420756e646572207468726573686f6c64000000006044820152606401610697565b6000806000806000808760200151806020019051810190611d9d91906133e2565b6040808f015190517fd505accf0000000000000000000000000000000000000000000000000000000081526001600160a01b038089166004830152306024830152604482018890526064820187905260ff8616608483015260a4820185905260c48201849052979d50959b5093995091975095509350919091169063d505accf9060e401600060405180830381600087803b158015611e3b57600080fd5b505af1158015611e4f573d6000803e3d6000fd5b50505050505050505050611e748260400151611e6961252a565b308560600151612b84565b611a0082600001518360400151846060015185608001518660a001518760c001518860e001518961010001518a6101200151612612565b60695460ff1615611eed5760405162461bcd60e51b815260206004820152600c60248201526b14de5b588e881c185d5cd95960a21b6044820152606401610697565b6101008101515115612199576000816020015130611f0961252a565b6040805160208101949094526bffffffffffffffffffffffff19606093841b811691850191909152911b16605482015246606882015260880160408051601f198184030181529190528051602090910120905060016000828152606b602052604090205460ff166002811115611f8157611f81613f98565b1415611fdb5760405162461bcd60e51b8152602060048201526024808201527f53796d623a205265616c20746f6b656e7320616c7265616479207472616e7366604482015263195c995960e21b6064820152608401610697565b6000818152606b60209081526040808320805460ff19166002179055805160808101909152604380825290916140a090830139805190602001208360000151838560e0015186610100015187610120015188610140015189610160015160405160240161204e9796959493929190613de7565b60408051601f198184030181529181526020820180516001600160e01b03167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925260675485830151606087015160a08801519451633675e4e160e11b81529395506001600160a01b0390921693636cebc9c2936120db938793929091600401613c7f565b600060405180830381600087803b1580156120f557600080fd5b505af1158015612109573d6000803e3d6000fd5b5050505061211561252a565b6001600160a01b031683602001517f40590cc12db0488520ce425059f83f8caed91bdf98de5ff829dc57c63843161b60405160405180910390a38261018001517f5a297b2c9a9f94a0f4e5a796c74ad38e219d1185fccf5f79c18726a830c2b6f5846020015160405161218a91815260200190565b60405180910390a250506124e5565b610160810151511561239e5760008160200151306121b561252a565b6040805160208101949094526bffffffffffffffffffffffff19606093841b811691850191909152911b16605482015246606882015260880160408051601f198184030181529190528051602090910120905060016000828152606b602052604090205460ff16600281111561222d5761222d613f98565b14156122875760405162461bcd60e51b8152602060048201526024808201527f53796d623a205265616c20746f6b656e7320616c7265616479207472616e7366604482015263195c995960e21b6064820152608401610697565b6000818152606b60209081526040808320805460ff191660021790558051608081019091526042808252909161405e9083013980519060200120836000015183308660800151466122d661252a565b604051602481019690965260448601949094526001600160a01b039283166064860152908216608485015260a48401521660c482015260e40160408051601f198184030181529181526020820180516001600160e01b03167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252606754610120860151606087015160a08801519451633675e4e160e11b81529395506001600160a01b0390921693636cebc9c2936120db938793929091600401613c7f565b600060405180608001604052806058815260200161400660589139805190602001208260000151836020015184604001518560800151466123dd61252a565b610180890151604051602481019790975260448701959095526001600160a01b039384166064870152918316608486015260a48501521660c483015260e48201526101040160408051601f198184030181529181526020820180516001600160e01b03167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252606754610120850151606086015160a08701519451633675e4e160e11b81529395506001600160a01b0390921693636cebc9c2936124b1938793929091600401613c7f565b600060405180830381600087803b1580156124cb57600080fd5b505af11580156124df573d6000803e3d6000fd5b50505050505b6124ed61252a565b6001600160a01b031681602001517fbd03c66ec5bd3d01fbf22bc794f68ac88b693023b438724019205a4b42aefb2060405160405180910390a350565b6065546000906001600160a01b031633141561256b57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec36013560601c90565b503390565b600054610100900460ff166125db5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610697565b6125e3613153565b6065805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001600160a01b0388166000908152606c6020526040812054612636908990613eea565b6001600160a01b03808b166000908152606c6020526040902091909155841661265d578693505b6068546040516bffffffffffffffffffffffff193060601b166020820152603481019190915246605482015260740160408051601f1981840301815282825280516020918201209083018190526bffffffffffffffffffffffff1960608a811b8216938501939093529187901b909116605483015260688201859052915060009060880160405160208183030381529060405280519060200120905060006040518060800160405280604381526020016140e3604391398051602090910120604051602481018e9052604481018490526001600160a01b03808e16606483015246608483015260a482018d90528b1660c482015260e40160408051601f198184030181529181526020820180516001600160e01b03167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252815160a081019092529150806127b261252a565b6001600160a01b0390811682528b81166020830152604082018d90528d166060820152608001600190526000838152606a60209081526040918290208351815473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b039283161783559285015160018301805485169183169190911790559284015160028083019190915560608501516003830180549485169190951690811785556080860151929492937fffffffffffffffffffffff000000000000000000000000000000000000000000161790600160a01b90849081111561289657612896613f98565b02179055505060688054915060006128ad83613f49565b9091555050606754604051633675e4e160e11b81526001600160a01b0390911690636cebc9c2906128e89084908c908c908b90600401613c7f565b600060405180830381600087803b15801561290257600080fd5b505af1158015612916573d6000803e3d6000fd5b505050505050836001600160a01b03168361292f61252a565b604080518581526001600160a01b038c811660208301529181018d90528d821660608201529116907f31325fe0a1a2e6a5b1e41572156ba5b4e94f0fae7e7f63ec21e9b5ce1e4b3eab9060800160405180910390a4817f5a297b2c9a9f94a0f4e5a796c74ad38e219d1185fccf5f79c18726a830c2b6f5826040516129b691815260200190565b60405180910390a29998505050505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691612a409190613bdf565b6000604051808303816000865af19150503d8060008114612a7d576040519150601f19603f3d011682016040523d82523d6000602084013e612a82565b606091505b5091509150818015612aac575080511580612aac575080806020019051810190612aac919061351e565b612b1e5760405162461bcd60e51b815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c6564000000000000000000000000000000000000006064820152608401610697565b5050505050565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03167f23b872dd000000000000000000000000000000000000000000000000000000001790529151600092839290881691612c019190613bdf565b6000604051808303816000865af19150503d8060008114612c3e576040519150601f19603f3d011682016040523d82523d6000602084013e612c43565b606091505b5091509150818015612c6d575080511580612c6d575080806020019051810190612c6d919061351e565b610a835760405162461bcd60e51b815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260448201527f616e7366657246726f6d206661696c65640000000000000000000000000000006064820152608401610697565b6020808201516040808401516001600160a01b03166000908152606c909352822054612d0b9190613eea565b6040808401516001600160a01b039081166000908152606c60205291909120919091556101c083015116612d4e5760608201516001600160a01b03166101c08301525b6068546040516bffffffffffffffffffffffff193060601b166020820152603481019190915246605482015260740160408051601f19818403018152828252805160209182012060808601516101c087015160e08801519386018390526bffffffffffffffffffffffff19606092831b811695870195909552901b9092166054840152606883015291506000906088016040516020818303038152906040528051906020012090506000604051806101800160405280856000015181526020018560200151815260200183815260200185604001516001600160a01b0316815260200146815260200185606001516001600160a01b0316815260200185610100015181526020018561012001516001600160a01b0316815260200185610140015181526020018561016001516001600160a01b031681526020018561018001518152602001856101a001518152509050600081604051602401612eb19190613cdb565b60408051601f19818403018152918152602080830180516001600160e01b03167fd5f8fbcb00000000000000000000000000000000000000000000000000000000179052815160a08101835260c08901516001600160a01b0390811682526060808b0151821683850152928a015182850152928901519092169082015290915060808101600190526000848152606a60209081526040918290208351815473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b039283161783559285015160018301805485169183169190911790559284015160028083019190915560608501516003830180549485169190951690811785556080860151929492937fffffffffffffffffffffff000000000000000000000000000000000000000000161790600160a01b908490811115612ff357612ff3613f98565b021790555050606880549150600061300a83613f49565b9091555050606754608086015160a087015160e0880151604051633675e4e160e11b81526001600160a01b0390941693636cebc9c2936130539387939192909190600401613c7f565b600060405180830381600087803b15801561306d57600080fd5b505af1158015613081573d6000803e3d6000fd5b5050505050836101c001516001600160a01b03168460e001518560c001516001600160a01b03167f31325fe0a1a2e6a5b1e41572156ba5b4e94f0fae7e7f63ec21e9b5ce1e4b3eab86886060015189602001518a6040015160405161310b94939291909384526001600160a01b039283166020850152604084019190915216606082015260800190565b60405180910390a46101e08401516040518481527f5a297b2c9a9f94a0f4e5a796c74ad38e219d1185fccf5f79c18726a830c2b6f59060200160405180910390a25050919050565b600054610100900460ff166131be5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610697565b6131c66131ce565b61129c613239565b600054610100900460ff1661129c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610697565b600054610100900460ff166132a45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610697565b61129c6132af61252a565b612b25565b8035611a0381613fe2565b600082601f8301126132d057600080fd5b8135602067ffffffffffffffff8211156132ec576132ec613fae565b8160051b6132fb828201613eb9565b83815282810190868401838801850189101561331657600080fd5b600093505b8584101561334257803561332e81613fe2565b83526001939093019291840191840161331b565b50979650505050505050565b600082601f83011261335f57600080fd5b813567ffffffffffffffff81111561337957613379613fae565b61338c6020601f19601f84011601613eb9565b8181528460208386010111156133a157600080fd5b816020850160208301376000918101602001919091529392505050565b6000602082840312156133d057600080fd5b81356133db81613fe2565b9392505050565b60008060008060008060c087890312156133fb57600080fd5b865161340681613fe2565b809650506020870151945060408701519350606087015160ff8116811461342c57600080fd5b809350506080870151915060a087015190509295509295509295565b600080600080600060a0868803121561346057600080fd5b853561346b81613fe2565b9450602086013561347b81613fe2565b9350604086013561348b81613fe2565b9250606086013561349b81613fe2565b915060808601356134ab81613fe2565b809150509295509295909350565b600080604083850312156134cc57600080fd5b82356134d781613fe2565b915060208301356134e781613ff7565b809150509250929050565b6000806040838503121561350557600080fd5b823561351081613fe2565b946020939093013593505050565b60006020828403121561353057600080fd5b81516133db81613ff7565b60006020828403121561354d57600080fd5b5035919050565b60006020828403121561356657600080fd5b813567ffffffffffffffff8082111561357e57600080fd5b908301906101a0828603121561359357600080fd5b61359b613e47565b82358152602083013560208201526135b5604084016132b4565b60408201526135c6606084016132b4565b60608201526135d7608084016132b4565b608082015260a083013560a082015260c083013560c08201526135fc60e084016132b4565b60e0820152610100808401358381111561361557600080fd5b6136218882870161334e565b8284015250506101206136358185016132b4565b908201526101406136478482016132b4565b90820152610160838101358381111561365f57600080fd5b61366b8882870161334e565b91830191909152506101809283013592810192909252509392505050565b60006020828403121561369b57600080fd5b813567ffffffffffffffff808211156136b357600080fd5b9083019061020082860312156136c857600080fd5b6136d0613e71565b82358152602083013560208201526136ea604084016132b4565b60408201526136fb606084016132b4565b606082015261370c608084016132b4565b608082015261371d60a084016132b4565b60a082015261372e60c084016132b4565b60c082015260e083013560e0820152610100808401358381111561375157600080fd5b61375d888287016132bf565b8284015250506101206137718185016132b4565b90820152610140838101358381111561378957600080fd5b6137958882870161334e565b8284015250506101606137a98185016132b4565b9082015261018083810135838111156137c157600080fd5b6137cd8882870161334e565b8284015250506101a0915081830135828201526101c091506137f08284016132b4565b918101919091526101e091820135918101919091529392505050565b60006020828403121561381e57600080fd5b813567ffffffffffffffff8082111561383657600080fd5b90830190610140828603121561384b57600080fd5b613853613e95565b8235815260208301358281111561386957600080fd5b6138758782860161334e565b602083015250613887604084016132b4565b6040820152606083013560608201526138a2608084016132b4565b60808201526138b360a084016132b4565b60a08201526138c460c084016132b4565b60c08201526138d560e084016132b4565b60e082015261010083810135908201526101209283013592810192909252509392505050565b600080600080600080600060e0888a03121561391657600080fd5b87359650602088013561392881613fe2565b9550604088013561393881613fe2565b9450606088013561394881613fe2565b9350608088013561395881613fe2565b9699959850939692959460a0840135945060c09093013592915050565b60008060008060008060008060006101208a8c03121561399457600080fd5b8935985060208a01356139a681613fe2565b975060408a0135965060608a01356139bd81613fe2565b955060808a01356139cd81613fe2565b945060a08a01356139dd81613fe2565b935060c08a01356139ed81613fe2565b8093505060e08a013591506101008a013590509295985092959850929598565b60008060408385031215613a2057600080fd5b50508035926020909101359150565b60008060008060008060c08789031215613a4857600080fd5b86359550602087013594506040870135613a6181613fe2565b93506060870135613a7181613fe2565b9598949750929560808101359460a0909101359350915050565b600080600080600060a08688031215613aa357600080fd5b85359450602086013593506040860135613abc81613fe2565b92506060860135915060808601356134ab81613fe2565b600080600080600080600080610100898b031215613af057600080fd5b88359750602089013596506040890135613b0981613fe2565b9550606089013594506080890135613b2081613fe2565b935060a0890135613b3081613fe2565b925060c089013567ffffffffffffffff811115613b4c57600080fd5b613b588b828c0161334e565b92505060e089013590509295985092959890939650565b600081518084526020808501945080840160005b83811015613ba85781516001600160a01b031687529582019590820190600101613b83565b509495945050505050565b60008151808452613bcb816020860160208601613f19565b601f01601f19169290920160200192915050565b60008251613bf1818460208701613f19565b9190910192915050565b6001600160a01b0386811682528581166020830152604082018590528316606082015260a08101613c2b83613fc4565b8260808301529695505050505050565b60006001600160a01b03808816835286602084015280861660408401525060a06060830152613c6d60a0830185613bb3565b90508260808301529695505050505050565b608081526000613c926080830187613bb3565b6001600160a01b0395861660208401529390941660408201526060015292915050565b60208101613cc283613fc4565b91905290565b6020815260006133db6020830184613bb3565b6020815281516020820152602082015160408201526040820151606082015260006060830151613d1660808401826001600160a01b03169052565b50608083015160a083015260a0830151613d3b60c08401826001600160a01b03169052565b5060c08301516101808060e0850152613d586101a0850183613b6f565b915060e0850151610100613d76818701836001600160a01b03169052565b80870151915050601f19610120818786030181880152613d968584613bb3565b945080880151925050610140613db6818801846001600160a01b03169052565b80880151925050610160818786030181880152613dd38584613bb3565b970151959092019490945250929392505050565b87815286602082015260006001600160a01b03808816604084015260e06060840152613e1660e0840188613bb3565b818716608085015281861660a085015283810360c0850152613e388186613bb3565b9b9a5050505050505050505050565b6040516101a0810167ffffffffffffffff81118282101715613e6b57613e6b613fae565b60405290565b604051610200810167ffffffffffffffff81118282101715613e6b57613e6b613fae565b604051610140810167ffffffffffffffff81118282101715613e6b57613e6b613fae565b604051601f8201601f1916810167ffffffffffffffff81118282101715613ee257613ee2613fae565b604052919050565b60008219821115613efd57613efd613f82565b500190565b600082821015613f1457613f14613f82565b500390565b60005b83811015613f34578181015183820152602001613f1c565b83811115613f43576000848401525b50505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613f7b57613f7b613f82565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60038110611c5c57634e487b7160e01b600052602160045260246000fd5b6001600160a01b0381168114611c5c57600080fd5b8015158114611c5c57600080fdfe72657665727453796e74686573697a655265717565737442794272696467652875696e743235362c627974657333322c616464726573732c616464726573732c75696e743235362c616464726573732c62797465733332297265766572744275726e416e644275726e2875696e743235362c627974657333322c616464726573732c616464726573732c75696e743235362c61646472657373297265766572744d6574614275726e2875696e743235362c627974657333322c616464726573732c62797465732c616464726573732c616464726573732c6279746573296d696e7453796e746865746963546f6b656e2875696e743235362c627974657333322c616464726573732c75696e743235362c75696e743235362c6164647265737329a2646970667358221220bc83d6801b719ed6f741e2c8c8e3b8f62f2975f9ad10cde239b61ca06db2a62364736f6c63430008070033

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