Contract 0x548eadb11979d0bf6fbfbec6a0cb3a672fda31b6 9

Contract Overview

Balance:
0 ETH

Token:
Txn Hash Method
Block
From
To
Value
0xd3d1cf8971aad8cd1899c5d9475a635b166dc6f86481112ed0d22f1c2c6b32730x60a0604018712562023-03-16 3:08:48259 days 2 hrs ago0xf52bd269116448745a7e13c3d2f299973cf671ab IN  Create: AxelarGasService0 ETH0.0025897622861.500000049
[ Download CSV Export 
Latest 2 internal transactions
Parent Txn Hash Block From To Value
0x68e3aff9561917a6afbc41bd088a5bfe726cc7239e812c49fd15a7b0a021ebe318712682023-03-16 3:09:12259 days 2 hrs ago 0x3216e618a7d0dc40b3eacdadfc4d1d4f4c236081 0x548eadb11979d0bf6fbfbec6a0cb3a672fda31b60 ETH
0x68e3aff9561917a6afbc41bd088a5bfe726cc7239e812c49fd15a7b0a021ebe318712682023-03-16 3:09:12259 days 2 hrs ago 0x3216e618a7d0dc40b3eacdadfc4d1d4f4c236081 0x548eadb11979d0bf6fbfbec6a0cb3a672fda31b60 ETH
[ Download CSV Export 
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
AxelarGasService

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 1000 runs

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

pragma solidity 0.8.9;

import { IAxelarGasService } from '../interfaces/IAxelarGasService.sol';
import { IERC20 } from '../interfaces/IERC20.sol';
import '../util/Upgradable.sol';

// This should be owned by the microservice that is paying for gas.
contract AxelarGasService is Upgradable, IAxelarGasService {
    address public immutable gasCollector;

    constructor(address gasCollector_) {
        gasCollector = gasCollector_;
    }

    modifier onlyCollector() {
        if (msg.sender != gasCollector) revert NotCollector();

        _;
    }

    // This is called on the source chain before calling the gateway to execute a remote contract.
    function payGasForContractCall(
        address sender,
        string calldata destinationChain,
        string calldata destinationAddress,
        bytes calldata payload,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    ) external override {
        _safeTransferFrom(gasToken, msg.sender, gasFeeAmount);

        emit GasPaidForContractCall(
            sender,
            destinationChain,
            destinationAddress,
            keccak256(payload),
            gasToken,
            gasFeeAmount,
            refundAddress
        );
    }

    // This is called on the source chain before calling the gateway to execute a remote contract.
    function payGasForContractCallWithToken(
        address sender,
        string calldata destinationChain,
        string calldata destinationAddress,
        bytes calldata payload,
        string memory symbol,
        uint256 amount,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    ) external override {
        _safeTransferFrom(gasToken, msg.sender, gasFeeAmount);

        emit GasPaidForContractCallWithToken(
            sender,
            destinationChain,
            destinationAddress,
            keccak256(payload),
            symbol,
            amount,
            gasToken,
            gasFeeAmount,
            refundAddress
        );
    }

    // This is called on the source chain before calling the gateway to execute a remote contract.
    function payNativeGasForContractCall(
        address sender,
        string calldata destinationChain,
        string calldata destinationAddress,
        bytes calldata payload,
        address refundAddress
    ) external payable override {
        if (msg.value == 0) revert NothingReceived();

        emit NativeGasPaidForContractCall(sender, destinationChain, destinationAddress, keccak256(payload), msg.value, refundAddress);
    }

    // This is called on the source chain before calling the gateway to execute a remote contract.
    function payNativeGasForContractCallWithToken(
        address sender,
        string calldata destinationChain,
        string calldata destinationAddress,
        bytes calldata payload,
        string calldata symbol,
        uint256 amount,
        address refundAddress
    ) external payable override {
        if (msg.value == 0) revert NothingReceived();

        emit NativeGasPaidForContractCallWithToken(
            sender,
            destinationChain,
            destinationAddress,
            keccak256(payload),
            symbol,
            amount,
            msg.value,
            refundAddress
        );
    }

    function addGas(
        bytes32 txHash,
        uint256 logIndex,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    ) external override {
        _safeTransferFrom(gasToken, msg.sender, gasFeeAmount);

        emit GasAdded(txHash, logIndex, gasToken, gasFeeAmount, refundAddress);
    }

    function addNativeGas(
        bytes32 txHash,
        uint256 logIndex,
        address refundAddress
    ) external payable override {
        if (msg.value == 0) revert NothingReceived();

        emit NativeGasAdded(txHash, logIndex, msg.value, refundAddress);
    }

    function collectFees(
        address payable receiver,
        address[] calldata tokens,
        uint256[] calldata amounts
    ) external onlyCollector {
        // if (receiver == address(0)) revert InvalidAddress();

        uint256 tokensLength = tokens.length;
        if (tokensLength != amounts.length) revert InvalidAmounts();

        for (uint256 i; i < tokensLength; i++) {
            address token = tokens[i];
            uint256 amount = amounts[i];
            if (amount == 0) revert InvalidAmounts();

            if (token == address(0)) {
                if (amount <= address(this).balance) receiver.transfer(amount);
            } else {
                if (amount <= IERC20(token).balanceOf(address(this))) _safeTransfer(token, receiver, amount);
            }
        }
    }

    function refund(
        address payable receiver,
        address token,
        uint256 amount
    ) external onlyCollector {
        if (receiver == address(0)) revert InvalidAddress();

        if (token == address(0)) {
            receiver.transfer(amount);
        } else {
            _safeTransfer(token, receiver, amount);
        }
    }

    function _safeTransfer(
        address tokenAddress,
        address receiver,
        uint256 amount
    ) internal {
        if (amount == 0) revert NothingReceived();

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returnData) = tokenAddress.call(abi.encodeWithSelector(IERC20.transfer.selector, receiver, amount));
        bool transferred = success && (returnData.length == uint256(0) || abi.decode(returnData, (bool)));

        if (!transferred || tokenAddress.code.length == 0) revert TransferFailed();
    }

    function _safeTransferFrom(
        address tokenAddress,
        address from,
        uint256 amount
    ) internal {
        if (amount == 0) revert NothingReceived();

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returnData) = tokenAddress.call(
            abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), amount)
        );
        bool transferred = success && (returnData.length == uint256(0) || abi.decode(returnData, (bool)));

        if (!transferred || tokenAddress.code.length == 0) revert TransferFailed();
    }

    function contractId() external pure returns (bytes32) {
        return keccak256('axelar-gas-service');
    }
}

