Contract 0x376d567c5794cfc64c74852a9db2105e0b5b482c

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xe843912323ae62f6ef971cb5e1551780ed6d3c7525d2b33161cf9c8ccd04393dCross Swap336862082022-09-28 21:04:044 days 23 hrs ago0x85de13410daaa4a34624bb98f3b4d09b6d0346c8 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c1.919766646618586 MATIC0.069984168009 111.000000015
0x414a4b26bba1f6e60889cd725166053bed295e7bb247ffca44a001905bedcc38Cross Swap336357932022-09-27 15:55:586 days 4 hrs ago0xffbc6441ea7cd86f7c552f9bb825106b419c4041 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c0.441956306317837 MATIC0.015648501349 39.788000798
0x202a3490c26829771dd15886ff376dca6a7418fd09e24dd49cf90cdd1b2f06b7Cross Swap335908412022-09-26 13:05:097 days 7 hrs ago0x60a1543654422adb451b61610762179557f50ce4 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c1.400756947189123 MATIC0.019875554854 32.495989991
0x979e5685772960b4ce3999d075ca7d553606f422c93ebba439fda2477a2b9c1aCross Swap335548852022-09-25 16:06:358 days 4 hrs ago0x2b7bf0f30867991ae05c39f1fb9ec1e1e7fbc218 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c5.919766646618586 MATIC0.001889290016 2.500000022
0xebcb9dcdfc5ac699e4eb15be492f719674bbe7f52a9518add376777679a176a3Cross Swap333895052022-09-21 16:11:0412 days 4 hrs ago0x8be0e110f2c630e715e4f341cfe3a0521ef6f746 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c6.919766646618586 MATIC0.001544145011 2.500000019
0x1f8eca0bd67f053fe96f6cb3a9bde7018b82798ec698ba962892db8b88388769Cross Swap333736902022-09-21 6:39:1812 days 13 hrs ago0xe5729387f45ad13ac4557fbdf678ed9173e0e58d IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c80.673733339321017 MATIC0.023484803446 30.380000189
0xfdec3775795142701bb1055561e7c69d7801a0fc3a74b5b214cd73e9e522aaa6Cross Swap332252312022-09-17 16:07:4816 days 4 hrs ago0x13fda985eb532460b1ab5b18b53e8171f2c76f53 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c1.919766646618586 MATIC0.031506150
0xb2de60df105e8189f22851cc8d2ebd06b9c72489a394f68c224601bfe1a0560cCross Swap332039172022-09-17 3:46:1416 days 16 hrs ago0xa275969434b1fd56e0a082a2207bb0e98e2767d1 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c1.919766646618586 MATIC0.020378695268 32.340000013
0x2a8537e162296800af4e9613eb94768e6adcd7fcc3dd276b816044c9f57f7747Cross Swap332006932022-09-17 1:53:1416 days 18 hrs ago0x83af720d6376b8b3e5b95a56ce4df31a8088b469 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c15.681950882763957 MATIC0.020795742204 33.957000011
0xa4b4fd5f9c04306a127b97ac99f1bcd5359b07e8f86ca54555e671a403b4b4d0Cross Swap331884032022-09-16 18:32:5517 days 1 hr ago0x1f44bcd464fa5bffa4b759e605efa18bb313bf35 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c1.20369536508257 MATIC0.027703137038 49.619365909
0x7c1795c22e278145e4ae97f5f559dada4294dd8ce977e14eaeb2ce900cf50fe2Cross Swap331857122022-09-16 16:56:0917 days 3 hrs ago0xee239f61d5b03ec7eca99c8ed5e1c8bdc77effc8 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c0.681950882763957 MATIC0.031291422266 39.564522095
0xfab100015ea5ca87ac98745911e52e980bf191cf13d9b7a50bb12a3e2b734f26Cross Swap330656202022-09-13 19:48:1520 days 38 mins ago0x93e5de52d6bc3b3f85f4df5e03ca6060ae8d045e IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c1.919766646618586 MATIC0.013624218671 32.503390499
0xab1932c2e84705f5f774432625c07c62e6359e807f1f89773c9be45d4cf5a87fCross Swap329848122022-09-11 21:01:5521 days 23 hrs ago0x2a7fbc703fc79e98113f3799192d98cb75ce35b4 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c5.663486618738956 MATIC0.023160836664 38.024
0x24d0948174d32e55dfee4c7d50588daa12b3267009ddecb6d50c030a18840c55Cross Swap329340592022-09-10 15:37:2723 days 4 hrs ago0xad000b7d6344458e3c821a029bf6cb997835fa13 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c1.919766646618586 MATIC0.01325923232
0x1f2c5fc17aecaf339b53c909d0158abfcf2decdd2864b122dc525e5c1feee6c3Cross Swap329330412022-09-10 15:02:2723 days 5 hrs ago0xad000b7d6344458e3c821a029bf6cb997835fa13 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c1.919766646618586 MATIC0.03356534781
0x9d87e5a9834f1bb22f321b2b2273e60bcc9f62ec335b240d934682e9950e1320Cross Swap328738592022-09-09 4:42:4624 days 15 hrs ago0xfebc38464fa6c7a6a1f83d43a62301261d70fdf9 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c0.001014534070129 MATIC0.032008879238 50.870000014
0xdfd115bcf6810fe30c8b0c3e2edd343da2d52777bef6a73af9980d0aba2a988dCross Swap328498172022-09-08 14:46:0425 days 5 hrs ago0xea02dcc6fe3ec1f2a433ff8718677556a3bb3618 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c0.016141410801057 MATIC0.013538966439 34.005285638
0x3a19ac7638e8f00ae79c862853893c93e129f2466d3cc0e22904ffa6067bbb65Cross Swap328497912022-09-08 14:45:0825 days 5 hrs ago0xea02dcc6fe3ec1f2a433ff8718677556a3bb3618 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c1.154866784177837 MATIC0.014021139067 33.450166563
0x3a85e4dd5bd28c3c780c8379acbe0c532d40228d7fc45729de43d1e59386cad5Cross Swap328497822022-09-08 14:44:5025 days 5 hrs ago0xea02dcc6fe3ec1f2a433ff8718677556a3bb3618 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c1.663486618738956 MATIC0.025270462311 41.710000003
0xebccd283489f43f0617165a45d0f8d2ef076b74ac8952d46bd8f34ef5f687ca7Cross Swap328423752022-09-08 10:28:0825 days 9 hrs ago0xea02dcc6fe3ec1f2a433ff8718677556a3bb3618 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c0.663486618738956 MATIC0.015447948401 38.800000003
0xad91e3354c298eaa5480d1e4ecd8d36f729f2c569bce043d14a8543e4653e4e3Set Woo Cross Ch...328421832022-09-08 10:21:3225 days 10 hrs ago0x7c8a5d20b22ce9b369c043a3e0091b5575b732d9 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c0 MATIC0.001732553472 37.24800002
0x76cbed009d462798246f43b7d88ada996db924f7c5895f6954e94b07128b7a60Set Woo Cross Ch...328421812022-09-08 10:21:2825 days 10 hrs ago0x7c8a5d20b22ce9b369c043a3e0091b5575b732d9 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c0 MATIC0.00139542 30.000000017
0x2a3461d6800930ead3adc8968ea66228b4ac3545e54d946049f8e431bf4f8fa1Set Woo Cross Ch...328421712022-09-08 10:21:0425 days 10 hrs ago0x7c8a5d20b22ce9b369c043a3e0091b5575b732d9 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c0 MATIC0.00139542 30.000000014
0x20b843af9e1d147d749d524123c7c6709433a0f6645a2ed9800b15e42e3ab889Set Woo Cross Ch...328421612022-09-08 10:20:4425 days 10 hrs ago0x7c8a5d20b22ce9b369c043a3e0091b5575b732d9 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c0 MATIC0.001398675979 30.069999998
0x97ef6e3b78a60a6110ceb78a33876cc5a10d7ed8005a771a670366c27e149295Set Woopp Quote ...328420752022-09-08 10:17:4825 days 10 hrs ago0x7c8a5d20b22ce9b369c043a3e0091b5575b732d9 IN  0x376d567c5794cfc64c74852a9db2105e0b5b482c0 MATIC0.001707120537 36.728856855
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x2a9d391a2287248740df66286ef56875c872ff09408b7ccc6604ce6e055826b5337729922022-09-30 23:34:422 days 20 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c0x0b8eb3401967f9876250ce82ba055d469176724612.060756837110803297 MATIC
0x2a9d391a2287248740df66286ef56875c872ff09408b7ccc6604ce6e055826b5337729922022-09-30 23:34:422 days 20 hrs ago Polygon: WMATIC Token 0x376d567c5794cfc64c74852a9db2105e0b5b482c12.060756837110803297 MATIC
0xe843912323ae62f6ef971cb5e1551780ed6d3c7525d2b33161cf9c8ccd04393d336862082022-09-28 21:04:044 days 23 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Stargate Finance: Router1.919766646618586438 MATIC
0x7ae5aa9b35c732a085286a1b680cde9906f73be92308df34f16051845ea1f8b6336854832022-09-28 20:39:054 days 23 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c0x85de13410daaa4a34624bb98f3b4d09b6d0346c89.899345145085410364 MATIC
0x7ae5aa9b35c732a085286a1b680cde9906f73be92308df34f16051845ea1f8b6336854832022-09-28 20:39:054 days 23 hrs ago Polygon: WMATIC Token 0x376d567c5794cfc64c74852a9db2105e0b5b482c9.899345145085410364 MATIC
0x414a4b26bba1f6e60889cd725166053bed295e7bb247ffca44a001905bedcc38336357932022-09-27 15:55:586 days 4 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Stargate Finance: Router0.441956306317837248 MATIC
0x202a3490c26829771dd15886ff376dca6a7418fd09e24dd49cf90cdd1b2f06b7335908412022-09-26 13:05:097 days 7 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Stargate Finance: Router0.000756947189123824 MATIC
0x202a3490c26829771dd15886ff376dca6a7418fd09e24dd49cf90cdd1b2f06b7335908412022-09-26 13:05:097 days 7 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Polygon: WMATIC Token1.399999999999999911 MATIC
0x979e5685772960b4ce3999d075ca7d553606f422c93ebba439fda2477a2b9c1a335548852022-09-25 16:06:358 days 4 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Stargate Finance: Router1.919766646618586438 MATIC
0x979e5685772960b4ce3999d075ca7d553606f422c93ebba439fda2477a2b9c1a335548852022-09-25 16:06:358 days 4 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Polygon: WMATIC Token4 MATIC
0xebcb9dcdfc5ac699e4eb15be492f719674bbe7f52a9518add376777679a176a3333895052022-09-21 16:11:0412 days 4 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Stargate Finance: Router1.919766646618586438 MATIC
0xebcb9dcdfc5ac699e4eb15be492f719674bbe7f52a9518add376777679a176a3333895052022-09-21 16:11:0412 days 4 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Polygon: WMATIC Token5 MATIC
0x1f8eca0bd67f053fe96f6cb3a9bde7018b82798ec698ba962892db8b88388769333736902022-09-21 6:39:1812 days 13 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Stargate Finance: Router0.673733339321017536 MATIC
0x1f8eca0bd67f053fe96f6cb3a9bde7018b82798ec698ba962892db8b88388769333736902022-09-21 6:39:1812 days 13 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Polygon: WMATIC Token80 MATIC
0x5661892b86e3d3bccb2359600774bcda47ea7b7b413357a9824918a655b1ce87333075332022-09-19 15:40:0914 days 4 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c0x54ed42515b6b92ff3719ece7fac84dea6227228a4.877342198478275771 MATIC
0x5661892b86e3d3bccb2359600774bcda47ea7b7b413357a9824918a655b1ce87333075332022-09-19 15:40:0914 days 4 hrs ago Polygon: WMATIC Token 0x376d567c5794cfc64c74852a9db2105e0b5b482c4.877342198478275771 MATIC
0xdb2c594edaeb7eaefbae2bef79268e41fca128244e5524fca42c60c05692d254332843722022-09-19 2:20:5814 days 18 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c0x316f591a85d69b57b4beff8c4ba1b088832688a86.71531616512362038 MATIC
0xdb2c594edaeb7eaefbae2bef79268e41fca128244e5524fca42c60c05692d254332843722022-09-19 2:20:5814 days 18 hrs ago Polygon: WMATIC Token 0x376d567c5794cfc64c74852a9db2105e0b5b482c6.71531616512362038 MATIC
0xfdec3775795142701bb1055561e7c69d7801a0fc3a74b5b214cd73e9e522aaa6332252312022-09-17 16:07:4816 days 4 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Stargate Finance: Router1.9197666466185865 MATIC
0xb2de60df105e8189f22851cc8d2ebd06b9c72489a394f68c224601bfe1a0560c332039172022-09-17 3:46:1416 days 16 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Stargate Finance: Router1.919766646618586438 MATIC
0x2ad23768e8c0d9b1251c1a3a6a377eadb2d7ef2115c5e9cd255c43505670c1a0332037592022-09-17 3:40:4616 days 16 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c0x5a1b1a1d46bf8de9a3c19dce7c298de3c10a59d32.241121059758473787 MATIC
0x2ad23768e8c0d9b1251c1a3a6a377eadb2d7ef2115c5e9cd255c43505670c1a0332037592022-09-17 3:40:4616 days 16 hrs ago Polygon: WMATIC Token 0x376d567c5794cfc64c74852a9db2105e0b5b482c2.241121059758473787 MATIC
0x2a8537e162296800af4e9613eb94768e6adcd7fcc3dd276b816044c9f57f7747332006932022-09-17 1:53:1416 days 18 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Stargate Finance: Router0.681950882763957964 MATIC
0x2a8537e162296800af4e9613eb94768e6adcd7fcc3dd276b816044c9f57f7747332006932022-09-17 1:53:1416 days 18 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c Polygon: WMATIC Token15 MATIC
0x983d6156b493072fdafd032fd604d59a02e702c402e48d885f0d8630de43cf5e331994622022-09-17 1:10:5616 days 19 hrs ago 0x376d567c5794cfc64c74852a9db2105e0b5b482c0x618715e04a5f3ce5dcfbcbcad78b0973521d5f1f16.965104529718223327 MATIC
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xA325dDf2BB2D2c8e199e4Bbbe5963048e5477BF1

Contract Name:
WooCrossChainRouter

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 14 : WooCrossChainRouter.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;

import './interfaces/IWooPP.sol';
import './interfaces/IWETH.sol';
import './interfaces/IWooRouter.sol';

import './interfaces/Stargate/IStargateRouter.sol';
import './interfaces/Stargate/IStargateReceiver.sol';

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/math/SafeMath.sol';
import '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';
import '@openzeppelin/contracts/utils/ReentrancyGuard.sol';
import '@uniswap/lib/contracts/libraries/TransferHelper.sol';

/// @title Woo Router implementation.
/// @notice Router for stateless execution of swaps against Woo private pool.
/// Ref links:
/// chain id: https://stargateprotocol.gitbook.io/stargate/developers/contract-addresses/mainnet
/// poold id: https://stargateprotocol.gitbook.io/stargate/developers/pool-ids
contract WooCrossChainRouter is IStargateReceiver, Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    event WooCrossSwapOnSrcChain(
        uint256 indexed refId,
        address indexed sender,
        address indexed to,
        address fromToken,
        uint256 fromAmount,
        uint256 minQuoteAmount,
        uint256 realQuoteAmount
    );

    event WooCrossSwapOnDstChain(
        uint256 indexed refId,
        address indexed sender,
        address indexed to,
        address bridgedToken,
        uint256 bridgedAmount,
        address toToken,
        address realToToken,
        uint256 minToAmount,
        uint256 realToAmount
    );

    address constant ETH_PLACEHOLDER_ADDR = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    IStargateRouter public stargateRouter;
    IWooPP public wooPool;
    address public quoteToken;
    address public WETH;
    uint256 public bridgeSlippage; // 1 in 10000th: default 1%
    uint256 public dstGasForSwapCall;
    uint256 public dstGasForNoSwapCall;

    mapping(uint16 => address) public wooCrossRouters; // dstChainId => woo router
    mapping(uint16 => uint256) public quotePoolIds; // chainId => woofi_quote_token_pool_id
    mapping(uint16 => address) public wooppQuoteTokens; // dstChainId => wooPP quote token

    receive() external payable {}

    constructor(
        address _weth,
        address _wooPool,
        address _stargateRouter
    ) public {
        WETH = _weth;
        wooPool = IWooPP(_wooPool);
        quoteToken = wooPool.quoteToken();
        stargateRouter = IStargateRouter(_stargateRouter);

        bridgeSlippage = 100;

        // from test result: https://docs.google.com/spreadsheets/d/1TdGKNQ68HAic2jgMs40pKp7kM6AfKGHjIKkyVGwolIU
        dstGasForSwapCall = 360000;
        dstGasForNoSwapCall = 80000;

        // usdc: 1, usdt: 2, busd: 5
        quotePoolIds[1] = 1; // ethereum: usdc
        quotePoolIds[2] = 2; // BSC: usdt
        quotePoolIds[6] = 1; // Avalanche: usdc
        quotePoolIds[9] = 1; // Polygon: usdc
        quotePoolIds[10] = 1; // Arbitrum: usdc
        quotePoolIds[11] = 1; // Optimism: usdc
        quotePoolIds[12] = 1; // Fantom: usdc

        wooppQuoteTokens[2] = address(0x55d398326f99059fF775485246999027B3197955); // bsc_wooPP: usdt
        wooppQuoteTokens[6] = address(0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E); // avax_wooPP: usdc
        wooppQuoteTokens[12] = address(0x04068DA6C83AFCFA0e13ba15A6696662335D5B75); // ftm_wooPP: usdc
    }

    function setWooppQuoteTokens(uint16 _chainId, address _token) public onlyOwner {
        wooppQuoteTokens[_chainId] = _token;
    }

    /*
    https://stargateprotocol.gitbook.io/stargate/developers/contract-addresses/mainnet
        - Chain ID : Chain -
        1: Ether
        2: BSC (BNB Chain)
        6: Avalanche
        9: Polygon
        10: Arbitrum
        11: Optimism
        12: Fantom
    */
    function setWooCrossChainRouter(uint16 _chainId, address _wooCrossRouter) external onlyOwner {
        require(_wooCrossRouter != address(0), 'WooCrossChainRouter: !wooCrossRouter');
        wooCrossRouters[_chainId] = _wooCrossRouter;
    }

    function setStargateRouter(address _stargateRouter) external onlyOwner {
        require(_stargateRouter != address(0), 'WooCrossChainRouter: !stargateRouter');
        stargateRouter = IStargateRouter(_stargateRouter);
    }

    function setWooPool(address _wooPool) external onlyOwner {
        wooPool = IWooPP(_wooPool);
    }

    function setBridgeSlippage(uint256 _bridgeSlippage) external onlyOwner {
        require(_bridgeSlippage <= 10000, 'WooCrossChainRouter: !_bridgeSlippage');
        bridgeSlippage = _bridgeSlippage;
    }

    function setDstGasForSwapCall(uint256 _dstGasForSwapCall) external onlyOwner {
        dstGasForSwapCall = _dstGasForSwapCall;
    }

    function setDstGasForNoSwapCall(uint256 _dstGasForNoSwapCall) external onlyOwner {
        dstGasForNoSwapCall = _dstGasForNoSwapCall;
    }

    function setQuotePoolId(uint16 _chainId, uint256 _quotePoolId) external onlyOwner {
        quotePoolIds[_chainId] = _quotePoolId;
    }

    function crossSwap(
        uint256 refId_,
        address fromToken,
        address toToken,
        uint256 fromAmount,
        uint256 srcMinQuoteAmount,
        uint256 dstMinToAmount,
        uint16 srcChainId,
        uint16 dstChainId,
        address payable to
    ) external payable {
        require(fromToken != address(0), 'WooCrossChainRouter: !fromToken');
        require(toToken != address(0), 'WooCrossChainRouter: !toToken');
        require(to != address(0), 'WooCrossChainRouter: !to');

        uint256 gasValue = msg.value;
        uint256 refId = refId_; // NOTE: to avoid stack too deep issue

        // Step 1: transfer
        {
            bool isFromETH = fromToken == ETH_PLACEHOLDER_ADDR;
            fromToken = isFromETH ? WETH : fromToken;
            if (isFromETH) {
                require(fromAmount <= msg.value, 'WooCrossChainRouter: !fromAmount');
                IWETH(WETH).deposit{value: fromAmount}();
                gasValue -= fromAmount;
            } else {
                TransferHelper.safeTransferFrom(fromToken, msg.sender, address(this), fromAmount);
            }
        }

        // Step 2: local transfer
        uint256 bridgeAmount;
        if (fromToken != quoteToken) {
            TransferHelper.safeApprove(fromToken, address(wooPool), fromAmount);
            bridgeAmount = wooPool.sellBase(fromToken, fromAmount, srcMinQuoteAmount, address(this), to);
        } else {
            bridgeAmount = fromAmount;
        }

        // Step 3: send to stargate
        require(bridgeAmount <= IERC20(quoteToken).balanceOf(address(this)), '!bridgeAmount');
        TransferHelper.safeApprove(quoteToken, address(stargateRouter), bridgeAmount);

        require(to != address(0), 'WooCrossChainRouter: to_ZERO_ADDR'); // NOTE: double check it
        {
            bytes memory payloadData;
            payloadData = abi.encode(
                toToken, // to token
                refId, // reference id
                dstMinToAmount, // minToAmount on destination chain
                to // to address
            );

            bytes memory dstWooCrossRouter = abi.encodePacked(wooCrossRouters[dstChainId]);
            uint256 minBridgeAmount = bridgeAmount.mul(uint256(10000).sub(bridgeSlippage)).div(10000);
            uint256 dstGas = (toToken == wooppQuoteTokens[dstChainId]) ? dstGasForNoSwapCall : dstGasForSwapCall;

            stargateRouter.swap{value: gasValue}(
                dstChainId, // dst chain id
                quotePoolIds[srcChainId], // quote token's pool id on dst chain
                quotePoolIds[dstChainId], // quote token's pool id on src chain
                payable(msg.sender), // rebate address
                bridgeAmount, // swap amount on src chain
                minBridgeAmount, // min received amount on dst chain
                IStargateRouter.lzTxObj(dstGas, 0, '0x'), // config: dstGas, dstNativeToken, dstNativeTokenToAddress
                dstWooCrossRouter, // smart contract to call on dst chain
                payloadData // payload to piggyback
            );
        }

        emit WooCrossSwapOnSrcChain(refId, msg.sender, to, fromToken, fromAmount, srcMinQuoteAmount, bridgeAmount);
    }

    function quoteLayerZeroFee(
        uint16 dstChainId,
        address toToken,
        uint256 refId,
        uint256 dstMinToAmount,
        address to
    ) external view returns (uint256, uint256) {
        bytes memory toAddress = abi.encodePacked(to);
        bytes memory payloadData = abi.encode(
            toToken, // to token
            refId, // reference id
            dstMinToAmount, // minToAmount on destination chain
            to // to address
        );
        uint256 dstGas = (toToken == wooppQuoteTokens[dstChainId]) ? dstGasForNoSwapCall : dstGasForSwapCall;
        return
            stargateRouter.quoteLayerZeroFee(
                dstChainId,
                1, // https://stargateprotocol.gitbook.io/stargate/developers/function-types
                toAddress,
                payloadData,
                IStargateRouter.lzTxObj(dstGas, 0, '0x')
            );
    }

    function sgReceive(
        uint16 _chainId,
        bytes memory _srcAddress,
        uint256 _nonce,
        address _token,
        uint256 amountLD,
        bytes memory payload
    ) external override {
        require(msg.sender == address(stargateRouter), 'WooCrossChainRouter: INVALID_CALLER');

        (address toToken, uint256 refId, uint256 minToAmount, address to) = abi.decode(
            payload,
            (address, uint256, uint256, address)
        );

        if (wooPool.quoteToken() != _token) {
            // NOTE: The bridged token is not WooPP's quote token.
            // So Cannot do the swap; just return it to users.
            TransferHelper.safeTransfer(_token, to, amountLD);
            emit WooCrossSwapOnDstChain(
                refId,
                msg.sender,
                to,
                _token,
                amountLD,
                toToken,
                _token,
                minToAmount,
                amountLD
            );
            return;
        }

        uint256 quoteAmount = amountLD;
        TransferHelper.safeApprove(_token, address(wooPool), quoteAmount);

        if (toToken == ETH_PLACEHOLDER_ADDR) {
            // quoteToken -> WETH -> ETH
            try wooPool.sellQuote(WETH, quoteAmount, minToAmount, address(this), to) returns (uint256 realToAmount) {
                IWETH(WETH).withdraw(realToAmount);
                TransferHelper.safeTransferETH(to, realToAmount);
                emit WooCrossSwapOnDstChain(
                    refId,
                    msg.sender,
                    to,
                    _token,
                    amountLD,
                    toToken,
                    ETH_PLACEHOLDER_ADDR,
                    minToAmount,
                    realToAmount
                );
            } catch {
                // transfer _token/amountLD to msg.sender because the swap failed for some reason.
                // this is not the ideal scenario, but the contract needs to deliver them eth or USDC.
                TransferHelper.safeTransfer(_token, to, amountLD);
                emit WooCrossSwapOnDstChain(
                    refId,
                    msg.sender,
                    to,
                    _token,
                    amountLD,
                    toToken,
                    _token,
                    minToAmount,
                    amountLD
                );
            }
        } else {
            if (_token == toToken) {
                // Stargate bridged token == toToken: NO swap is needed!
                TransferHelper.safeTransfer(toToken, to, amountLD);
                emit WooCrossSwapOnDstChain(
                    refId,
                    msg.sender,
                    to,
                    _token,
                    amountLD,
                    toToken,
                    toToken,
                    minToAmount,
                    amountLD
                );
            } else {
                // swap to the ERC20 token
                try wooPool.sellQuote(toToken, quoteAmount, minToAmount, to, to) returns (uint256 realToAmount) {
                    emit WooCrossSwapOnDstChain(
                        refId,
                        msg.sender,
                        to,
                        _token,
                        amountLD,
                        toToken,
                        toToken,
                        minToAmount,
                        realToAmount
                    );
                } catch {
                    TransferHelper.safeTransfer(_token, to, amountLD);
                    emit WooCrossSwapOnDstChain(
                        refId,
                        msg.sender,
                        to,
                        _token,
                        amountLD,
                        toToken,
                        _token,
                        minToAmount,
                        amountLD
                    );
                }
            }
        }
    }

    function inCaseTokensGetStuck(address stuckToken) external onlyOwner {
        uint256 amount = IERC20(stuckToken).balanceOf(address(this));
        if (amount > 0) {
            TransferHelper.safeTransfer(stuckToken, msg.sender, amount);
        }
    }

    function inCaseNativeTokensGetStuck() external onlyOwner {
        if (address(this).balance > 0) {
            TransferHelper.safeTransferETH(msg.sender, address(this).balance);
        }
    }

    function _generalTransfer(
        address token,
        address payable to,
        uint256 amount
    ) private {
        if (amount > 0) {
            if (token == ETH_PLACEHOLDER_ADDR) {
                TransferHelper.safeTransferETH(to, amount);
            } else {
                TransferHelper.safeTransfer(token, to, amount);
            }
        }
    }

    function _generalBalanceOf(address token, address who) private view returns (uint256) {
        return token == ETH_PLACEHOLDER_ADDR ? who.balance : IERC20(token).balanceOf(who);
    }
}

File 2 of 14 : IWooPP.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

/// @title Woo private pool for swap.
/// @notice Use this contract to directly interfact with woo's synthetic proactive
///         marketing making pool.
/// @author woo.network
interface IWooPP {
    /* ----- Type declarations ----- */

    /// @dev struct info to store the token info
    struct TokenInfo {
        uint112 reserve; // Token balance
        uint112 threshold; // Threshold for reserve update
        uint32 lastResetTimestamp; // Timestamp for last param update
        uint64 R; // Rebalance coefficient [0, 1]
        uint112 target; // Targeted balance for pricing
        bool isValid; // is this token info valid
    }

    /* ----- Events ----- */

    event StrategistUpdated(address indexed strategist, bool flag);
    event FeeManagerUpdated(address indexed newFeeManager);
    event RewardManagerUpdated(address indexed newRewardManager);
    event WooracleUpdated(address indexed newWooracle);
    event WooGuardianUpdated(address indexed newWooGuardian);
    event ParametersUpdated(address indexed baseToken, uint256 newThreshold, uint256 newR);
    event Withdraw(address indexed token, address indexed to, uint256 amount);
    event WooSwap(
        address indexed fromToken,
        address indexed toToken,
        uint256 fromAmount,
        uint256 toAmount,
        address from,
        address indexed to,
        address rebateTo
    );

    /* ----- External Functions ----- */

    /// @dev Swap baseToken into quoteToken
    /// @param baseToken the base token
    /// @param baseAmount amount of baseToken that user want to swap
    /// @param minQuoteAmount minimum amount of quoteToken that user accept to receive
    /// @param to quoteToken receiver address
    /// @param rebateTo the wallet address for rebate
    /// @return quoteAmount the swapped amount of quote token
    function sellBase(
        address baseToken,
        uint256 baseAmount,
        uint256 minQuoteAmount,
        address to,
        address rebateTo
    ) external returns (uint256 quoteAmount);

    /// @dev Swap quoteToken into baseToken
    /// @param baseToken the base token
    /// @param quoteAmount amount of quoteToken that user want to swap
    /// @param minBaseAmount minimum amount of baseToken that user accept to receive
    /// @param to baseToken receiver address
    /// @param rebateTo the wallet address for rebate
    /// @return baseAmount the swapped amount of base token
    function sellQuote(
        address baseToken,
        uint256 quoteAmount,
        uint256 minBaseAmount,
        address to,
        address rebateTo
    ) external returns (uint256 baseAmount);

    /// @dev Query the amount for selling the base token amount.
    /// @param baseToken the base token to sell
    /// @param baseAmount the amount to sell
    /// @return quoteAmount the swapped quote amount
    function querySellBase(address baseToken, uint256 baseAmount) external view returns (uint256 quoteAmount);

    /// @dev Query the amount for selling the quote token.
    /// @param baseToken the base token to receive (buy)
    /// @param quoteAmount the amount to sell
    /// @return baseAmount the swapped base token amount
    function querySellQuote(address baseToken, uint256 quoteAmount) external view returns (uint256 baseAmount);

    /// @dev get the quote token address (immutable)
    /// @return address of quote token
    function quoteToken() external view returns (address);
}

File 3 of 14 : IWETH.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;

/// @title Wrapped ETH.
/// BSC: https://bscscan.com/address/0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c#code
interface IWETH {
    /// @dev Deposit ETH into WETH
    function deposit() external payable;

    /// @dev Transfer WETH to receiver
    /// @param to address of WETH receiver
    /// @param value amount of WETH to transfer
    /// @return get true when succeed, else false
    function transfer(address to, uint256 value) external returns (bool);

    /// @dev Withdraw WETH to ETH
    function withdraw(uint256) external;
}

File 4 of 14 : IWooRouter.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

import '../interfaces/IWooPP.sol';

/// @title Woo router interface
/// @notice functions to interface with WooFi swap
interface IWooRouter {
    /* ----- Type declarations ----- */

    enum SwapType {
        WooSwap,
        DodoSwap
    }

    /* ----- Events ----- */

    event WooRouterSwap(
        SwapType swapType,
        address indexed fromToken,
        address indexed toToken,
        uint256 fromAmount,
        uint256 toAmount,
        address from,
        address indexed to,
        address rebateTo
    );

    event WooPoolChanged(address newPool);

    /* ----- Router properties ----- */

    function WETH() external pure returns (address);

    function wooPool() external pure returns (IWooPP);

    /* ----- Main query & swap APIs ----- */

    /// @dev query the amount to swap fromToken -> toToken
    /// @param fromToken the from token
    /// @param toToken the to token
    /// @param fromAmount the amount of fromToken to swap
    /// @return toAmount the predicted amount to receive
    function querySwap(
        address fromToken,
        address toToken,
        uint256 fromAmount
    ) external view returns (uint256 toAmount);

    /// @dev swap fromToken -> toToken
    /// @param fromToken the from token
    /// @param toToken the to token
    /// @param fromAmount the amount of fromToken to swap
    /// @param minToAmount the amount of fromToken to swap
    /// @param to the destination address
    /// @param rebateTo the rebate address (optional, can be 0)
    /// @return realToAmount the amount of toToken to receive
    function swap(
        address fromToken,
        address toToken,
        uint256 fromAmount,
        uint256 minToAmount,
        address payable to,
        address rebateTo
    ) external payable returns (uint256 realToAmount);

    /* ----- 3rd party DEX swap ----- */

    /// @dev swap fromToken -> toToken via an external 3rd swap
    /// @param approveTarget the contract address for token transfer approval
    /// @param swapTarget the contract address for swap
    /// @param fromToken the from token
    /// @param toToken the to token
    /// @param fromAmount the amount of fromToken to swap
    /// @param to the destination address
    /// @param data call data for external call
    function externalSwap(
        address approveTarget,
        address swapTarget,
        address fromToken,
        address toToken,
        uint256 fromAmount,
        address payable to,
        bytes calldata data
    ) external payable;

    /// @dev swap fromToken -> toToken via an external 3rd swap
    /// @param approveTarget the contract address for token transfer approval
    /// @param swapTarget the contract address for swap
    /// @param fromToken the from token
    /// @param toToken the to token
    /// @param fromAmount the amount of fromToken to swap
    /// @param minToAmount the min amount of swapped toToken
    /// @param to the destination address
    /// @param data call data for external call
    function externalSwap(
        address approveTarget,
        address swapTarget,
        address fromToken,
        address toToken,
        uint256 fromAmount,
        uint256 minToAmount,
        address payable to,
        bytes calldata data
    ) external payable returns (uint256 realToAmount);
}

File 5 of 14 : IStargateRouter.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;

interface IStargateRouter {
    struct lzTxObj {
        uint256 dstGasForCall;
        uint256 dstNativeAmount;
        bytes dstNativeAddr;
    }

    function addLiquidity(
        uint256 _poolId,
        uint256 _amountLD,
        address _to
    ) external;

    function swap(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress,
        uint256 _amountLD,
        uint256 _minAmountLD,
        lzTxObj memory _lzTxParams,
        bytes calldata _to,
        bytes calldata _payload
    ) external payable;

    function redeemRemote(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress,
        uint256 _amountLP,
        uint256 _minAmountLD,
        bytes calldata _to,
        lzTxObj memory _lzTxParams
    ) external payable;

    function instantRedeemLocal(
        uint16 _srcPoolId,
        uint256 _amountLP,
        address _to
    ) external returns (uint256);

    function redeemLocal(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress,
        uint256 _amountLP,
        bytes calldata _to,
        lzTxObj memory _lzTxParams
    ) external payable;

    function sendCredits(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress
    ) external payable;

    function quoteLayerZeroFee(
        uint16 _dstChainId,
        uint8 _functionType,
        bytes calldata _toAddress,
        bytes calldata _transferAndCallPayload,
        lzTxObj memory _lzTxParams
    ) external view returns (uint256, uint256);
}

File 6 of 14 : IStargateReceiver.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.6.12;

interface IStargateReceiver {
    function sgReceive(
        uint16 _chainId,
        bytes memory _srcAddress,
        uint256 _nonce,
        address _token,
        uint256 amountLD,
        bytes memory payload
    ) external;
}

File 7 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

File 8 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 9 of 14 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 10 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

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

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

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

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

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

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

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

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

File 11 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 12 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 13 of 14 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

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

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    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;
        // solhint-disable-next-line no-inline-assembly
        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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_weth","type":"address"},{"internalType":"address","name":"_wooPool","type":"address"},{"internalType":"address","name":"_stargateRouter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"refId","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"bridgedToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"bridgedAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"toToken","type":"address"},{"indexed":false,"internalType":"address","name":"realToToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"minToAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"realToAmount","type":"uint256"}],"name":"WooCrossSwapOnDstChain","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"refId","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"fromToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"fromAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minQuoteAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"realQuoteAmount","type":"uint256"}],"name":"WooCrossSwapOnSrcChain","type":"event"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridgeSlippage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"refId_","type":"uint256"},{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"address","name":"toToken","type":"address"},{"internalType":"uint256","name":"fromAmount","type":"uint256"},{"internalType":"uint256","name":"srcMinQuoteAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinToAmount","type":"uint256"},{"internalType":"uint16","name":"srcChainId","type":"uint16"},{"internalType":"uint16","name":"dstChainId","type":"uint16"},{"internalType":"address payable","name":"to","type":"address"}],"name":"crossSwap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"dstGasForNoSwapCall","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dstGasForSwapCall","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inCaseNativeTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stuckToken","type":"address"}],"name":"inCaseTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"dstChainId","type":"uint16"},{"internalType":"address","name":"toToken","type":"address"},{"internalType":"uint256","name":"refId","type":"uint256"},{"internalType":"uint256","name":"dstMinToAmount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"quoteLayerZeroFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"quotePoolIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quoteToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bridgeSlippage","type":"uint256"}],"name":"setBridgeSlippage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dstGasForNoSwapCall","type":"uint256"}],"name":"setDstGasForNoSwapCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dstGasForSwapCall","type":"uint256"}],"name":"setDstGasForSwapCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"_quotePoolId","type":"uint256"}],"name":"setQuotePoolId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stargateRouter","type":"address"}],"name":"setStargateRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"_wooCrossRouter","type":"address"}],"name":"setWooCrossChainRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wooPool","type":"address"}],"name":"setWooPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"_token","type":"address"}],"name":"setWooppQuoteTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"sgReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stargateRouter","outputs":[{"internalType":"contract IStargateRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"wooCrossRouters","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wooPool","outputs":[{"internalType":"contract IWooPP","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"wooppQuoteTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b506040516200296538038062002965833981016040819052620000349162000373565b6000620000406200033f565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055600580546001600160a01b038086166001600160a01b031992831617909255600380548584169216919091179081905560408051630217a4b760e41b81529051919092169163217a4b70916004808301926020929190829003018186803b158015620000f957600080fd5b505afa1580156200010e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000134919062000343565b600480546001600160a01b039283166001600160a01b0319918216179091556002805493909216928116929092178155606460065562057e406007556201388060085560017fbbc70db1b6c7afd11e79c0fb0051300458f1a3acb8ee9789d9b6b26c61ad9bc78190557fbff4442b8ed600beeb8e26b1279a0f0d14c6edfaec26d968ee13c86f7d4c2ba8919091557f10d9dd018e4cae503383c9f804c1c1603ada5856ee7894375d9b97cd8c8b27db8190557f825eb4cda6b8b44578c55770496c59e6dc3cf2235f690bcdaf51a61898ceb2848190557f3e57c57b03145299956be61386751c5b285d460d484d5c2403a6be086d9d6baa8190557fb3569174ca605aeef264a9f01151dace4275a70316034aaf090d8468560f043b8190557f80283cfdc74729ecb224822f7a02837fb1d52df7cc3435ae86bb6e025f6e06fa55600b6020527fa50eece07c7db1631545c0069bd8f5f54d5935e215d59097edf258a44ba91634805482167355d398326f99059ff775485246999027b31979551790557f0387e9d1203691d8e3362a7e4c6723de358a4010d7f31ecbec3fbfc61d1c75fc8054821673b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e179055600c6000527f765e72d9703c9804ad76c7d0af52f5313041ea56bb31a328e17fea205151b5ea80549091167304068da6c83afcfa0e13ba15a6696662335d5b7517905550620003df9050565b3390565b60006020828403121562000355578081fd5b81516001600160a01b03811681146200036c578182fd5b9392505050565b60008060006060848603121562000388578182fd5b83516200039581620003c6565b6020850151909350620003a881620003c6565b6040850151909250620003bb81620003c6565b809150509250925092565b6001600160a01b0381168114620003dc57600080fd5b50565b61257680620003ef6000396000f3fe6080604052600436106101855760003560e01c806397724a86116100d1578063b5997a5b1161008a578063cbe127f211610064578063cbe127f214610409578063def68a9c14610429578063f2fde38b14610449578063f6af6957146104695761018c565b8063b5997a5b146103a6578063b8f1e0bc146103c6578063c22b7419146103f45761018c565b806397724a86146103075780639f12303214610327578063a739460314610347578063a9e56f3c1461035c578063ab8236f314610371578063ad5c4648146103915761018c565b806351b78b471161013e57806373e49b701161011857806373e49b70146102a857806383af5550146102c857806385857419146102dd5780638da5cb5b146102f25761018c565b806351b78b471461025e578063616d29641461027e578063715018a6146102935761018c565b8063091a76c614610191578063217a4b70146101b35780632b51d7eb146101de578063403a01e51461020b5780634c9041061461022b5780634d8650d71461023e5761018c565b3661018c57005b600080fd5b34801561019d57600080fd5b506101b16101ac366004611c97565b610489565b005b3480156101bf57600080fd5b506101c86104d6565b6040516101d59190611e15565b60405180910390f35b3480156101ea57600080fd5b506101fe6101f9366004611b21565b6104e5565b6040516101d591906124b1565b34801561021757600080fd5b506101b1610226366004611c97565b6104f7565b6101b1610239366004611cc7565b61055d565b34801561024a57600080fd5b506101b1610259366004611c97565b610a7b565b34801561026a57600080fd5b506101b1610279366004611a7e565b610abf565b34801561028a57600080fd5b506101fe610b46565b34801561029f57600080fd5b506101b1610b4c565b3480156102b457600080fd5b506101b16102c3366004611b3d565b610bd5565b3480156102d457600080fd5b506101fe610c48565b3480156102e957600080fd5b506101b1610c4e565b3480156102fe57600080fd5b506101c8610c9f565b34801561031357600080fd5b506101b1610322366004611c6d565b610cae565b34801561033357600080fd5b506101c8610342366004611b21565b610d04565b34801561035357600080fd5b506101c8610d1f565b34801561036857600080fd5b506101c8610d2e565b34801561037d57600080fd5b506101b161038c366004611bd3565b610d3d565b34801561039d57600080fd5b506101c86111ec565b3480156103b257600080fd5b506101b16103c1366004611b3d565b6111fb565b3480156103d257600080fd5b506103e66103e1366004611b75565b611294565b6040516101d59291906124ba565b34801561040057600080fd5b506101fe6113e3565b34801561041557600080fd5b506101b1610424366004611a7e565b6113e9565b34801561043557600080fd5b506101b1610444366004611a7e565b61144a565b34801561045557600080fd5b506101b1610464366004611a7e565b61151f565b34801561047557600080fd5b506101c8610484366004611b21565b6115df565b6104916115fa565b6001600160a01b03166104a2610c9f565b6001600160a01b0316146104d15760405162461bcd60e51b81526004016104c89061222b565b60405180910390fd5b600855565b6004546001600160a01b031681565b600a6020526000908152604090205481565b6104ff6115fa565b6001600160a01b0316610510610c9f565b6001600160a01b0316146105365760405162461bcd60e51b81526004016104c89061222b565b6127108111156105585760405162461bcd60e51b81526004016104c890612260565b600655565b6001600160a01b0388166105835760405162461bcd60e51b81526004016104c890612170565b6001600160a01b0387166105a95760405162461bcd60e51b81526004016104c8906122a5565b6001600160a01b0381166105cf5760405162461bcd60e51b81526004016104c8906120cb565b34896001600160a01b038a1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14806105fc578a610609565b6005546001600160a01b03165b9a5080156106a457348911156106315760405162461bcd60e51b81526004016104c890611ff1565b600560009054906101000a90046001600160a01b03166001600160a01b031663d0e30db08a6040518263ffffffff1660e01b81526004016000604051808303818588803b15801561068157600080fd5b505af1158015610695573d6000803e3d6000fd5b505050505088830392506106b0565b6106b08b33308c6115fe565b506004546000906001600160a01b038c8116911614610772576003546106e1908c906001600160a01b03168b6116e7565b6003546040516306846fb560e41b81526001600160a01b0390911690636846fb5090610719908e908d908d9030908b90600401611ecb565b602060405180830381600087803b15801561073357600080fd5b505af1158015610747573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076b9190611caf565b9050610775565b50875b600480546040516370a0823160e01b81526001600160a01b03909116916370a08231916107a491309101611e15565b60206040518083038186803b1580156107bc57600080fd5b505afa1580156107d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f49190611caf565b8111156108135760405162461bcd60e51b81526004016104c890612327565b600454600254610830916001600160a01b039081169116836116e7565b6001600160a01b0384166108565760405162461bcd60e51b81526004016104c89061234e565b60608a83898760405160200161086f9493929190611ea0565b60408051601f1981840301815282825261ffff8916600090815260096020908152929020549093506060926108b0926001600160a01b039092169101611ddc565b604051602081830303815290604052905060006108f06127106108ea6108e36006546127106117d590919063ffffffff16565b8790611802565b90611843565b61ffff89166000908152600b6020526040812054919250906001600160a01b038f811691161461092257600754610926565b6008545b9050600260009054906101000a90046001600160a01b03166001600160a01b0316639fbf10fc888b600a60008f61ffff1661ffff16815260200190815260200160002054600a60008f61ffff1661ffff16815260200190815260200160002054338b8960405180606001604052808b81526020016000815260200160405180604001604052806002815260200161060f60f31b8152508152508c8e6040518b63ffffffff1660e01b81526004016109e599989796959493929190612434565b6000604051808303818588803b1580156109fe57600080fd5b505af1158015610a12573d6000803e3d6000fd5b505050505050505050836001600160a01b0316336001600160a01b0316837f84f8431fa975655da1378bee00f1e50b540c722eadd17490117d753a896a16118e8d8d87604051610a659493929190611efd565b60405180910390a4505050505050505050505050565b610a836115fa565b6001600160a01b0316610a94610c9f565b6001600160a01b031614610aba5760405162461bcd60e51b81526004016104c89061222b565b600755565b610ac76115fa565b6001600160a01b0316610ad8610c9f565b6001600160a01b031614610afe5760405162461bcd60e51b81526004016104c89061222b565b6001600160a01b038116610b245760405162461bcd60e51b81526004016104c890611f23565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60085481565b610b546115fa565b6001600160a01b0316610b65610c9f565b6001600160a01b031614610b8b5760405162461bcd60e51b81526004016104c89061222b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b610bdd6115fa565b6001600160a01b0316610bee610c9f565b6001600160a01b031614610c145760405162461bcd60e51b81526004016104c89061222b565b61ffff919091166000908152600b6020526040902080546001600160a01b0319166001600160a01b03909216919091179055565b60065481565b610c566115fa565b6001600160a01b0316610c67610c9f565b6001600160a01b031614610c8d5760405162461bcd60e51b81526004016104c89061222b565b4715610c9d57610c9d3347611875565b565b6000546001600160a01b031690565b610cb66115fa565b6001600160a01b0316610cc7610c9f565b6001600160a01b031614610ced5760405162461bcd60e51b81526004016104c89061222b565b61ffff9091166000908152600a6020526040902055565b600b602052600090815260409020546001600160a01b031681565b6003546001600160a01b031681565b6002546001600160a01b031681565b6002546001600160a01b03163314610d675760405162461bcd60e51b81526004016104c8906121a7565b60008060008084806020019051810190610d819190611ab6565b9350935093509350866001600160a01b0316600360009054906101000a90046001600160a01b03166001600160a01b031663217a4b706040518163ffffffff1660e01b815260040160206040518083038186803b158015610de157600080fd5b505afa158015610df5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e199190611a9a565b6001600160a01b031614610e7f57610e32878288611907565b806001600160a01b0316336001600160a01b0316846000805160206125218339815191528a8a898d898e604051610e6e96959493929190611e66565b60405180910390a4505050506111e4565b6003548690610e999089906001600160a01b0316836116e7565b6001600160a01b03851673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156110675760035460055460405163f3287c2f60e01b81526001600160a01b039283169263f3287c2f92610efa929116908590889030908990600401611ecb565b602060405180830381600087803b158015610f1457600080fd5b505af1925050508015610f44575060408051601f3d908101601f19168201909252610f4191810190611caf565b60015b610f9c57610f53888389611907565b816001600160a01b0316336001600160a01b0316856000805160206125218339815191528b8b8a8e8a8f604051610f8f96959493929190611e66565b60405180910390a4611062565b600554604051632e1a7d4d60e01b81526001600160a01b0390911690632e1a7d4d90610fcc9084906004016124b1565b600060405180830381600087803b158015610fe657600080fd5b505af1158015610ffa573d6000803e3d6000fd5b505050506110088382611875565b826001600160a01b0316336001600160a01b0316866000805160206125218339815191528c8c8b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8b8960405161105896959493929190611e66565b60405180910390a4505b6111de565b846001600160a01b0316886001600160a01b031614156110d55761108c858389611907565b816001600160a01b0316336001600160a01b0316856000805160206125218339815191528b8b8a8b8a8f6040516110c896959493929190611e66565b60405180910390a46111de565b60035460405163f3287c2f60e01b81526001600160a01b039091169063f3287c2f9061110d9088908590889088908190600401611ecb565b602060405180830381600087803b15801561112757600080fd5b505af1925050508015611157575060408051601f3d908101601f1916820190925261115491810190611caf565b60015b6111a257611166888389611907565b816001600160a01b0316336001600160a01b0316856000805160206125218339815191528b8b8a8e8a8f6040516110c896959493929190611e66565b826001600160a01b0316336001600160a01b0316866000805160206125218339815191528c8c8b8c8b89604051610a6596959493929190611e66565b50505050505b505050505050565b6005546001600160a01b031681565b6112036115fa565b6001600160a01b0316611214610c9f565b6001600160a01b03161461123a5760405162461bcd60e51b81526004016104c89061222b565b6001600160a01b0381166112605760405162461bcd60e51b81526004016104c890611f67565b61ffff91909116600090815260096020526040902080546001600160a01b0319166001600160a01b03909216919091179055565b6000806060836040516020016112aa9190611ddc565b60405160208183030381529060405290506060878787876040516020016112d49493929190611ea0565b60408051601f1981840301815291815261ffff8b166000908152600b60205290812054919250906001600160a01b038a811691161461131557600754611319565b6008545b600280546040805160608101825284815260006020808301919091528251808401845294855261060f60f31b908501528082019390935251630a51236960e01b81529293506001600160a01b031691630a51236991611383918e91600191899189916004016123dc565b604080518083038186803b15801561139a57600080fd5b505afa1580156113ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d29190611d5c565b945094505050509550959350505050565b60075481565b6113f16115fa565b6001600160a01b0316611402610c9f565b6001600160a01b0316146114285760405162461bcd60e51b81526004016104c89061222b565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6114526115fa565b6001600160a01b0316611463610c9f565b6001600160a01b0316146114895760405162461bcd60e51b81526004016104c89061222b565b6040516370a0823160e01b81526000906001600160a01b038316906370a08231906114b8903090600401611e15565b60206040518083038186803b1580156114d057600080fd5b505afa1580156114e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115089190611caf565b9050801561151b5761151b823383611907565b5050565b6115276115fa565b6001600160a01b0316611538610c9f565b6001600160a01b03161461155e5760405162461bcd60e51b81526004016104c89061222b565b6001600160a01b0381166115845760405162461bcd60e51b81526004016104c890611fab565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6009602052600090815260409020546001600160a01b031681565b3390565b60006060856001600160a01b03166323b872dd86868660405160240161162693929190611e29565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161165f9190611df9565b6000604051808303816000865af19150503d806000811461169c576040519150601f19603f3d011682016040523d82523d6000602084013e6116a1565b606091505b50915091508180156116cb5750805115806116cb5750808060200190518101906116cb9190611b01565b6111e45760405162461bcd60e51b81526004016104c890612026565b60006060846001600160a01b031663095ea7b3858560405160240161170d929190611e4d565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040516117469190611df9565b6000604051808303816000865af19150503d8060008114611783576040519150601f19603f3d011682016040523d82523d6000602084013e611788565b606091505b50915091508180156117b25750805115806117b25750808060200190518101906117b29190611b01565b6117ce5760405162461bcd60e51b81526004016104c8906122dc565b5050505050565b6000828211156117f75760405162461bcd60e51b81526004016104c890612102565b508082035b92915050565b600082611811575060006117fc565b8282028284828161181e57fe5b041461183c5760405162461bcd60e51b81526004016104c8906121ea565b9392505050565b60008082116118645760405162461bcd60e51b81526004016104c890612139565b81838161186d57fe5b049392505050565b604080516000808252602082019092526001600160a01b03841690839060405161189f9190611df9565b60006040518083038185875af1925050503d80600081146118dc576040519150601f19603f3d011682016040523d82523d6000602084013e6118e1565b606091505b50509050806119025760405162461bcd60e51b81526004016104c890612077565b505050565b60006060846001600160a01b031663a9059cbb858560405160240161192d929190611e4d565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040516119669190611df9565b6000604051808303816000865af19150503d80600081146119a3576040519150601f19603f3d011682016040523d82523d6000602084013e6119a8565b606091505b50915091508180156119d25750805115806119d25750808060200190518101906119d29190611b01565b6117ce5760405162461bcd60e51b81526004016104c89061238f565b600082601f8301126119fe578081fd5b813567ffffffffffffffff80821115611a15578283fd5b604051601f8301601f191681016020018281118282101715611a35578485fd5b604052828152925082848301602001861015611a5057600080fd5b8260208601602083013760006020848301015250505092915050565b803561ffff811681146117fc57600080fd5b600060208284031215611a8f578081fd5b813561183c816124f8565b600060208284031215611aab578081fd5b815161183c816124f8565b60008060008060808587031215611acb578283fd5b8451611ad6816124f8565b8094505060208501519250604085015191506060850151611af6816124f8565b939692955090935050565b600060208284031215611b12578081fd5b8151801515811461183c578182fd5b600060208284031215611b32578081fd5b813561183c81612510565b60008060408385031215611b4f578182fd5b8235611b5a81612510565b91506020830135611b6a816124f8565b809150509250929050565b600080600080600060a08688031215611b8c578081fd5b8535611b9781612510565b94506020860135611ba7816124f8565b935060408601359250606086013591506080860135611bc5816124f8565b809150509295509295909350565b60008060008060008060c08789031215611beb578081fd5b8635611bf681612510565b9550602087013567ffffffffffffffff80821115611c12578283fd5b611c1e8a838b016119ee565b96506040890135955060608901359150611c37826124f8565b9093506080880135925060a08801359080821115611c53578283fd5b50611c6089828a016119ee565b9150509295509295509295565b60008060408385031215611c7f578182fd5b611c898484611a6c565b946020939093013593505050565b600060208284031215611ca8578081fd5b5035919050565b600060208284031215611cc0578081fd5b5051919050565b60008060008060008060008060006101208a8c031215611ce5578283fd5b8935985060208a0135611cf7816124f8565b975060408a0135611d07816124f8565b965060608a0135955060808a0135945060a08a01359350611d2b8b60c08c01611a6c565b9250611d3a8b60e08c01611a6c565b91506101008a0135611d4b816124f8565b809150509295985092959850929598565b60008060408385031215611d6e578182fd5b505080516020909101519092909150565b60008151808452611d978160208601602086016124c8565b601f01601f19169290920160200192915050565b60008151835260208201516020840152604082015160606040850152611dd46060850182611d7f565b949350505050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b60008251611e0b8184602087016124c8565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0396871681526020810195909552928516604085015293166060830152608082019290925260a081019190915260c00190565b6001600160a01b03948516815260208101939093526040830191909152909116606082015260800190565b6001600160a01b0395861681526020810194909452604084019290925283166060830152909116608082015260a00190565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b60208082526024908201527f576f6f43726f7373436861696e526f757465723a20217374617267617465526f6040820152633aba32b960e11b606082015260800190565b60208082526024908201527f576f6f43726f7373436861696e526f757465723a2021776f6f43726f7373526f6040820152633aba32b960e11b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252818101527f576f6f43726f7373436861696e526f757465723a202166726f6d416d6f756e74604082015260600190565b60208082526031908201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472604082015270185b9cd9995c919c9bdb4819985a5b1959607a1b606082015260800190565b60208082526034908201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60408201527308115512081d1c985b9cd9995c8819985a5b195960621b606082015260800190565b60208082526018908201527f576f6f43726f7373436861696e526f757465723a2021746f0000000000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252601f908201527f576f6f43726f7373436861696e526f757465723a202166726f6d546f6b656e00604082015260600190565b60208082526023908201527f576f6f43726f7373436861696e526f757465723a20494e56414c49445f43414c6040820152622622a960e91b606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526025908201527f576f6f43726f7373436861696e526f757465723a20215f627269646765536c69604082015264707061676560d81b606082015260800190565b6020808252601d908201527f576f6f43726f7373436861696e526f757465723a2021746f546f6b656e000000604082015260600190565b6020808252602b908201527f5472616e7366657248656c7065723a3a73616665417070726f76653a2061707060408201526a1c9bdd994819985a5b195960aa1b606082015260800190565b6020808252600d908201526c08589c9a5919d9505b5bdd5b9d609a1b604082015260600190565b60208082526021908201527f576f6f43726f7373436861696e526f757465723a20746f5f5a45524f5f4144446040820152602960f91b606082015260800190565b6020808252602d908201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260408201526c185b9cd9995c8819985a5b1959609a1b606082015260800190565b600061ffff8716825260ff8616602083015260a0604083015261240260a0830186611d7f565b82810360608401526124148186611d7f565b905082810360808401526124288185611dab565b98975050505050505050565b600061012061ffff8c1683528a602084015289604084015260018060a01b03891660608401528760808401528660a08401528060c084015261247881840187611dab565b905082810360e084015261248c8186611d7f565b90508281036101008401526124a18185611d7f565b9c9b505050505050505050505050565b90815260200190565b918252602082015260400190565b60005b838110156124e35781810151838201526020016124cb565b838111156124f2576000848401525b50505050565b6001600160a01b038116811461250d57600080fd5b50565b61ffff8116811461250d57600080fdfe12ec1cd5a97a783f66bac513e496864dd4a0f398d181f887a6bb6df6bb9330fca26469706673582212203316c11e5c69eb1fa20cef7ca23545a0b4e9339237f2b58d3f9646138b12e59f64736f6c634300060c00330000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12700000000000000000000000007400b665c8f4f3a951a99f1ee9872efb8778723d00000000000000000000000045a01e4e04f14f7a4a6702c74187c5f6222033cd

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.