AVAX Price: $22.87 (+12.11%)
Gas: 1 nAVAX
 

Overview

AVAX Balance

Avalanche C-Chain LogoAvalanche C-Chain LogoAvalanche C-Chain Logo0 AVAX

AVAX Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Swap Tokens354404822023-09-20 19:19:40580 days ago1695237580IN
0x20293eDD...c48005858
0.06783093 AVAX0.0215102945.74487943
Swap Tokens354403772023-09-20 19:16:27580 days ago1695237387IN
0x20293eDD...c48005858
0.04060138 AVAX0.0123636826.5
Swap Tokens354387112023-09-20 18:20:11580 days ago1695234011IN
0x20293eDD...c48005858
0.07778027 AVAX0.0124393326.5
Swap Tokens354387092023-09-20 18:20:04580 days ago1695234004IN
0x20293eDD...c48005858
0.13608926 AVAX0.0126768326.5
Swap Tokens354382512023-09-20 18:04:43580 days ago1695233083IN
0x20293eDD...c48005858
0.27320713 AVAX0.0125038126.51
Swap Tokens354382242023-09-20 18:03:49580 days ago1695233029IN
0x20293eDD...c48005858
0.07778027 AVAX0.0125250126.5
Swap Tokens354381542023-09-20 18:01:29580 days ago1695232889IN
0x20293eDD...c48005858
0.07778027 AVAX0.0125256426.5
Swap Tokens354380132023-09-20 17:56:42580 days ago1695232602IN
0x20293eDD...c48005858
0.07778027 AVAX0.0124399726.5
Swap Tokens354379032023-09-20 17:53:02580 days ago1695232382IN
0x20293eDD...c48005858
0.07778027 AVAX0.0124399726.5
Swap Tokens354378542023-09-20 17:51:24580 days ago1695232284IN
0x20293eDD...c48005858
0.00534904 AVAX0.0124768826.5
Swap Tokens354376132023-09-20 17:43:21580 days ago1695231801IN
0x20293eDD...c48005858
0.07017994 AVAX0.0124399726.5
Swap Tokens354364862023-09-20 17:05:40580 days ago1695229540IN
0x20293eDD...c48005858
0.30247535 AVAX0.0125038126.51
Swap Tokens354347612023-09-20 16:07:40580 days ago1695226060IN
0x20293eDD...c48005858
0.06783093 AVAX0.0123519626.5
Swap Tokens354340022023-09-20 15:42:03580 days ago1695224523IN
0x20293eDD...c48005858
0.06196421 AVAX0.0124399726.5
Swap Tokens354339812023-09-20 15:41:19580 days ago1695224479IN
0x20293eDD...c48005858
0.06196421 AVAX0.0124396526.5
Swap Tokens354336622023-09-20 15:30:37580 days ago1695223837IN
0x20293eDD...c48005858
0.01959883 AVAX0.0123377326.5
Swap Tokens354315442023-09-20 14:18:37580 days ago1695219517IN
0x20293eDD...c48005858
0.04059926 AVAX0.012575226.5
Swap Tokens354305162023-09-20 13:43:53580 days ago1695217433IN
0x20293eDD...c48005858
0.06783093 AVAX0.0124258526.5
Swap Tokens354305152023-09-20 13:43:50580 days ago1695217430IN
0x20293eDD...c48005858
0.06783093 AVAX0.0124252126.5
Swap Tokens354294312023-09-20 13:07:22580 days ago1695215242IN
0x20293eDD...c48005858
0.04115234 AVAX0.0124940326.5
Swap Tokens354291422023-09-20 12:57:36580 days ago1695214656IN
0x20293eDD...c48005858
0.11632817 AVAX0.0125408226.51
Swap Tokens354289622023-09-20 12:51:36580 days ago1695214296IN
0x20293eDD...c48005858
0.06061593 AVAX0.0126456126.5
Swap Tokens354289512023-09-20 12:51:14580 days ago1695214274IN
0x20293eDD...c48005858
0.06783093 AVAX0.0124258526.5
Swap Tokens354278472023-09-20 12:14:11580 days ago1695212051IN
0x20293eDD...c48005858
0.06783093 AVAX0.0125418626.5
Swap Tokens354276252023-09-20 12:06:47580 days ago1695211607IN
0x20293eDD...c48005858
0.01961855 AVAX0.0123377326.5
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
354404822023-09-20 19:19:40580 days ago1695237580
0x20293eDD...c48005858
0.06783093 AVAX
354403772023-09-20 19:16:27580 days ago1695237387
0x20293eDD...c48005858
0.04060138 AVAX
354387112023-09-20 18:20:11580 days ago1695234011
0x20293eDD...c48005858
0.07778027 AVAX
354387092023-09-20 18:20:04580 days ago1695234004
0x20293eDD...c48005858
0.13608926 AVAX
354382512023-09-20 18:04:43580 days ago1695233083
0x20293eDD...c48005858
0.27320713 AVAX
354382242023-09-20 18:03:49580 days ago1695233029
0x20293eDD...c48005858
0.07778027 AVAX
354381542023-09-20 18:01:29580 days ago1695232889
0x20293eDD...c48005858
0.07778027 AVAX
354380132023-09-20 17:56:42580 days ago1695232602
0x20293eDD...c48005858
0.07778027 AVAX
354379032023-09-20 17:53:02580 days ago1695232382
0x20293eDD...c48005858
0.07778027 AVAX
354378542023-09-20 17:51:24580 days ago1695232284
0x20293eDD...c48005858
0.00534904 AVAX
354376132023-09-20 17:43:21580 days ago1695231801
0x20293eDD...c48005858
0.07017994 AVAX
354364862023-09-20 17:05:40580 days ago1695229540
0x20293eDD...c48005858
0.30247535 AVAX
354347612023-09-20 16:07:40580 days ago1695226060
0x20293eDD...c48005858
0.06783093 AVAX
354340022023-09-20 15:42:03580 days ago1695224523
0x20293eDD...c48005858
0.06196421 AVAX
354339812023-09-20 15:41:19580 days ago1695224479
0x20293eDD...c48005858
0.06196421 AVAX
354336622023-09-20 15:30:37580 days ago1695223837
0x20293eDD...c48005858
0.01959883 AVAX
354315442023-09-20 14:18:37580 days ago1695219517
0x20293eDD...c48005858
0.04059926 AVAX
354305162023-09-20 13:43:53580 days ago1695217433
0x20293eDD...c48005858
0.06783093 AVAX
354305152023-09-20 13:43:50580 days ago1695217430
0x20293eDD...c48005858
0.06783093 AVAX
354294312023-09-20 13:07:22580 days ago1695215242
0x20293eDD...c48005858
0.04115234 AVAX
354291422023-09-20 12:57:36580 days ago1695214656
0x20293eDD...c48005858
0.11632817 AVAX
354289622023-09-20 12:51:36580 days ago1695214296
0x20293eDD...c48005858
0.06061593 AVAX
354289512023-09-20 12:51:14580 days ago1695214274
0x20293eDD...c48005858
0.06783093 AVAX
354278472023-09-20 12:14:11580 days ago1695212051
0x20293eDD...c48005858
0.06783093 AVAX
354276252023-09-20 12:06:47580 days ago1695211607
0x20293eDD...c48005858
0.01961855 AVAX
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WidgetSwap

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : WidgetSwap.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.4;
pragma abicoder v2;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "../interfaces/IStargateRouter.sol";
import "../interfaces/IStargateRouterETH.sol";
import "../interfaces/IStargateFactory.sol";
import "../interfaces/IStargateWidget.sol";

contract WidgetSwap is ReentrancyGuard, IStargateWidget {
    using SafeERC20 for IERC20;

    IStargateRouter public immutable stargateRouter;
    IStargateRouterETH public immutable stargateRouterETH;
    IStargateFactory public immutable stargateFactory;
    uint256 public constant TENTH_BPS_DENOMINATOR = 100000;
    uint256 public constant MAX_UINT = 2**256 - 1;
    mapping(address => bool) public tokenApproved;

    constructor(address _stargateRouter, address _stargateRouterETH, address _stargateFactory) {
        stargateRouter = IStargateRouter(_stargateRouter);
        stargateRouterETH = IStargateRouterETH(_stargateRouterETH);
        stargateFactory = IStargateFactory(_stargateFactory);
    }

    // allow anyone to emit this msg alongside their stargate tx so they can get credited for their referral
    // to get credit this event must be emitted in the same tx as a stargate swap event
    function partnerSwap(bytes2 _partnerId) external override {
        emit PartnerSwap(_partnerId);
    }

    function swapTokens(
        uint16 _dstChainId,
        uint16 _srcPoolId,
        uint16 _dstPoolId,
        uint256 _amountLD,
        uint256 _minAmountLD,
        IStargateRouter.lzTxObj calldata _lzTxParams,
        bytes calldata _to,
        bytes2 _partnerId,
        FeeObj calldata _feeObj
    ) external override nonReentrant payable {
        uint256 widgetFee = _getAndPayWidgetFee(_srcPoolId, _amountLD, _feeObj);

        stargateRouter.swap{value:msg.value}(
            _dstChainId,
            _srcPoolId,
            _dstPoolId,
            payable(msg.sender),
            _amountLD - widgetFee,
            _minAmountLD,
            _lzTxParams,
            _to,
            "0x"
        );

        emit WidgetSwapped(_partnerId, _feeObj.tenthBps, widgetFee);
    }

    function swapETH(
        uint16 _dstChainId,
        uint256 _amountLD,
        uint256 _minAmountLD,
        bytes calldata _to,
        bytes2 _partnerId,
        FeeObj calldata _feeObj
    ) external override nonReentrant payable {
        // allows us to deploy same contract on non eth chains
        require(address(stargateRouterETH) != address(0x0), "WidgetSwap: func not available");

        uint256 widgetFee = _getAndPayWidgetFeeETH(_amountLD, _feeObj);

        // "value:" contains the amount of eth to swap and the stargate/layerZero fees, minus the widget fee
        stargateRouterETH.swapETH{value:msg.value - widgetFee}(
            _dstChainId,
            payable(msg.sender),
            _to,
            _amountLD - widgetFee,
            _minAmountLD
        );

        emit WidgetSwapped(_partnerId, _feeObj.tenthBps, widgetFee);
    }


    function _getAndPayWidgetFee(
        uint16 _srcPoolId,
        uint256 _amountLD,
        FeeObj calldata _feeObj
    ) internal returns (uint256 widgetFee) {
        // corresponding token to the poolId
        address token = stargateFactory.getPool(_srcPoolId).token();

        // move all the tokens to this contract
        IERC20(token).safeTransferFrom(msg.sender, address(this), _amountLD);

        // calculate the widgetFee
        widgetFee = _amountLD * _feeObj.tenthBps / TENTH_BPS_DENOMINATOR;

        // pay the widget fee
        IERC20(token).safeTransfer(_feeObj.feeCollector, widgetFee);

        // only call max approval once
        if (!tokenApproved[token]) {
            tokenApproved[token] = true;
            // allow stargateRouter to spend the tokens to be transferred
            IERC20(token).safeApprove(address(stargateRouter), MAX_UINT);
        }

        return widgetFee;
    }

    function _getAndPayWidgetFeeETH(
        uint256 _amountLD,
        FeeObj calldata _feeObj
    ) internal returns (uint256 widgetFee) {
        // calculate the widgetFee
        widgetFee = _amountLD * _feeObj.tenthBps / TENTH_BPS_DENOMINATOR;
        require(msg.value > widgetFee, "WidgetSwap: not enough eth for widgetFee");

        // verify theres enough eth to cover the amount to swap
        require(msg.value - widgetFee > _amountLD, "WidgetSwap: not enough eth for swap");

        // pay the widget fee
        (bool success, ) = _feeObj.feeCollector.call{value: widgetFee}("");
        require(success, "WidgetSwap: failed to transfer widgetFee");

        return widgetFee;
    }
}

File 2 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^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() {
        _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 making 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 3 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 4 of 10 : IStargateRouter.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;
pragma abicoder v2;

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 5 of 10 : IStargateRouterETH.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;
pragma abicoder v2;

interface IStargateRouterETH {
    function addLiquidityETH() external payable;

    function swapETH(
        uint16 dstChainId,
        address payable refundAddress,
        bytes calldata to,
        uint256 amountLD,
        uint256 minAmountLD
    ) external payable;
}

File 6 of 10 : IStargateFactory.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.4;

import "./IStargatePool.sol";

interface IStargateFactory {
    function getPool(uint256 _srcPoolId) external returns (IStargatePool);
}

File 7 of 10 : IStargateWidget.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;
pragma abicoder v2;

import "../interfaces/IStargateRouter.sol";

interface IStargateWidget {
    struct FeeObj {
        uint256 tenthBps; // bps is to an extra decimal place
        address feeCollector;
    }

    event WidgetSwapped(bytes2 indexed partnerId, uint256 tenthBps, uint256 widgetFee);
    event PartnerSwap(bytes2 indexed partnerId);

    function partnerSwap(bytes2 _partnerId) external;

    function swapTokens(
        uint16 _dstChainId,
        uint16 _srcPoolId,
        uint16 _dstPoolId,
        uint256 _amountLD,
        uint256 _minAmountLD,
        IStargateRouter.lzTxObj calldata _lzTxParams,
        bytes calldata _to,
        bytes2 _partnerId,
        FeeObj calldata _feeObj
    ) external payable;


    function swapETH(
        uint16 _dstChainId,
        uint256 _amountLD,
        uint256 _minAmountLD,
        bytes calldata _to,
        bytes2 _partnerId,
        FeeObj calldata _feeObj
    ) external payable;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 10 : IStargatePool.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.4;

interface IStargatePool {
    function token() external returns (address);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_stargateRouter","type":"address"},{"internalType":"address","name":"_stargateRouterETH","type":"address"},{"internalType":"address","name":"_stargateFactory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes2","name":"partnerId","type":"bytes2"}],"name":"PartnerSwap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes2","name":"partnerId","type":"bytes2"},{"indexed":false,"internalType":"uint256","name":"tenthBps","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"widgetFee","type":"uint256"}],"name":"WidgetSwapped","type":"event"},{"inputs":[],"name":"MAX_UINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TENTH_BPS_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes2","name":"_partnerId","type":"bytes2"}],"name":"partnerSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stargateFactory","outputs":[{"internalType":"contract IStargateFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stargateRouter","outputs":[{"internalType":"contract IStargateRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stargateRouterETH","outputs":[{"internalType":"contract IStargateRouterETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"uint256","name":"_amountLD","type":"uint256"},{"internalType":"uint256","name":"_minAmountLD","type":"uint256"},{"internalType":"bytes","name":"_to","type":"bytes"},{"internalType":"bytes2","name":"_partnerId","type":"bytes2"},{"components":[{"internalType":"uint256","name":"tenthBps","type":"uint256"},{"internalType":"address","name":"feeCollector","type":"address"}],"internalType":"struct IStargateWidget.FeeObj","name":"_feeObj","type":"tuple"}],"name":"swapETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"uint16","name":"_srcPoolId","type":"uint16"},{"internalType":"uint16","name":"_dstPoolId","type":"uint16"},{"internalType":"uint256","name":"_amountLD","type":"uint256"},{"internalType":"uint256","name":"_minAmountLD","type":"uint256"},{"components":[{"internalType":"uint256","name":"dstGasForCall","type":"uint256"},{"internalType":"uint256","name":"dstNativeAmount","type":"uint256"},{"internalType":"bytes","name":"dstNativeAddr","type":"bytes"}],"internalType":"struct IStargateRouter.lzTxObj","name":"_lzTxParams","type":"tuple"},{"internalType":"bytes","name":"_to","type":"bytes"},{"internalType":"bytes2","name":"_partnerId","type":"bytes2"},{"components":[{"internalType":"uint256","name":"tenthBps","type":"uint256"},{"internalType":"address","name":"feeCollector","type":"address"}],"internalType":"struct IStargateWidget.FeeObj","name":"_feeObj","type":"tuple"}],"name":"swapTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60e060405234801561001057600080fd5b5060405161132e38038061132e83398101604081905261002f91610077565b60016000556001600160601b0319606093841b811660805291831b821660a05290911b1660c0526100b9565b80516001600160a01b038116811461007257600080fd5b919050565b60008060006060848603121561008b578283fd5b6100948461005b565b92506100a26020850161005b565b91506100b06040850161005b565b90509250925092565b60805160601c60a05160601c60c05160601c61121b6101136000396000818160f70152610591015260008181610143015281816103c0015261044c0152600081816101aa015281816102750152610721015261121b6000f3fe6080604052600436106100865760003560e01c8063919d763711610059578063919d763714610165578063a87376e914610178578063a9e56f3c14610198578063beaeb55a146101cc578063e5b5019a146101f157600080fd5b8063170e2b8a1461008b5780632d62fc1a146100d057806330e7a49b146100e55780638e0f64d314610131575b600080fd5b34801561009757600080fd5b506100bb6100a6366004610da6565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6100e36100de366004610e18565b610207565b005b3480156100f157600080fd5b506101197f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c7565b34801561013d57600080fd5b506101197f000000000000000000000000000000000000000000000000000000000000000081565b6100e3610173366004610eef565b610366565b34801561018457600080fd5b506100e3610193366004610dfe565b610533565b3480156101a457600080fd5b506101197f000000000000000000000000000000000000000000000000000000000000000081565b3480156101d857600080fd5b506101e3620186a081565b6040519081526020016100c7565b3480156101fd57600080fd5b506101e360001981565b6002600054141561025f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260009081556102718a898461056b565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639fbf10fc348d8d8d33878f6102b39190611174565b8e8e8e8e6040518b63ffffffff1660e01b81526004016102db9998979695949392919061104b565b6000604051808303818588803b1580156102f457600080fd5b505af1158015610308573d6000803e3d6000fd5b50506040805186358152602081018690526001600160f01b0319881694507fe005092a469280dafcad91e38921cc6f96eac91d73413489fd8719634163345e935001905060405180910390a250506001600055505050505050505050565b600260005414156103b95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610256565b60026000557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166104345760405162461bcd60e51b815260206004820152601e60248201527f576964676574537761703a2066756e63206e6f7420617661696c61626c6500006044820152606401610256565b60006104408783610751565b90506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016631114cd2a61047b8334611174565b8a338989610489888f611174565b8d6040518863ffffffff1660e01b81526004016104ab96959493929190611007565b6000604051808303818588803b1580156104c457600080fd5b505af11580156104d8573d6000803e3d6000fd5b50506040805186358152602081018690526001600160f01b0319881694507fe005092a469280dafcad91e38921cc6f96eac91d73413489fd8719634163345e935001905060405180910390a250506001600055505050505050565b6040516001600160f01b03198216907f85ce809fd9fd62b920fadc9d3a3a8e642d3969bf635276bfbdde866acce409fc90600090a250565b60405163068bcd8d60e01b815261ffff8416600482015260009081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063068bcd8d90602401602060405180830381600087803b1580156105d557600080fd5b505af11580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d9190610dc2565b6001600160a01b031663fc0c546a6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561064757600080fd5b505af115801561065b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067f9190610dc2565b90506106966001600160a01b0382163330876108fc565b620186a06106a5843586611155565b6106af9190611135565b91506106d56106c46040850160208601610da6565b6001600160a01b038316908461096d565b6001600160a01b03811660009081526001602052604090205460ff16610748576001600160a01b0381166000818152600160208190526040909120805460ff19169091179055610748907f00000000000000000000000000000000000000000000000000000000000000006000196109a2565b505b9392505050565b6000620186a0610762833585611155565b61076c9190611135565b90508034116107ce5760405162461bcd60e51b815260206004820152602860248201527f576964676574537761703a206e6f7420656e6f7567682065746820666f722077604482015267696467657446656560c01b6064820152608401610256565b826107d98234611174565b116108325760405162461bcd60e51b815260206004820152602360248201527f576964676574537761703a206e6f7420656e6f7567682065746820666f72207360448201526207761760ec1b6064820152608401610256565b60006108446040840160208501610da6565b6001600160a01b03168260405160006040518083038185875af1925050503d806000811461088e576040519150601f19603f3d011682016040523d82523d6000602084013e610893565b606091505b50509050806108f55760405162461bcd60e51b815260206004820152602860248201527f576964676574537761703a206661696c656420746f207472616e736665722077604482015267696467657446656560c01b6064820152608401610256565b5092915050565b6040516001600160a01b03808516602483015283166044820152606481018290526109679085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610ac6565b50505050565b6040516001600160a01b03831660248201526044810182905261099d90849063a9059cbb60e01b90606401610930565b505050565b801580610a2b5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b1580156109f157600080fd5b505afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610f77565b155b610a965760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610256565b6040516001600160a01b03831660248201526044810182905261099d90849063095ea7b360e01b90606401610930565b6000610b1b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610b989092919063ffffffff16565b80519091501561099d5780806020019051810190610b399190610dde565b61099d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610256565b6060610ba78484600085610baf565b949350505050565b606082471015610c105760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610256565b6001600160a01b0385163b610c675760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610256565b600080866001600160a01b03168587604051610c839190610fb8565b60006040518083038185875af1925050503d8060008114610cc0576040519150601f19603f3d011682016040523d82523d6000602084013e610cc5565b606091505b5091509150610cd5828286610ce0565b979650505050505050565b60608315610cef57508161074a565b825115610cff5782518084602001fd5b8160405162461bcd60e51b81526004016102569190610fd4565b80356001600160f01b031981168114610d3157600080fd5b919050565b60008083601f840112610d47578182fd5b50813567ffffffffffffffff811115610d5e578182fd5b602083019150836020828501011115610d7657600080fd5b9250929050565b600060408284031215610d8e578081fd5b50919050565b803561ffff81168114610d3157600080fd5b600060208284031215610db7578081fd5b813561074a816111cd565b600060208284031215610dd3578081fd5b815161074a816111cd565b600060208284031215610def578081fd5b8151801515811461074a578182fd5b600060208284031215610e0f578081fd5b61074a82610d19565b6000806000806000806000806000806101408b8d031215610e37578586fd5b610e408b610d94565b9950610e4e60208c01610d94565b9850610e5c60408c01610d94565b975060608b0135965060808b0135955060a08b013567ffffffffffffffff80821115610e86578687fd5b908c01906060828f031215610e99578687fd5b90955060c08c01359080821115610eae578586fd5b50610ebb8d828e01610d36565b9095509350610ece905060e08c01610d19565b9150610ede8c6101008d01610d7d565b90509295989b9194979a5092959850565b600080600080600080600060e0888a031215610f09578283fd5b610f1288610d94565b96506020880135955060408801359450606088013567ffffffffffffffff811115610f3b578384fd5b610f478a828b01610d36565b9095509350610f5a905060808901610d19565b9150610f698960a08a01610d7d565b905092959891949750929550565b600060208284031215610f88578081fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008251610fca81846020870161118b565b9190910192915050565b6020815260008251806020840152610ff381604085016020870161118b565b601f01601f19169190910160400192915050565b61ffff871681526001600160a01b038616602082015260a0604082018190526000906110369083018688610f8f565b60608301949094525060800152949350505050565b600061012061ffff808d168452808c166020850152808b1660408501525060018060a01b03891660608401528760808401528660a08401528060c08401528535818401525060208501356101408301526040850135601e198636030181126110b1578182fd5b8501803567ffffffffffffffff8111156110c9578283fd5b8036038713156110d7578283fd5b60606101608501526110f161018085018260208501610f8f565b91505082810360e0840152611107818587610f8f565b8381036101008501526002815261060f60f31b60208201529050604081019c9b505050505050505050505050565b60008261115057634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561116f5761116f6111b7565b500290565b600082821015611186576111866111b7565b500390565b60005b838110156111a657818101518382015260200161118e565b838111156109675750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146111e257600080fd5b5056fea26469706673582212203acad853379e63732d2174b989d0355fca835152338c3e7b582dcb6297b5f03f64736f6c6343000804003300000000000000000000000045a01e4e04f14f7a4a6702c74187c5f6222033cd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000808d7c71ad2ba3fa531b068a2417c63106bc0949

Deployed Bytecode

0x6080604052600436106100865760003560e01c8063919d763711610059578063919d763714610165578063a87376e914610178578063a9e56f3c14610198578063beaeb55a146101cc578063e5b5019a146101f157600080fd5b8063170e2b8a1461008b5780632d62fc1a146100d057806330e7a49b146100e55780638e0f64d314610131575b600080fd5b34801561009757600080fd5b506100bb6100a6366004610da6565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6100e36100de366004610e18565b610207565b005b3480156100f157600080fd5b506101197f000000000000000000000000808d7c71ad2ba3fa531b068a2417c63106bc094981565b6040516001600160a01b0390911681526020016100c7565b34801561013d57600080fd5b506101197f000000000000000000000000000000000000000000000000000000000000000081565b6100e3610173366004610eef565b610366565b34801561018457600080fd5b506100e3610193366004610dfe565b610533565b3480156101a457600080fd5b506101197f00000000000000000000000045a01e4e04f14f7a4a6702c74187c5f6222033cd81565b3480156101d857600080fd5b506101e3620186a081565b6040519081526020016100c7565b3480156101fd57600080fd5b506101e360001981565b6002600054141561025f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260009081556102718a898461056b565b90507f00000000000000000000000045a01e4e04f14f7a4a6702c74187c5f6222033cd6001600160a01b0316639fbf10fc348d8d8d33878f6102b39190611174565b8e8e8e8e6040518b63ffffffff1660e01b81526004016102db9998979695949392919061104b565b6000604051808303818588803b1580156102f457600080fd5b505af1158015610308573d6000803e3d6000fd5b50506040805186358152602081018690526001600160f01b0319881694507fe005092a469280dafcad91e38921cc6f96eac91d73413489fd8719634163345e935001905060405180910390a250506001600055505050505050505050565b600260005414156103b95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610256565b60026000557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166104345760405162461bcd60e51b815260206004820152601e60248201527f576964676574537761703a2066756e63206e6f7420617661696c61626c6500006044820152606401610256565b60006104408783610751565b90506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016631114cd2a61047b8334611174565b8a338989610489888f611174565b8d6040518863ffffffff1660e01b81526004016104ab96959493929190611007565b6000604051808303818588803b1580156104c457600080fd5b505af11580156104d8573d6000803e3d6000fd5b50506040805186358152602081018690526001600160f01b0319881694507fe005092a469280dafcad91e38921cc6f96eac91d73413489fd8719634163345e935001905060405180910390a250506001600055505050505050565b6040516001600160f01b03198216907f85ce809fd9fd62b920fadc9d3a3a8e642d3969bf635276bfbdde866acce409fc90600090a250565b60405163068bcd8d60e01b815261ffff8416600482015260009081906001600160a01b037f000000000000000000000000808d7c71ad2ba3fa531b068a2417c63106bc0949169063068bcd8d90602401602060405180830381600087803b1580156105d557600080fd5b505af11580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d9190610dc2565b6001600160a01b031663fc0c546a6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561064757600080fd5b505af115801561065b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067f9190610dc2565b90506106966001600160a01b0382163330876108fc565b620186a06106a5843586611155565b6106af9190611135565b91506106d56106c46040850160208601610da6565b6001600160a01b038316908461096d565b6001600160a01b03811660009081526001602052604090205460ff16610748576001600160a01b0381166000818152600160208190526040909120805460ff19169091179055610748907f00000000000000000000000045a01e4e04f14f7a4a6702c74187c5f6222033cd6000196109a2565b505b9392505050565b6000620186a0610762833585611155565b61076c9190611135565b90508034116107ce5760405162461bcd60e51b815260206004820152602860248201527f576964676574537761703a206e6f7420656e6f7567682065746820666f722077604482015267696467657446656560c01b6064820152608401610256565b826107d98234611174565b116108325760405162461bcd60e51b815260206004820152602360248201527f576964676574537761703a206e6f7420656e6f7567682065746820666f72207360448201526207761760ec1b6064820152608401610256565b60006108446040840160208501610da6565b6001600160a01b03168260405160006040518083038185875af1925050503d806000811461088e576040519150601f19603f3d011682016040523d82523d6000602084013e610893565b606091505b50509050806108f55760405162461bcd60e51b815260206004820152602860248201527f576964676574537761703a206661696c656420746f207472616e736665722077604482015267696467657446656560c01b6064820152608401610256565b5092915050565b6040516001600160a01b03808516602483015283166044820152606481018290526109679085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610ac6565b50505050565b6040516001600160a01b03831660248201526044810182905261099d90849063a9059cbb60e01b90606401610930565b505050565b801580610a2b5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b1580156109f157600080fd5b505afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610f77565b155b610a965760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610256565b6040516001600160a01b03831660248201526044810182905261099d90849063095ea7b360e01b90606401610930565b6000610b1b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610b989092919063ffffffff16565b80519091501561099d5780806020019051810190610b399190610dde565b61099d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610256565b6060610ba78484600085610baf565b949350505050565b606082471015610c105760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610256565b6001600160a01b0385163b610c675760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610256565b600080866001600160a01b03168587604051610c839190610fb8565b60006040518083038185875af1925050503d8060008114610cc0576040519150601f19603f3d011682016040523d82523d6000602084013e610cc5565b606091505b5091509150610cd5828286610ce0565b979650505050505050565b60608315610cef57508161074a565b825115610cff5782518084602001fd5b8160405162461bcd60e51b81526004016102569190610fd4565b80356001600160f01b031981168114610d3157600080fd5b919050565b60008083601f840112610d47578182fd5b50813567ffffffffffffffff811115610d5e578182fd5b602083019150836020828501011115610d7657600080fd5b9250929050565b600060408284031215610d8e578081fd5b50919050565b803561ffff81168114610d3157600080fd5b600060208284031215610db7578081fd5b813561074a816111cd565b600060208284031215610dd3578081fd5b815161074a816111cd565b600060208284031215610def578081fd5b8151801515811461074a578182fd5b600060208284031215610e0f578081fd5b61074a82610d19565b6000806000806000806000806000806101408b8d031215610e37578586fd5b610e408b610d94565b9950610e4e60208c01610d94565b9850610e5c60408c01610d94565b975060608b0135965060808b0135955060a08b013567ffffffffffffffff80821115610e86578687fd5b908c01906060828f031215610e99578687fd5b90955060c08c01359080821115610eae578586fd5b50610ebb8d828e01610d36565b9095509350610ece905060e08c01610d19565b9150610ede8c6101008d01610d7d565b90509295989b9194979a5092959850565b600080600080600080600060e0888a031215610f09578283fd5b610f1288610d94565b96506020880135955060408801359450606088013567ffffffffffffffff811115610f3b578384fd5b610f478a828b01610d36565b9095509350610f5a905060808901610d19565b9150610f698960a08a01610d7d565b905092959891949750929550565b600060208284031215610f88578081fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008251610fca81846020870161118b565b9190910192915050565b6020815260008251806020840152610ff381604085016020870161118b565b601f01601f19169190910160400192915050565b61ffff871681526001600160a01b038616602082015260a0604082018190526000906110369083018688610f8f565b60608301949094525060800152949350505050565b600061012061ffff808d168452808c166020850152808b1660408501525060018060a01b03891660608401528760808401528660a08401528060c08401528535818401525060208501356101408301526040850135601e198636030181126110b1578182fd5b8501803567ffffffffffffffff8111156110c9578283fd5b8036038713156110d7578283fd5b60606101608501526110f161018085018260208501610f8f565b91505082810360e0840152611107818587610f8f565b8381036101008501526002815261060f60f31b60208201529050604081019c9b505050505050505050505050565b60008261115057634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561116f5761116f6111b7565b500290565b600082821015611186576111866111b7565b500390565b60005b838110156111a657818101518382015260200161118e565b838111156109675750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146111e257600080fd5b5056fea26469706673582212203acad853379e63732d2174b989d0355fca835152338c3e7b582dcb6297b5f03f64736f6c63430008040033

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

00000000000000000000000045a01e4e04f14f7a4a6702c74187c5f6222033cd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000808d7c71ad2ba3fa531b068a2417c63106bc0949

-----Decoded View---------------
Arg [0] : _stargateRouter (address): 0x45A01E4e04F14f7A4a6702c74187c5F6222033cd
Arg [1] : _stargateRouterETH (address): 0x0000000000000000000000000000000000000000
Arg [2] : _stargateFactory (address): 0x808d7c71ad2ba3FA531b068a2417C63106BC0949

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000045a01e4e04f14f7a4a6702c74187c5f6222033cd
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 000000000000000000000000808d7c71ad2ba3fa531b068a2417c63106bc0949


Block Transaction Gas Used Reward
view all blocks ##produced##

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.