File 2 of 5 : IAxelarGasService.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

import './IUpgradable.sol';

// This should be owned by the microservice that is paying for gas.
interface IAxelarGasService is IUpgradable {
    error NothingReceived();
    error TransferFailed();
    error InvalidAddress();
    error NotCollector();
    error InvalidAmounts();

    event GasPaidForContractCall(
        address indexed sourceAddress,
        string destinationChain,
        string destinationAddress,
        bytes32 indexed payloadHash,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    );

    event GasPaidForContractCallWithToken(
        address indexed sourceAddress,
        string destinationChain,
        string destinationAddress,
        bytes32 indexed payloadHash,
        string symbol,
        uint256 amount,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    );

    event NativeGasPaidForContractCall(
        address indexed sourceAddress,
        string destinationChain,
        string destinationAddress,
        bytes32 indexed payloadHash,
        uint256 gasFeeAmount,
        address refundAddress
    );

    event NativeGasPaidForContractCallWithToken(
        address indexed sourceAddress,
        string destinationChain,
        string destinationAddress,
        bytes32 indexed payloadHash,
        string symbol,
        uint256 amount,
        uint256 gasFeeAmount,
        address refundAddress
    );

    event GasAdded(bytes32 indexed txHash, uint256 indexed logIndex, address gasToken, uint256 gasFeeAmount, address refundAddress);

    event NativeGasAdded(bytes32 indexed txHash, uint256 indexed logIndex, uint256 gasFeeAmount, address refundAddress);

    // This is called on the source chain before calling the gateway to execute a remote contract.
    function payGasForContractCall(
        address sender,
        string calldata destinationChain,
        string calldata destinationAddress,
        bytes calldata payload,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    ) external;

    // This is called on the source chain before calling the gateway to execute a remote contract.
    function payGasForContractCallWithToken(
        address sender,
        string calldata destinationChain,
        string calldata destinationAddress,
        bytes calldata payload,
        string calldata symbol,
        uint256 amount,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    ) external;

    // This is called on the source chain before calling the gateway to execute a remote contract.
    function payNativeGasForContractCall(
        address sender,
        string calldata destinationChain,
        string calldata destinationAddress,
        bytes calldata payload,
        address refundAddress
    ) external payable;

    // This is called on the source chain before calling the gateway to execute a remote contract.
    function payNativeGasForContractCallWithToken(
        address sender,
        string calldata destinationChain,
        string calldata destinationAddress,
        bytes calldata payload,
        string calldata symbol,
        uint256 amount,
        address refundAddress
    ) external payable;

    function addGas(
        bytes32 txHash,
        uint256 txIndex,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    ) external;

    function addNativeGas(
        bytes32 txHash,
        uint256 logIndex,
        address refundAddress
    ) external payable;

    function collectFees(
        address payable receiver,
        address[] calldata tokens,
        uint256[] calldata amounts
    ) external;

    function refund(
        address payable receiver,
        address token,
        uint256 amount
    ) external;

    function gasCollector() external returns (address);
}

File 3 of 5 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    error InvalidAccount();

    /**
     * @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 4 of 5 : Upgradable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import '../interfaces/IUpgradable.sol';

abstract contract Upgradable is IUpgradable {
    // bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)
    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
    // keccak256('owner')
    bytes32 internal constant _OWNER_SLOT = 0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0;

    modifier onlyOwner() {
        if (owner() != msg.sender) revert NotOwner();
        _;
    }

    function owner() public view returns (address owner_) {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            owner_ := sload(_OWNER_SLOT)
        }
    }

    function transferOwnership(address newOwner) external virtual onlyOwner {
        if (newOwner == address(0)) revert InvalidOwner();

        emit OwnershipTransferred(newOwner);
        // solhint-disable-next-line no-inline-assembly
        assembly {
            sstore(_OWNER_SLOT, newOwner)
        }
    }

    function implementation() public view returns (address implementation_) {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            implementation_ := sload(_IMPLEMENTATION_SLOT)
        }
    }

    function upgrade(
        address newImplementation,
        bytes32 newImplementationCodeHash,
        bytes calldata params
    ) external override onlyOwner {
        if (IUpgradable(newImplementation).contractId() != IUpgradable(this).contractId()) revert InvalidImplementation();
        if (newImplementationCodeHash != newImplementation.codehash) revert InvalidCodeHash();

        if (params.length > 0) {
            // solhint-disable-next-line avoid-low-level-calls
            (bool success, ) = newImplementation.delegatecall(abi.encodeWithSelector(this.setup.selector, params));

            if (!success) revert SetupFailed();
        }

        emit Upgraded(newImplementation);
        // solhint-disable-next-line no-inline-assembly
        assembly {
            sstore(_IMPLEMENTATION_SLOT, newImplementation)
        }
    }

    function setup(bytes calldata data) external override {
        // Prevent setup from being called on the implementation
        if (implementation() == address(0)) revert NotProxy();

        _setup(data);
    }

    // solhint-disable-next-line no-empty-blocks
    function _setup(bytes calldata data) internal virtual {}
}

File 5 of 5 : IUpgradable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

// General interface for upgradable contracts
interface IUpgradable {
    error NotOwner();
    error InvalidOwner();
    error InvalidCodeHash();
    error InvalidImplementation();
    error SetupFailed();
    error NotProxy();

    event Upgraded(address indexed newImplementation);
    event OwnershipTransferred(address indexed newOwner);

    // Get current owner
    function owner() external view returns (address);

    function contractId() external pure returns (bytes32);

    function implementation() external view returns (address);

    function upgrade(
        address newImplementation,
        bytes32 newImplementationCodeHash,
        bytes calldata params
    ) external;

    function setup(bytes calldata data) external;
}

Settings
{
  "evmVersion": "london",
  "optimizer": {
    "enabled": true,
    "runs": 1000,
    "details": {
      "peephole": true,
      "inliner": true,
      "jumpdestRemover": true,
      "orderLiterals": true,
      "deduplicate": true,
      "cse": true,
      "constantOptimizer": true,
      "yul": true,
      "yulDetails": {
        "stackAllocation": true
      }
    }
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"gasCollector_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidAmounts","type":"error"},{"inputs":[],"name":"InvalidCodeHash","type":"error"},{"inputs":[],"name":"InvalidImplementation","type":"error"},{"inputs":[],"name":"InvalidOwner","type":"error"},{"inputs":[],"name":"NotCollector","type":"error"},{"inputs":[],"name":"NotOwner","type":"error"},{"inputs":[],"name":"NotProxy","type":"error"},{"inputs":[],"name":"NothingReceived","type":"error"},{"inputs":[],"name":"SetupFailed","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"txHash","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"logIndex","type":"uint256"},{"indexed":false,"internalType":"address","name":"gasToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"gasFeeAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"refundAddress","type":"address"}],"name":"GasAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sourceAddress","type":"address"},{"indexed":false,"internalType":"string","name":"destinationChain","type":"string"},{"indexed":false,"internalType":"string","name":"destinationAddress","type":"string"},{"indexed":true,"internalType":"bytes32","name":"payloadHash","type":"bytes32"},{"indexed":false,"internalType":"address","name":"gasToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"gasFeeAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"refundAddress","type":"address"}],"name":"GasPaidForContractCall","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sourceAddress","type":"address"},{"indexed":false,"internalType":"string","name":"destinationChain","type":"string"},{"indexed":false,"internalType":"string","name":"destinationAddress","type":"string"},{"indexed":true,"internalType":"bytes32","name":"payloadHash","type":"bytes32"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"gasToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"gasFeeAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"refundAddress","type":"address"}],"name":"GasPaidForContractCallWithToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"txHash","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"logIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gasFeeAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"refundAddress","type":"address"}],"name":"NativeGasAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sourceAddress","type":"address"},{"indexed":false,"internalType":"string","name":"destinationChain","type":"string"},{"indexed":false,"internalType":"string","name":"destinationAddress","type":"string"},{"indexed":true,"internalType":"bytes32","name":"payloadHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"gasFeeAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"refundAddress","type":"address"}],"name":"NativeGasPaidForContractCall","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sourceAddress","type":"address"},{"indexed":false,"internalType":"string","name":"destinationChain","type":"string"},{"indexed":false,"internalType":"string","name":"destinationAddress","type":"string"},{"indexed":true,"internalType":"bytes32","name":"payloadHash","type":"bytes32"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gasFeeAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"refundAddress","type":"address"}],"name":"NativeGasPaidForContractCallWithToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newImplementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[{"internalType":"bytes32","name":"txHash","type":"bytes32"},{"internalType":"uint256","name":"logIndex","type":"uint256"},{"internalType":"address","name":"gasToken","type":"address"},{"internalType":"uint256","name":"gasFeeAmount","type":"uint256"},{"internalType":"address","name":"refundAddress","type":"address"}],"name":"addGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"txHash","type":"bytes32"},{"internalType":"uint256","name":"logIndex","type":"uint256"},{"internalType":"address","name":"refundAddress","type":"address"}],"name":"addNativeGas","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"collectFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"gasCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"implementation_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"string","name":"destinationChain","type":"string"},{"internalType":"string","name":"destinationAddress","type":"string"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"address","name":"gasToken","type":"address"},{"internalType":"uint256","name":"gasFeeAmount","type":"uint256"},{"internalType":"address","name":"refundAddress","type":"address"}],"name":"payGasForContractCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"string","name":"destinationChain","type":"string"},{"internalType":"string","name":"destinationAddress","type":"string"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"gasToken","type":"address"},{"internalType":"uint256","name":"gasFeeAmount","type":"uint256"},{"internalType":"address","name":"refundAddress","type":"address"}],"name":"payGasForContractCallWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"string","name":"destinationChain","type":"string"},{"internalType":"string","name":"destinationAddress","type":"string"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"address","name":"refundAddress","type":"address"}],"name":"payNativeGasForContractCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"string","name":"destinationChain","type":"string"},{"internalType":"string","name":"destinationAddress","type":"string"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"refundAddress","type":"address"}],"name":"payNativeGasForContractCallWithToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes32","name":"newImplementationCodeHash","type":"bytes32"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405234801561001057600080fd5b506040516119d13803806119d183398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051611938610099600039600081816101dc015281816103ae015261059d01526119386000f3fe6080604052600436106100e85760003560e01c80639ded06df1161008a578063cd433ada11610059578063cd433ada146102a5578063edb6b3a5146102b8578063f2fde38b146102d8578063fd09e3bd146102f857600080fd5b80639ded06df14610232578063a3499c7314610252578063ab1999ba14610272578063c62c20021461029257600080fd5b80638291286c116100c65780638291286c1461016f57806382ad6f35146101aa578063892b5007146101ca5780638da5cb5b146101fe57600080fd5b80630c93e3bb146100ed5780631055eaaf146101025780635c60da1b14610122575b600080fd5b6101006100fb366004610fb7565b610318565b005b34801561010e57600080fd5b5061010061011d3660046110bc565b6103a3565b34801561012e57600080fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017b57600080fd5b506040517ffaa2f015f2ce5aee225904728de2def86eb8837491efd21f1a04fc20d8e923f68152602001610166565b3480156101b657600080fd5b506101006101c536600461113f565b610592565b3480156101d657600080fd5b506101527f000000000000000000000000000000000000000000000000000000000000000081565b34801561020a57600080fd5b507f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c054610152565b34801561023e57600080fd5b5061010061024d366004611180565b610674565b34801561025e57600080fd5b5061010061026d3660046111c2565b6106e3565b34801561027e57600080fd5b5061010061028d36600461121e565b6109ff565b6101006102a0366004611274565b610a5f565b6101006102b3366004611367565b610af3565b3480156102c457600080fd5b506101006102d3366004611443565b610b5b565b3480156102e457600080fd5b506101006102f3366004611561565b610bdd565b34801561030457600080fd5b50610100610313366004611585565b610cc5565b346103365760405163b5c74a2760e01b815260040160405180910390fd5b828260405161034692919061165d565b6040518091039020886001600160a01b03167f617332c1832058df6ee45fcbdf471251474c9945a8e5d229287a21a5f67ccf0a89898989348860405161039196959493929190611696565b60405180910390a35050505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103eb57604051623bb10360e91b815260040160405180910390fd5b8281811461040c57604051636c2b7e2d60e11b815260040160405180910390fd5b60005b8181101561058957600086868381811061042b5761042b6116e0565b90506020020160208101906104409190611561565b90506000858584818110610456576104566116e0565b905060200201359050806000141561048157604051636c2b7e2d60e11b815260040160405180910390fd5b6001600160a01b0382166104d3574781116104ce576040516001600160a01b038a169082156108fc029083906000818181858888f193505050501580156104cc573d6000803e3d6000fd5b505b610574565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038316906370a082319060240160206040518083038186803b15801561052b57600080fd5b505afa15801561053f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056391906116f6565b811161057457610574828a83610d41565b505080806105819061170f565b91505061040f565b50505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105da57604051623bb10360e91b815260040160405180910390fd5b6001600160a01b03831661061a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038216610664576040516001600160a01b0384169082156108fc029083906000818181858888f1935050505015801561065e573d6000803e3d6000fd5b50505050565b61066f828483610d41565b505050565b600061069e7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6001600160a01b031614156106df576040517fbf10dd3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b3361070c7f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05490565b6001600160a01b031614610733576040516330cd747160e01b815260040160405180910390fd5b306001600160a01b0316638291286c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561076c57600080fd5b505afa158015610780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a491906116f6565b846001600160a01b0316638291286c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107dd57600080fd5b505afa1580156107f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081591906116f6565b1461084c576040517f68155f9a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836001600160a01b03163f831461088f576040517f8f84fb2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156109a4576000846001600160a01b0316639ded06df60e01b84846040516024016108bc929190611738565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516109279190611780565b600060405180830381855af49150503d8060008114610962576040519150601f19603f3d011682016040523d82523d6000602084013e610967565b606091505b50509050806109a2576040517f97905dfb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b6040516001600160a01b038516907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a25050507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b610a0a833384610ed6565b604080516001600160a01b038581168252602082018590528316818301529051859187917f2275e75614080f9782f72563c2c1688c901c5339c7f9f436d323f9386fed700a9181900360600190a35050505050565b34610a7d5760405163b5c74a2760e01b815260040160405180910390fd5b8585604051610a8d92919061165d565b60405180910390208b6001600160a01b03167f999d431b58761213cf53af96262b67a069cbd963499fd8effd1e21556217b8418c8c8c8c8a8a8a348b604051610ade9998979695949392919061179c565b60405180910390a35050505050505050505050565b34610b115760405163b5c74a2760e01b815260040160405180910390fd5b604080513481526001600160a01b0383166020820152839185917ffeb6b00343feee0f29a1a4345f8bf93ca1c73ee922248a4237a4e50d6447604e910160405180910390a3505050565b610b66833384610ed6565b8686604051610b7692919061165d565b60405180910390208c6001600160a01b03167f8875f9764f28fa82d3e7ff1b80bd5c8f665e1f42fcd8c2faebc7c400a4ba1bbd8d8d8d8d8b8b8b8b8b604051610bc799989796959493929190611803565b60405180910390a3505050505050505050505050565b33610c067f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05490565b6001600160a01b031614610c2d576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b038116610c6d576040517f49e27cff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040516001600160a01b038216907f04dba622d284ed0014ee4b9a6a68386be1a4c08a4913ae272de89199cc68616390600090a27f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c055565b610cd0833384610ed6565b8484604051610ce092919061165d565b60405180910390208a6001600160a01b03167f99206760f0be19dd093729bd35e5924daff5e217bcedc5223ed067b60008cf8a8b8b8b8b898989604051610d2d979695949392919061188c565b60405180910390a350505050505050505050565b80610d5f5760405163b5c74a2760e01b815260040160405180910390fd5b6040516001600160a01b0383811660248301526044820183905260009182918616907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051610e129190611780565b6000604051808303816000865af19150503d8060008114610e4f576040519150601f19603f3d011682016040523d82523d6000602084013e610e54565b606091505b50915091506000828015610e80575081511580610e80575081806020019051810190610e8091906118e0565b9050801580610e9757506001600160a01b0386163b155b15610ece576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b80610ef45760405163b5c74a2760e01b815260040160405180910390fd5b6040516001600160a01b0383811660248301523060448301526064820183905260009182918616907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610da7565b6001600160a01b0381168114610f5b57600080fd5b50565b8035610f6981610f46565b919050565b60008083601f840112610f8057600080fd5b50813567ffffffffffffffff811115610f9857600080fd5b602083019150836020828501011115610fb057600080fd5b9250929050565b60008060008060008060008060a0898b031215610fd357600080fd5b8835610fde81610f46565b9750602089013567ffffffffffffffff80821115610ffb57600080fd5b6110078c838d01610f6e565b909950975060408b013591508082111561102057600080fd5b61102c8c838d01610f6e565b909750955060608b013591508082111561104557600080fd5b506110528b828c01610f6e565b909450925050608089013561106681610f46565b809150509295985092959890939650565b60008083601f84011261108957600080fd5b50813567ffffffffffffffff8111156110a157600080fd5b6020830191508360208260051b8501011115610fb057600080fd5b6000806000806000606086880312156110d457600080fd5b85356110df81610f46565b9450602086013567ffffffffffffffff808211156110fc57600080fd5b61110889838a01611077565b9096509450604088013591508082111561112157600080fd5b5061112e88828901611077565b969995985093965092949392505050565b60008060006060848603121561115457600080fd5b833561115f81610f46565b9250602084013561116f81610f46565b929592945050506040919091013590565b6000806020838503121561119357600080fd5b823567ffffffffffffffff8111156111aa57600080fd5b6111b685828601610f6e565b90969095509350505050565b600080600080606085870312156111d857600080fd5b84356111e381610f46565b935060208501359250604085013567ffffffffffffffff81111561120657600080fd5b61121287828801610f6e565b95989497509550505050565b600080600080600060a0868803121561123657600080fd5b8535945060208601359350604086013561124f81610f46565b925060608601359150608086013561126681610f46565b809150509295509295909350565b600080600080600080600080600080600060e08c8e03121561129557600080fd5b61129e8c610f5e565b9a5067ffffffffffffffff8060208e013511156112ba57600080fd5b6112ca8e60208f01358f01610f6e565b909b50995060408d01358110156112e057600080fd5b6112f08e60408f01358f01610f6e565b909950975060608d013581101561130657600080fd5b6113168e60608f01358f01610f6e565b909750955060808d013581101561132c57600080fd5b5061133d8d60808e01358e01610f6e565b909450925060a08c0135915061135560c08d01610f5e565b90509295989b509295989b9093969950565b60008060006060848603121561137c57600080fd5b8335925060208401359150604084013561139581610f46565b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126113c757600080fd5b813567ffffffffffffffff808211156113e2576113e26113a0565b604051601f8301601f19908116603f0116810190828211818310171561140a5761140a6113a0565b8160405283815286602085880101111561142357600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806000806000806000806000806101208d8f03121561146657600080fd5b61146f8d610f5e565b9b5067ffffffffffffffff60208e0135111561148a57600080fd5b61149a8e60208f01358f01610f6e565b909b50995067ffffffffffffffff60408e013511156114b857600080fd5b6114c88e60408f01358f01610f6e565b909950975067ffffffffffffffff60608e013511156114e657600080fd5b6114f68e60608f01358f01610f6e565b909750955067ffffffffffffffff60808e0135111561151457600080fd5b6115248e60808f01358f016113b6565b945060a08d0135935061153960c08e01610f5e565b925060e08d0135915061154f6101008e01610f5e565b90509295989b509295989b509295989b565b60006020828403121561157357600080fd5b813561157e81610f46565b9392505050565b60008060008060008060008060008060e08b8d0312156115a457600080fd5b8a356115af81610f46565b995060208b013567ffffffffffffffff808211156115cc57600080fd5b6115d88e838f01610f6e565b909b50995060408d01359150808211156115f157600080fd5b6115fd8e838f01610f6e565b909950975060608d013591508082111561161657600080fd5b506116238d828e01610f6e565b90965094505060808b013561163781610f46565b925060a08b0135915061164c60c08c01610f5e565b90509295989b9194979a5092959850565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6080815260006116aa60808301888a61166d565b82810360208401526116bd81878961166d565b9150508360408301526001600160a01b0383166060830152979650505050505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561170857600080fd5b5051919050565b600060001982141561173157634e487b7160e01b600052601160045260246000fd5b5060010190565b60208152600061174c60208301848661166d565b949350505050565b60005b8381101561176f578181015183820152602001611757565b8381111561065e5750506000910152565b60008251611792818460208701611754565b9190910192915050565b60c0815260006117b060c083018b8d61166d565b82810360208401526117c3818a8c61166d565b905082810360408401526117d881888a61166d565b6060840196909652505060808101929092526001600160a01b031660a0909101529695505050505050565b60e08152600061181760e083018b8d61166d565b828103602084015261182a818a8c61166d565b90508281036040840152875180825261184a816020840160208c01611754565b60608401979097526001600160a01b03958616608084015260a083019490945250921660c0909201919091526020601f909201601f1916010195945050505050565b60a0815260006118a060a08301898b61166d565b82810360208401526118b381888a61166d565b6001600160a01b039687166040850152606084019590955250509216608090920191909152949350505050565b6000602082840312156118f257600080fd5b8151801515811461157e57600080fdfea26469706673582212200e4cec32995db80dea141cbf46df376aa8e7ffbb5ba29dc872663d11cfdbad0164736f6c63430008090033000000000000000000000000b8cd93c83a974649d76b1c19f311f639e62272bc

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

000000000000000000000000b8cd93c83a974649d76b1c19f311f639e62272bc

-----Decoded View---------------
Arg [0] : gasCollector_ (address): 0xB8Cd93C83A974649D76B1c19f311f639e62272BC

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000b8cd93c83a974649d76b1c19f311f639e62272bc


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading