Contract 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e 2

Contract Overview

Balance:
0 DEV
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x29d1f0a9479c028a4e599f5a210a18580af923535421053fec260b8a4bc3b391Execute25728332022-07-29 23:23:36186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0013518624
0x69ffc3832c3b999d1c08aa6eff0ae3daf749a79d41ef184f5a61c4de947b9f49Forecall25728312022-07-29 23:23:12186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0000525462
0x94aa28c150121c4249b26aa4d7889aec7e6c110fb05d6b9560d84809f6071531Forecall25728312022-07-29 23:23:12186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0000525462
0x6e1ae5f2f3846e9a6b14c208c98092097620746e8c788bd09f3925f614df4a14Forecall25728312022-07-29 23:23:12186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0000525462
0x3a5fba488b4f28ee7d29e3c133e9df0167670d8560c38631d32326d82fd8948dForecall25728302022-07-29 23:22:54186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0000525462
0x7096f02c369de00ebb7ff8d27b807dc493b1cd8f558b221de87b38c550c4d08cForecall25728302022-07-29 23:22:54186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0000525462
0x1a0d98b1917f84d95db112ba4033952f925069820d218cb0a349c805526fef80Forecall25728302022-07-29 23:22:54186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0000525462
0xfbde4384eda898161466536f7d77a653c0830040cebfd6a383cb261e58fd82bdExecute25727062022-07-29 22:50:30186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0005502735
0xb9f41e123216f96360e40a0ceb446f078e7824f4121e988feb9e0be95bd84838Forecall25727032022-07-29 22:49:36186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0000527646
0x1001d6ea5ddd3bebd9a2d5f66b0c6511e778b904a3f75232405fd28c5c53e0c4Forecall25727032022-07-29 22:49:36186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0000527646
0x199be4b7b42db294bf4cdab683dfb56ce1d02536f1f3d32c8d26ddd96993bb5bForecall25727022022-07-29 22:49:18186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0000527646
0x5c4fd351b9ae258e20a966aa6882739da8c1e33ec89de9dbb620d235d1d60ddfForecall25727022022-07-29 22:49:18186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0000527646
0x896f8ba2b00f6b0a99a38d1f126edfd2f5c2985db289853068f73e0b450d0d0cForecall25727012022-07-29 22:49:06186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0000527646
0x1c8c30eec38953eaf62fe37587c2207c59b8c6a8c65763732ad19bb6585ffd61Forecall25727012022-07-29 22:49:06186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0000527646
0xd70b206686fdc75b1b30b452d1850aa08400a9876f3c3baca6bc893820f26edfForecall25727012022-07-29 22:49:06186 days 23 hrs ago0xd36aac0c9676e984d72823fb662ce94d3ab5e551 IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.0000527646
0x67f3745a24dc36a65a2b10bd1580880d1f038f78c49b4b751a5b0323089c60c1Add Translation25725952022-07-29 22:22:06187 days 12 mins ago0x16f4898f47c085c41d7cc6b1dc72b91ea617dcbb IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.002144067
0xd01ababb41f1b7182d65fcff6d346b58e8a59056d5182e42fcbc4c9ba7dabdeeAdd Translation25725932022-07-29 22:21:42187 days 13 mins ago0x16f4898f47c085c41d7cc6b1dc72b91ea617dcbb IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.002144067
0x415d2018c6c3b57ae396b8b20c8124af3fa00eda3488f363911ecca3eb57b848Add Src25725912022-07-29 22:21:18187 days 13 mins ago0x16f4898f47c085c41d7cc6b1dc72b91ea617dcbb IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.001864007
0x263320d6730cc849a3c03048b8df0859f5679fb01b27ef26c75007c608f25daaAdd Translation25725512022-07-29 22:10:24187 days 24 mins ago0x16f4898f47c085c41d7cc6b1dc72b91ea617dcbb IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.002144067
0x334229077d2572b703846bf4434fd31bd2aa5d1e0e88846561f430e063bf5646Add Translation25725492022-07-29 22:10:00187 days 24 mins ago0x16f4898f47c085c41d7cc6b1dc72b91ea617dcbb IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.004658376
0x3b1b410d6342398fc2de696d7d26c18573c7dff3c6ebd770e113c92c4ddd15bbAdd Src25725482022-07-29 22:09:24187 days 25 mins ago0x16f4898f47c085c41d7cc6b1dc72b91ea617dcbb IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.003196503
0x19a5f3328049f075dd32470c08fd7266cf6b55bea32d7d81abbf1cd6fadf2c1fAdd Translation25725052022-07-29 21:59:00187 days 35 mins ago0x16f4898f47c085c41d7cc6b1dc72b91ea617dcbb IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.002144067
0x574e892e6b259b2dab36263aa263443b681c36a991b8d8d8bffeb26f980b8bc0Add Translation25725032022-07-29 21:58:36187 days 36 mins ago0x16f4898f47c085c41d7cc6b1dc72b91ea617dcbb IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.004660788
0xcf259bd99536e6eb1490cf4f9caf8c3322f1a53afe6d49f43c8c47214bcaf988Add Src25725022022-07-29 21:58:18187 days 36 mins ago0x16f4898f47c085c41d7cc6b1dc72b91ea617dcbb IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.003197307
0x56c4deb6957d4bced894c8e06984b3d1e945ca1b676f8a48b057d7036864470eAdd Translation25724582022-07-29 21:47:00187 days 47 mins ago0x16f4898f47c085c41d7cc6b1dc72b91ea617dcbb IN 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV0.002144067
[ Download CSV Export 
Latest 4 internal transactions
Parent Txn Hash Block From To Value
0x29d1f0a9479c028a4e599f5a210a18580af923535421053fec260b8a4bc3b39125728332022-07-29 23:23:36186 days 23 hrs ago 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0x5769d84dd62a6fd969856c75c7d321b84d4559290 DEV
0x29d1f0a9479c028a4e599f5a210a18580af923535421053fec260b8a4bc3b39125728332022-07-29 23:23:36186 days 23 hrs ago 0xd9216fcb8ca2ae7d545754ff675fcb479c33dc350xf020687bd4cfd56ffe82836ecd1c94482c85b11e0 DEV
0x29d1f0a9479c028a4e599f5a210a18580af923535421053fec260b8a4bc3b39125728332022-07-29 23:23:36186 days 23 hrs ago 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0xd9216fcb8ca2ae7d545754ff675fcb479c33dc350 DEV
0xfbde4384eda898161466536f7d77a653c0830040cebfd6a383cb261e58fd82bd25727062022-07-29 22:50:30186 days 23 hrs ago 0xf020687bd4cfd56ffe82836ecd1c94482c85b11e0xd9216fcb8ca2ae7d545754ff675fcb479c33dc350 DEV
[ Download CSV Export 
Loading

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

Contract Name:
AxelarRoute

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : AxelarRoute.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./AxelarModifiers.sol";
import "./AxelarAdmin.sol";
import "./AxelarEvents.sol";
import "./interfaces/IAxelarExecutable.sol";
import "../interfaces/IRoute.sol";
import "./libraries/StringAddress.sol";

contract AxelarRoute is
    AxelarModifiers,
    AxelarAdmin,
    IRoute
{
    using StringToAddress for string;
    using AddressToString for address;

    constructor(
        IMiddleLayer newMiddleLayer,
        address _gateway,
        IAxelarGasService _gasService
    ) IAxelarExecutable(_gateway) {
        owner = msg.sender;
        middleLayer = newMiddleLayer;
        gasService = _gasService;
    }

    function _translate(
        uint256 chainId
    ) internal view returns (string memory cid) {
        return cids[chainId];
    }

    function _translate(
        string memory cid
    ) internal view returns (uint256 chainId) {
        return chainIds[cid];
    }

    function _execute(
        string memory cid,
        string memory sourceAddress,
        bytes calldata payload
    ) internal virtual override {

        emit Receive(
            "Axelar",
            cid,
            _translate(cid),
            sourceAddress,
            payload
        );

        middleLayer.mreceive(
            _translate(cid),
            payload
        );
    }

    function msend(
        uint256 chainId,
        bytes memory params,
        address payable refundAddress
    ) external override payable onlyMid() {

        emit Send(
            "Axelar",
            _translate(chainId),
            params,
            refundAddress
        );

        if (chainId == 1287 && msg.value > 0) { // sat fuji -> master moonbase
            gasService.payNativeGasForContractCall{value: msg.value}(
                address(this),
                _translate(chainId),
                srcContracts[chainId].toString(),
                params,
                refundAddress
            );

            gateway.callContract(
                _translate(chainId),
                srcContracts[chainId].toString(),
                params
            );
        } else {
            gateway.callContract(
                _translate(chainId),
                srcContracts[chainId].toString(),
                params
            );
        }
    }
}

File 2 of 12 : AxelarModifiers.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./AxelarStorage.sol";
import "./interfaces/IAxelarExecutable.sol";
import "../../../util/CommonErrors.sol";

abstract contract AxelarModifiers is AxelarStorage, IAxelarExecutable, CommonErrors {
    modifier onlyAX() {
        if (msg.sender != address(gateway)) revert OnlyGateway();
        _;
    }

    // slither-disable-next-line assembly
    modifier onlySrc(uint256 srcChain, bytes memory _srcAddr) {
        address srcAddr;
        assembly {
            srcAddr := mload(add(20, _srcAddr))
        }
        if (srcContracts[srcChain] != address(srcAddr)) revert OnlyAuth();
        _;
    }

    modifier onlyMid() {
        if (msg.sender != address(middleLayer)) revert OnlyMiddleLayer();
        _;
    }

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

File 3 of 12 : AxelarAdmin.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./AxelarModifiers.sol";
import "./AxelarEvents.sol";

abstract contract AxelarAdmin is AxelarModifiers, AxelarEvents {
    function addSrc(uint256 srcChain, address newSrcAddress) external onlyOwner() {
        srcContracts[srcChain] = newSrcAddress;

        emit AddSrc(srcChain, newSrcAddress);
    }

    function addTranslation(
        string memory customId, uint256 standardId
    ) external {
        cids[standardId] = customId;
        chainIds[customId] = standardId;

        emit AddTranslation(customId, standardId);
    }
}

File 4 of 12 : AxelarEvents.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

abstract contract AxelarEvents {

    event Send(
        string router,
        string chainId,
        bytes params,
        address _refundAddress
    );

    event Receive(
        string router,
        string cid,
        uint256 translatedChainId,
        string sourceAddress,
        bytes payload
    );

    event AddSrc(
        uint256 srcChain,
        address newSrcAddr
    );

    event AddTranslation(
        string customId,
        uint256 standardId
    );
}

File 5 of 12 : IAxelarExecutable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import { IAxelarGateway } from "./IAxelarGateway.sol";

abstract contract IAxelarExecutable {
    error NotApprovedByGateway();

    IAxelarGateway public gateway;

    constructor(address gateway_) {
        gateway = IAxelarGateway(gateway_);
    }

    function execute(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes calldata payload
    ) external {
        // bytes32 payloadHash = keccak256(payload);
        // if (!gateway.validateContractCall(commandId, sourceChain, sourceAddress, payloadHash))
        //     revert NotApprovedByGateway();
        _execute(sourceChain, sourceAddress, payload);
    }

    function executeWithToken(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes calldata payload,
        string calldata tokenSymbol,
        uint256 amount
    ) external {
        bytes32 payloadHash = keccak256(payload);
        if (
            !gateway.validateContractCallAndMint(
                commandId,
                sourceChain,
                sourceAddress,
                payloadHash,
                tokenSymbol,
                amount
            )
        ) revert NotApprovedByGateway();

        _executeWithToken(sourceChain, sourceAddress, payload, tokenSymbol, amount);
    }

    function _execute(
        string memory sourceChain,
        string memory sourceAddress,
        bytes calldata payload
    ) internal virtual {}

    function _executeWithToken(
        string memory sourceChain,
        string memory sourceAddress,
        bytes calldata payload,
        string memory tokenSymbol,
        uint256 amount
    ) internal virtual {}
}

File 6 of 12 : IRoute.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface IRoute {
    function msend(
        uint256 _dstChainId,
        bytes memory params,
        address payable _refundAddress
    ) external payable;
}

File 7 of 12 : StringAddress.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

library StringToAddress {
    function toAddress(string memory a) internal pure returns (address) {
        bytes memory tmp = bytes(a);
        if (tmp.length != 42) return address(0);
        uint160 iaddr = 0;
        uint8 b;
        for (uint256 i = 2; i < 42; i++) {
            b = uint8(tmp[i]);
            if ((b >= 97) && (b <= 102)) b -= 87;
            else if ((b >= 65) && (b <= 70)) b -= 55;
            else if ((b >= 48) && (b <= 57)) b -= 48;
            else return address(0);
            iaddr |= uint160(uint256(b) << ((41 - i) << 2));
        }
        return address(iaddr);
    }
}

library AddressToString {
    function toString(address a) internal pure returns (string memory) {
        bytes memory data = abi.encodePacked(a);
        bytes memory characters = "0123456789abcdef";
        bytes memory byteString = new bytes(2 + data.length * 2);

        byteString[0] = "0";
        byteString[1] = "x";

        // slither-disable-next-line uninitialized-local
        for (uint256 i; i < data.length; ++i) {
            byteString[2 + i * 2] = characters[uint256(uint8(data[i] >> 4))];
            byteString[3 + i * 2] = characters[uint256(uint8(data[i] & 0x0f))];
        }
        return string(byteString);
    }
}

File 8 of 12 : AxelarStorage.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "../../interfaces/IMiddleLayer.sol";
import "./interfaces/IAxelarGasService.sol";

abstract contract AxelarStorage {
    address internal owner;
    IMiddleLayer internal middleLayer;
    IAxelarGasService internal gasService;

    // routers to call to on other chain ids
    mapping(uint256 => address) internal srcContracts;
    mapping(uint256 => string) internal cids;
    mapping(string => uint256) internal chainIds;
}

File 9 of 12 : CommonErrors.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

abstract contract CommonErrors {
    error AccountNoAssets(address account);
    error AddressExpected();
    error EccMessageAlreadyProcessed();
    error EccFailedToValidate();
    error ExpectedRedeemAmount();
    error ExpectedRepayAmount();
    error InsufficientReserves();
    error InvalidPayload();
    error InvalidPrice();
    error MarketExists();
    error MarketIsPaused();
    error NotInMarket(uint256 chainId, address token);
    error OnlyAuth();
    error OnlyGateway();
    error OnlyMiddleLayer();
    error OnlyOwner();
    error OnlyRoute();
    error Reentrancy();
    error RepayTooMuch(uint256 repayAmount, uint256 maxAmount);
    error RedeemTooMuch();
    error NotEnoughBalance(address token, address who);
    error LiquidateDisallowed();
    error SeizeTooMuch();
    error RouteNotSupported(address route);
    error TransferFailed(address from, address dest);
    error TransferPaused();
    error UnknownRevert();
}

File 10 of 12 : IMiddleLayer.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

abstract contract IMiddleLayer {
    /**
     * @notice routes and encodes messages for you
     * @param params - abi.encode() of the struct related to the selector, used to generate _payload
     * all params starting with '_' are directly sent to the lz 'send()' function
     */
    function msend(
        uint256 _dstChainId,
        bytes memory params,
        address payable _refundAddress,
        address fallbackAddress
    ) external payable virtual;

    function mreceive(
        uint256 _srcChainId,
        bytes memory payload
    ) external virtual;
}

File 11 of 12 : IAxelarGasService.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

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

    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
    );

    // 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 collectFees(address payable receiver, address[] calldata tokens) external;

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

File 12 of 12 : IAxelarGateway.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

interface IAxelarGateway {
    /**********\
    |* Events *|
    \**********/

    event TokenSent(
        address indexed sender,
        string destinationChain,
        string destinationAddress,
        string symbol,
        uint256 amount
    );

    event ContractCall(
        address indexed sender,
        string destinationChain,
        string destinationContractAddress,
        bytes32 indexed payloadHash,
        bytes payload
    );

    event ContractCallWithToken(
        address indexed sender,
        string destinationChain,
        string destinationContractAddress,
        bytes32 indexed payloadHash,
        bytes payload,
        string symbol,
        uint256 amount
    );

    event Executed(bytes32 indexed commandId);

    event TokenDeployed(string symbol, address tokenAddresses);

    event ContractCallApproved(
        bytes32 indexed commandId,
        string sourceChain,
        string sourceAddress,
        address indexed contractAddress,
        bytes32 indexed payloadHash,
        bytes32 sourceTxHash,
        uint256 sourceEventIndex
    );

    event ContractCallApprovedWithMint(
        bytes32 indexed commandId,
        string sourceChain,
        string sourceAddress,
        address indexed contractAddress,
        bytes32 indexed payloadHash,
        string symbol,
        uint256 amount,
        bytes32 sourceTxHash,
        uint256 sourceEventIndex
    );

    event TokenFrozen(string symbol);

    event TokenUnfrozen(string symbol);

    event AllTokensFrozen();

    event AllTokensUnfrozen();

    event AccountBlacklisted(address indexed account);

    event AccountWhitelisted(address indexed account);

    event Upgraded(address indexed implementation);

    /******************\
    |* Public Methods *|
    \******************/

    function sendToken(
        string calldata destinationChain,
        string calldata destinationAddress,
        string calldata symbol,
        uint256 amount
    ) external;

    function callContract(
        string calldata destinationChain,
        string calldata contractAddress,
        bytes calldata payload
    ) external;

    function callContractWithToken(
        string calldata destinationChain,
        string calldata contractAddress,
        bytes calldata payload,
        string calldata symbol,
        uint256 amount
    ) external;

    function isContractCallApproved(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        address contractAddress,
        bytes32 payloadHash
    ) external view returns (bool);

    function isContractCallAndMintApproved(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        address contractAddress,
        bytes32 payloadHash,
        string calldata symbol,
        uint256 amount
    ) external view returns (bool);

    function validateContractCall(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes32 payloadHash
    ) external returns (bool);

    function validateContractCallAndMint(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes32 payloadHash,
        string calldata symbol,
        uint256 amount
    ) external returns (bool);

    /***********\
    |* Getters *|
    \***********/

    function allTokensFrozen() external view returns (bool);

    function implementation() external view returns (address);

    function tokenAddresses(string memory symbol) external view returns (address);

    function tokenFrozen(string memory symbol) external view returns (bool);

    function isCommandExecuted(bytes32 commandId) external view returns (bool);

    function adminEpoch() external view returns (uint256);

    function adminThreshold(uint256 epoch) external view returns (uint256);

    function admins(uint256 epoch) external view returns (address[] memory);

    /*******************\
    |* Admin Functions *|
    \*******************/

    function freezeToken(string calldata symbol) external;

    function unfreezeToken(string calldata symbol) external;

    function freezeAllTokens() external;

    function unfreezeAllTokens() external;

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

    /**********************\
    |* External Functions *|
    \**********************/

    function setup(bytes calldata params) external;

    function execute(bytes calldata input) external;
}

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

Contract ABI

[{"inputs":[{"internalType":"contract IMiddleLayer","name":"newMiddleLayer","type":"address"},{"internalType":"address","name":"_gateway","type":"address"},{"internalType":"contract IAxelarGasService","name":"_gasService","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AccountNoAssets","type":"error"},{"inputs":[],"name":"AddressExpected","type":"error"},{"inputs":[],"name":"EccFailedToValidate","type":"error"},{"inputs":[],"name":"EccMessageAlreadyProcessed","type":"error"},{"inputs":[],"name":"ExpectedRedeemAmount","type":"error"},{"inputs":[],"name":"ExpectedRepayAmount","type":"error"},{"inputs":[],"name":"InsufficientReserves","type":"error"},{"inputs":[],"name":"InvalidPayload","type":"error"},{"inputs":[],"name":"InvalidPrice","type":"error"},{"inputs":[],"name":"LiquidateDisallowed","type":"error"},{"inputs":[],"name":"MarketExists","type":"error"},{"inputs":[],"name":"MarketIsPaused","type":"error"},{"inputs":[],"name":"NotApprovedByGateway","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"who","type":"address"}],"name":"NotEnoughBalance","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"token","type":"address"}],"name":"NotInMarket","type":"error"},{"inputs":[],"name":"OnlyAuth","type":"error"},{"inputs":[],"name":"OnlyGateway","type":"error"},{"inputs":[],"name":"OnlyMiddleLayer","type":"error"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[],"name":"OnlyRoute","type":"error"},{"inputs":[],"name":"RedeemTooMuch","type":"error"},{"inputs":[],"name":"Reentrancy","type":"error"},{"inputs":[{"internalType":"uint256","name":"repayAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"RepayTooMuch","type":"error"},{"inputs":[{"internalType":"address","name":"route","type":"address"}],"name":"RouteNotSupported","type":"error"},{"inputs":[],"name":"SeizeTooMuch","type":"error"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"dest","type":"address"}],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"TransferPaused","type":"error"},{"inputs":[],"name":"UnknownRevert","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"srcChain","type":"uint256"},{"indexed":false,"internalType":"address","name":"newSrcAddr","type":"address"}],"name":"AddSrc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"customId","type":"string"},{"indexed":false,"internalType":"uint256","name":"standardId","type":"uint256"}],"name":"AddTranslation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"router","type":"string"},{"indexed":false,"internalType":"string","name":"cid","type":"string"},{"indexed":false,"internalType":"uint256","name":"translatedChainId","type":"uint256"},{"indexed":false,"internalType":"string","name":"sourceAddress","type":"string"},{"indexed":false,"internalType":"bytes","name":"payload","type":"bytes"}],"name":"Receive","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"router","type":"string"},{"indexed":false,"internalType":"string","name":"chainId","type":"string"},{"indexed":false,"internalType":"bytes","name":"params","type":"bytes"},{"indexed":false,"internalType":"address","name":"_refundAddress","type":"address"}],"name":"Send","type":"event"},{"inputs":[{"internalType":"uint256","name":"srcChain","type":"uint256"},{"internalType":"address","name":"newSrcAddress","type":"address"}],"name":"addSrc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"customId","type":"string"},{"internalType":"uint256","name":"standardId","type":"uint256"}],"name":"addTranslation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commandId","type":"bytes32"},{"internalType":"string","name":"sourceChain","type":"string"},{"internalType":"string","name":"sourceAddress","type":"string"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"execute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commandId","type":"bytes32"},{"internalType":"string","name":"sourceChain","type":"string"},{"internalType":"string","name":"sourceAddress","type":"string"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"string","name":"tokenSymbol","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"executeWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gateway","outputs":[{"internalType":"contract IAxelarGateway","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"address payable","name":"refundAddress","type":"address"}],"name":"msend","outputs":[],"stateMutability":"payable","type":"function"}]

608060405234801561001057600080fd5b5060405161127d38038061127d83398101604081905261002f91610092565b600680546001600160a01b03199081166001600160a01b03948516179091556000805433908316179055600180548216948416949094179093556002805490931691161790556100df565b6001600160a01b038116811461008f57600080fd5b50565b6000806000606084860312156100a757600080fd5b83516100b28161007a565b60208501519093506100c38161007a565b60408501519092506100d48161007a565b809150509250925092565b61118f806100ee6000396000f3fe6080604052600436106100555760003560e01c8063116191b61461005a5780631a98b2e0146100965780631d5e9f2b146100b85780633951b5f5146100d857806349160658146100eb5780634f46bf2f1461010b575b600080fd5b34801561006657600080fd5b5060065461007a906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b3480156100a257600080fd5b506100b66100b1366004610a92565b61012b565b005b3480156100c457600080fd5b506100b66100d3366004610bf8565b61029e565b6100b66100e6366004610c69565b61031e565b3480156100f757600080fd5b506100b6610106366004610cd8565b6104e1565b34801561011757600080fd5b506100b6610126366004610d7c565b610558565b6000858560405161013d929190610dac565b604051908190038120600654631876eed960e01b83529092506001600160a01b031690631876eed990610184908e908e908e908e908e9089908d908d908d90600401610de5565b6020604051808303816000875af11580156101a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c79190610e44565b6101e457604051631403112d60e21b815260040160405180910390fd5b6102918a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b908190840183828082843760009201919091525050604080516020601f8b018190048102820181019092528981528c93508b9250908a908a90819084018382808284376000920191909152508a92506105e2915050565b5050505050505050505050565b600081815260046020908152604090912083516102bd928501906109b0565b50806005836040516102cf9190610e9d565b9081526020016040518091039020819055507f47f3bb66250fcaf1071191a599c8cfa78ea3ef360e8d436d5f7deee05f6af9508282604051610312929190610ee5565b60405180910390a15050565b6001546001600160a01b031633146103495760405163275e4def60e01b815260040160405180910390fd5b7ffb08401db8810fb15c0c9e2be5646dbebbbc27568a927ebe6e98e8a3dc88f6bc610373846105ea565b838360405161038493929190610f07565b60405180910390a18261050714801561039d5750600034115b156104c7576002546001600160a01b0316630c93e3bb34306103be876105ea565b6000888152600360205260409020546103df906001600160a01b031661068c565b87876040518763ffffffff1660e01b8152600401610401959493929190610f6c565b6000604051808303818588803b15801561041a57600080fd5b505af115801561042e573d6000803e3d6000fd5b50506006546001600160a01b03169250631c92115f91506104509050856105ea565b600086815260036020526040902054610471906001600160a01b031661068c565b856040518463ffffffff1660e01b815260040161049093929190610fca565b600060405180830381600087803b1580156104aa57600080fd5b505af11580156104be573d6000803e3d6000fd5b50505050505050565b6006546001600160a01b0316631c92115f610450856105ea565b6104be86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a0181900481028201810190925288815292508891508790819084018382808284376000920191909152508792508691506108cf9050565b6000546001600160a01b0316331461058357604051635fc483c560e01b815260040160405180910390fd5b60008281526003602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527fbccc519e5847abcfcf1779b4b316e027d1d836435b350ac85674eda18b6404389101610312565b505050505050565b60008181526004602052604090208054606091906106079061100d565b80601f01602080910402602001604051908101604052809291908181526020018280546106339061100d565b80156106805780601f1061065557610100808354040283529160200191610680565b820191906000526020600020905b81548152906001019060200180831161066357829003601f168201915b50505050509050919050565b604051606082811b6bffffffffffffffffffffffff191660208301529060009060340160408051601f19818403018152828201909152601082526f181899199a1a9b1b9c1cb0b131b232b360811b602083015280519092506000906106f290600261105d565b6106fd90600261107c565b67ffffffffffffffff81111561071557610715610b6c565b6040519080825280601f01601f19166020018201604052801561073f576020820181803683370190505b509050600360fc1b8160008151811061075a5761075a611094565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061078957610789611094565b60200101906001600160f81b031916908160001a90535060005b83518110156108c6578260048583815181106107c1576107c1611094565b016020015182516001600160f81b031990911690911c60f81c9081106107e9576107e9611094565b01602001516001600160f81b0319168261080483600261105d565b61080f90600261107c565b8151811061081f5761081f611094565b60200101906001600160f81b031916908160001a9053508284828151811061084957610849611094565b602091010151815160f89190911c600f1690811061086957610869611094565b01602001516001600160f81b0319168261088483600261105d565b61088f90600361107c565b8151811061089f5761089f611094565b60200101906001600160f81b031916908160001a9053506108bf816110aa565b90506107a3565b50949350505050565b7f91632a5a137b662a3150dceee2472d910950953afbf5ac128f87be7aaef5c952846108fa86610988565b85858560405161090e9594939291906110c3565b60405180910390a16001546001600160a01b0316630cae3f3961093086610988565b84846040518463ffffffff1660e01b815260040161095093929190611136565b600060405180830381600087803b15801561096a57600080fd5b505af115801561097e573d6000803e3d6000fd5b5050505050505050565b600060058260405161099a9190610e9d565b9081526020016040518091039020549050919050565b8280546109bc9061100d565b90600052602060002090601f0160209004810192826109de5760008555610a24565b82601f106109f757805160ff1916838001178555610a24565b82800160010185558215610a24579182015b82811115610a24578251825591602001919060010190610a09565b50610a30929150610a34565b5090565b5b80821115610a305760008155600101610a35565b60008083601f840112610a5b57600080fd5b50813567ffffffffffffffff811115610a7357600080fd5b602083019150836020828501011115610a8b57600080fd5b9250929050565b60008060008060008060008060008060c08b8d031215610ab157600080fd5b8a35995060208b013567ffffffffffffffff80821115610ad057600080fd5b610adc8e838f01610a49565b909b50995060408d0135915080821115610af557600080fd5b610b018e838f01610a49565b909950975060608d0135915080821115610b1a57600080fd5b610b268e838f01610a49565b909750955060808d0135915080821115610b3f57600080fd5b50610b4c8d828e01610a49565b9150809450508092505060a08b013590509295989b9194979a5092959850565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115610b9d57610b9d610b6c565b604051601f8501601f19908116603f01168101908282118183101715610bc557610bc5610b6c565b81604052809350858152868686011115610bde57600080fd5b858560208301376000602087830101525050509392505050565b60008060408385031215610c0b57600080fd5b823567ffffffffffffffff811115610c2257600080fd5b8301601f81018513610c3357600080fd5b610c4285823560208401610b82565b95602094909401359450505050565b6001600160a01b0381168114610c6657600080fd5b50565b600080600060608486031215610c7e57600080fd5b83359250602084013567ffffffffffffffff811115610c9c57600080fd5b8401601f81018613610cad57600080fd5b610cbc86823560208401610b82565b9250506040840135610ccd81610c51565b809150509250925092565b60008060008060008060006080888a031215610cf357600080fd5b87359650602088013567ffffffffffffffff80821115610d1257600080fd5b610d1e8b838c01610a49565b909850965060408a0135915080821115610d3757600080fd5b610d438b838c01610a49565b909650945060608a0135915080821115610d5c57600080fd5b50610d698a828b01610a49565b989b979a50959850939692959293505050565b60008060408385031215610d8f57600080fd5b823591506020830135610da181610c51565b809150509250929050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b89815260c060208201526000610dff60c083018a8c610dbc565b8281036040840152610e1281898b610dbc565b90508660608401528281036080840152610e2d818688610dbc565b9150508260a08301529a9950505050505050505050565b600060208284031215610e5657600080fd5b81518015158114610e6657600080fd5b9392505050565b60005b83811015610e88578181015183820152602001610e70565b83811115610e97576000848401525b50505050565b60008251610eaf818460208701610e6d565b9190910192915050565b60008151808452610ed1816020860160208601610e6d565b601f01601f19169290920160200192915050565b604081526000610ef86040830185610eb9565b90508260208301529392505050565b608081526000610f2d60808301600681526520bc32b630b960d11b602082015260400190565b8281036020840152610f3f8187610eb9565b90508281036040840152610f538186610eb9565b91505060018060a01b0383166060830152949350505050565b600060018060a01b03808816835260a06020840152610f8e60a0840188610eb9565b8381036040850152610fa08188610eb9565b90508381036060850152610fb48187610eb9565b9250508084166080840152509695505050505050565b606081526000610fdd6060830186610eb9565b8281036020840152610fef8186610eb9565b905082810360408401526110038185610eb9565b9695505050505050565b600181811c9082168061102157607f821691505b60208210810361104157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561107757611077611047565b500290565b6000821982111561108f5761108f611047565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600182016110bc576110bc611047565b5060010190565b60a0815260006110e960a08301600681526520bc32b630b960d11b602082015260400190565b82810360208401526110fb8189610eb9565b905086604084015282810360608401526111158187610eb9565b9050828103608084015261112a818587610dbc565b98975050505050505050565b838152604060208201526000611150604083018486610dbc565b9594505050505056fea2646970667358221220dfe3ad5e01312b81af1c0bbf6b91aa8d9d27bca35793b8300bb4a0e79360a46664736f6c634300080d00330000000000000000000000007473d6f5f90a7fb8d8ea025c9bbd0a2e8a2df0a70000000000000000000000005769d84dd62a6fd969856c75c7d321b84d455929000000000000000000000000be406f0189a0b4cf3a05c286473d23791dd44cc6

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading