creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarExecutable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IAxelarGateway } from './IAxelarGateway.sol';\n\ninterface IAxelarExecutable {\n    error InvalidAddress();\n    error NotApprovedByGateway();\n\n    function gateway() external view returns (IAxelarGateway);\n\n    function execute(\n        bytes32 commandId,\n        string calldata sourceChain,\n        string calldata sourceAddress,\n        bytes calldata payload\n    ) external;\n\n    function executeWithToken(\n        bytes32 commandId,\n        string calldata sourceChain,\n        string calldata sourceAddress,\n        bytes calldata payload,\n        string calldata tokenSymbol,\n        uint256 amount\n    ) external;\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarExpressExecutable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IAxelarExecutable } from './IAxelarExecutable.sol';\n\n/**\n * @title IAxelarExpressExecutable\n * @notice Interface for the Axelar Express Executable contract.\n */\ninterface IAxelarExpressExecutable is IAxelarExecutable {\n    // Custom errors\n    error AlreadyExecuted();\n    error InsufficientValue();\n    error ExpressExecutorAlreadySet();\n\n    /**\n     * @notice Emitted when an express execution is successfully performed.\n     * @param commandId The unique identifier for the command.\n     * @param sourceChain The source chain.\n     * @param sourceAddress The source address.\n     * @param payloadHash The hash of the payload.\n     * @param expressExecutor The address of the express executor.\n     */\n    event ExpressExecuted(\n        bytes32 indexed commandId,\n        string sourceChain,\n        string sourceAddress,\n        bytes32 payloadHash,\n        address indexed expressExecutor\n    );\n\n    /**\n     * @notice Emitted when an express execution with a token is successfully performed.\n     * @param commandId The unique identifier for the command.\n     * @param sourceChain The source chain.\n     * @param sourceAddress The source address.\n     * @param payloadHash The hash of the payload.\n     * @param symbol The token symbol.\n     * @param amount The amount of tokens.\n     * @param expressExecutor The address of the express executor.\n     */\n    event ExpressExecutedWithToken(\n        bytes32 indexed commandId,\n        string sourceChain,\n        string sourceAddress,\n        bytes32 payloadHash,\n        string symbol,\n        uint256 indexed amount,\n        address indexed expressExecutor\n    );\n\n    /**\n     * @notice Emitted when an express execution is fulfilled.\n     * @param commandId The commandId for the contractCall.\n     * @param sourceChain The source chain.\n     * @param sourceAddress The source address.\n     * @param payloadHash The hash of the payload.\n     * @param expressExecutor The address of the express executor.\n     */\n    event ExpressExecutionFulfilled(\n        bytes32 indexed commandId,\n        string sourceChain,\n        string sourceAddress,\n        bytes32 payloadHash,\n        address indexed expressExecutor\n    );\n\n    /**\n     * @notice Emitted when an express execution with a token is fulfilled.\n     * @param commandId The commandId for the contractCallWithToken.\n     * @param sourceChain The source chain.\n     * @param sourceAddress The source address.\n     * @param payloadHash The hash of the payload.\n     * @param symbol The token symbol.\n     * @param amount The amount of tokens.\n     * @param expressExecutor The address of the express executor.\n     */\n    event ExpressExecutionWithTokenFulfilled(\n        bytes32 indexed commandId,\n        string sourceChain,\n        string sourceAddress,\n        bytes32 payloadHash,\n        string symbol,\n        uint256 indexed amount,\n        address indexed expressExecutor\n    );\n\n    /**\n     * @notice Returns the express executor for a given command.\n     * @param commandId The commandId for the contractCall.\n     * @param sourceChain The source chain.\n     * @param sourceAddress The source address.\n     * @param payloadHash The hash of the payload.\n     * @return expressExecutor The address of the express executor.\n     */\n    function getExpressExecutor(\n        bytes32 commandId,\n        string calldata sourceChain,\n        string calldata sourceAddress,\n        bytes32 payloadHash\n    ) external view returns (address expressExecutor);\n\n    /**\n     * @notice Returns the express executor with token for a given command.\n     * @param commandId The commandId for the contractCallWithToken.\n     * @param sourceChain The source chain.\n     * @param sourceAddress The source address.\n     * @param payloadHash The hash of the payload.\n     * @param symbol The token symbol.\n     * @param amount The amount of tokens.\n     * @return expressExecutor The address of the express executor.\n     */\n    function getExpressExecutorWithToken(\n        bytes32 commandId,\n        string calldata sourceChain,\n        string calldata sourceAddress,\n        bytes32 payloadHash,\n        string calldata symbol,\n        uint256 amount\n    ) external view returns (address expressExecutor);\n\n    /**\n     * @notice Express executes a contract call.\n     * @param commandId The commandId for the contractCall.\n     * @param sourceChain The source chain.\n     * @param sourceAddress The source address.\n     * @param payload The payload data.\n     */\n    function expressExecute(\n        bytes32 commandId,\n        string calldata sourceChain,\n        string calldata sourceAddress,\n        bytes calldata payload\n    ) external payable;\n\n    /**\n     * @notice Express executes a contract call with token.\n     * @param commandId The commandId for the contractCallWithToken.\n     * @param sourceChain The source chain.\n     * @param sourceAddress The source address.\n     * @param payload The payload data.\n     * @param symbol The token symbol.\n     * @param amount The amount of token.\n     */\n    function expressExecuteWithToken(\n        bytes32 commandId,\n        string calldata sourceChain,\n        string calldata sourceAddress,\n        bytes calldata payload,\n        string calldata symbol,\n        uint256 amount\n    ) external payable;\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGateway.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IGovernable } from './IGovernable.sol';\nimport { IImplementation } from './IImplementation.sol';\n\ninterface IAxelarGateway is IImplementation, IGovernable {\n    /**********\\\n    |* Errors *|\n    \\**********/\n\n    error NotSelf();\n    error InvalidCodeHash();\n    error SetupFailed();\n    error InvalidAuthModule();\n    error InvalidTokenDeployer();\n    error InvalidAmount();\n    error InvalidChainId();\n    error InvalidCommands();\n    error TokenDoesNotExist(string symbol);\n    error TokenAlreadyExists(string symbol);\n    error TokenDeployFailed(string symbol);\n    error TokenContractDoesNotExist(address token);\n    error BurnFailed(string symbol);\n    error MintFailed(string symbol);\n    error InvalidSetMintLimitsParams();\n    error ExceedMintLimit(string symbol);\n\n    /**********\\\n    |* Events *|\n    \\**********/\n\n    event TokenSent(\n        address indexed sender,\n        string destinationChain,\n        string destinationAddress,\n        string symbol,\n        uint256 amount\n    );\n\n    event ContractCall(\n        address indexed sender,\n        string destinationChain,\n        string destinationContractAddress,\n        bytes32 indexed payloadHash,\n        bytes payload\n    );\n\n    event ContractCallWithToken(\n        address indexed sender,\n        string destinationChain,\n        string destinationContractAddress,\n        bytes32 indexed payloadHash,\n        bytes payload,\n        string symbol,\n        uint256 amount\n    );\n\n    event Executed(bytes32 indexed commandId);\n\n    event TokenDeployed(string symbol, address tokenAddresses);\n\n    event ContractCallApproved(\n        bytes32 indexed commandId,\n        string sourceChain,\n        string sourceAddress,\n        address indexed contractAddress,\n        bytes32 indexed payloadHash,\n        bytes32 sourceTxHash,\n        uint256 sourceEventIndex\n    );\n\n    event ContractCallApprovedWithMint(\n        bytes32 indexed commandId,\n        string sourceChain,\n        string sourceAddress,\n        address indexed contractAddress,\n        bytes32 indexed payloadHash,\n        string symbol,\n        uint256 amount,\n        bytes32 sourceTxHash,\n        uint256 sourceEventIndex\n    );\n\n    event ContractCallExecuted(bytes32 indexed commandId);\n\n    event TokenMintLimitUpdated(string symbol, uint256 limit);\n\n    event OperatorshipTransferred(bytes newOperatorsData);\n\n    event Upgraded(address indexed implementation);\n\n    /********************\\\n    |* Public Functions *|\n    \\********************/\n\n    function sendToken(\n        string calldata destinationChain,\n        string calldata destinationAddress,\n        string calldata symbol,\n        uint256 amount\n    ) external;\n\n    function callContract(\n        string calldata destinationChain,\n        string calldata contractAddress,\n        bytes calldata payload\n    ) external;\n\n    function callContractWithToken(\n        string calldata destinationChain,\n        string calldata contractAddress,\n        bytes calldata payload,\n        string calldata symbol,\n        uint256 amount\n    ) external;\n\n    function isContractCallApproved(\n        bytes32 commandId,\n        string calldata sourceChain,\n        string calldata sourceAddress,\n        address contractAddress,\n        bytes32 payloadHash\n    ) external view returns (bool);\n\n    function isContractCallAndMintApproved(\n        bytes32 commandId,\n        string calldata sourceChain,\n        string calldata sourceAddress,\n        address contractAddress,\n        bytes32 payloadHash,\n        string calldata symbol,\n        uint256 amount\n    ) external view returns (bool);\n\n    function validateContractCall(\n        bytes32 commandId,\n        string calldata sourceChain,\n        string calldata sourceAddress,\n        bytes32 payloadHash\n    ) external returns (bool);\n\n    function validateContractCallAndMint(\n        bytes32 commandId,\n        string calldata sourceChain,\n        string calldata sourceAddress,\n        bytes32 payloadHash,\n        string calldata symbol,\n        uint256 amount\n    ) external returns (bool);\n\n    /***********\\\n    |* Getters *|\n    \\***********/\n\n    function authModule() external view returns (address);\n\n    function tokenDeployer() external view returns (address);\n\n    function tokenMintLimit(string memory symbol) external view returns (uint256);\n\n    function tokenMintAmount(string memory symbol) external view returns (uint256);\n\n    function allTokensFrozen() external view returns (bool);\n\n    function implementation() external view returns (address);\n\n    function tokenAddresses(string memory symbol) external view returns (address);\n\n    function tokenFrozen(string memory symbol) external view returns (bool);\n\n    function isCommandExecuted(bytes32 commandId) external view returns (bool);\n\n    /************************\\\n    |* Governance Functions *|\n    \\************************/\n\n    function setTokenMintLimits(string[] calldata symbols, uint256[] calldata limits) external;\n\n    function upgrade(\n        address newImplementation,\n        bytes32 newImplementationCodeHash,\n        bytes calldata setupParams\n    ) external;\n\n    /**********************\\\n    |* External Functions *|\n    \\**********************/\n\n    function execute(bytes calldata input) external;\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarValuedExpressExecutable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IAxelarExpressExecutable } from './IAxelarExpressExecutable.sol';\n\n/**\n * @title IAxelarValuedExpressExecutable\n * @dev Interface for the Axelar Valued Express Executable contract.\n */\ninterface IAxelarValuedExpressExecutable is IAxelarExpressExecutable {\n    /**\n     * @dev Returns the value (token address and amount) associated with a contract call\n     * @param sourceChain The source blockchain.\n     * @param sourceAddress The source address.\n     * @param payload The payload data.\n     * @return tokenAddress The address of the token used.\n     * @return value The value associated with the contract call.\n     */\n    function contractCallValue(\n        string calldata sourceChain,\n        string calldata sourceAddress,\n        bytes calldata payload\n    ) external view returns (address tokenAddress, uint256 value);\n\n    /**\n     * @dev Returns the value (token address and amount) associated with a contract call with token.\n     * @param sourceChain The source blockchain.\n     * @param sourceAddress The source address.\n     * @param payload The payload data.\n     * @param symbol The token symbol.\n     * @param amount The amount of tokens.\n     * @return tokenAddress The address of the token used.\n     * @return value The value associated with the contract call.\n     */\n    function contractCallWithTokenValue(\n        string calldata sourceChain,\n        string calldata sourceAddress,\n        bytes calldata payload,\n        string calldata symbol,\n        uint256 amount\n    ) external view returns (address tokenAddress, uint256 value);\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IContractIdentifier.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n// General interface for upgradable contracts\ninterface IContractIdentifier {\n    /**\n     * @notice Returns the contract ID. It can be used as a check during upgrades.\n     * @dev Meant to be overridden in derived contracts.\n     * @return bytes32 The contract ID\n     */\n    function contractId() external pure returns (bytes32);\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    error InvalidAccount();\n\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IGovernable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title IGovernable Interface\n * @notice This is an interface used by the AxelarGateway contract to manage governance and mint limiter roles.\n */\ninterface IGovernable {\n    error NotGovernance();\n    error NotMintLimiter();\n    error InvalidGovernance();\n    error InvalidMintLimiter();\n\n    event GovernanceTransferred(address indexed previousGovernance, address indexed newGovernance);\n    event MintLimiterTransferred(address indexed previousGovernance, address indexed newGovernance);\n\n    /**\n     * @notice Returns the governance address.\n     * @return address of the governance\n     */\n    function governance() external view returns (address);\n\n    /**\n     * @notice Returns the mint limiter address.\n     * @return address of the mint limiter\n     */\n    function mintLimiter() external view returns (address);\n\n    /**\n     * @notice Transfer the governance role to another address.\n     * @param newGovernance The new governance address\n     */\n    function transferGovernance(address newGovernance) external;\n\n    /**\n     * @notice Transfer the mint limiter role to another address.\n     * @param newGovernance The new mint limiter address\n     */\n    function transferMintLimiter(address newGovernance) external;\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IImplementation.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IContractIdentifier } from './IContractIdentifier.sol';\n\ninterface IImplementation is IContractIdentifier {\n    error NotProxy();\n\n    function setup(bytes calldata data) external;\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IInterchainAddressTracker.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IContractIdentifier } from './IContractIdentifier.sol';\n\n/**\n * @title IInterchainAddressTracker\n * @dev Manages trusted addresses by chain, keeps track of addresses supported by the Axelar gateway contract\n */\ninterface IInterchainAddressTracker {\n    error ZeroAddress();\n    error LengthMismatch();\n    error ZeroStringLength();\n    error UntrustedChain();\n\n    event TrustedAddressSet(string chain, string address_);\n    event TrustedAddressRemoved(string chain);\n\n    /**\n     * @dev Gets the name of the chain this is deployed at\n     */\n    function chainName() external view returns (string memory);\n\n    /**\n     * @dev Gets the trusted address at a remote chain\n     * @param chain Chain name of the remote chain\n     * @return trustedAddress_ The trusted address for the chain. Returns '' if the chain is untrusted\n     */\n    function trustedAddress(string memory chain) external view returns (string memory trustedAddress_);\n\n    /**\n     * @dev Gets the trusted address hash for a chain\n     * @param chain Chain name\n     * @return trustedAddressHash_ the hash of the trusted address for that chain\n     */\n    function trustedAddressHash(string memory chain) external view returns (bytes32 trustedAddressHash_);\n\n    /**\n     * @dev Checks whether the interchain sender is a trusted address\n     * @param chain Chain name of the sender\n     * @param address_ Address of the sender\n     * @return bool true if the sender chain/address are trusted, false otherwise\n     */\n    function isTrustedAddress(string calldata chain, string calldata address_) external view returns (bool);\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IMulticall.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title IMulticall\n * @notice This contract is a multi-functional smart contract which allows for multiple\n * contract calls in a single transaction.\n */\ninterface IMulticall {\n    error MulticallFailed();\n\n    /**\n     * @notice Performs multiple delegate calls and returns the results of all calls as an array\n     * @dev This function requires that the contract has sufficient balance for the delegate calls.\n     * If any of the calls fail, the function will revert with the failure message.\n     * @param data An array of encoded function calls\n     * @return results An bytes array with the return data of each function call\n     */\n    function multicall(bytes[] calldata data) external payable returns (bytes[] memory results);\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IOwnable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title IOwnable Interface\n * @notice IOwnable is an interface that abstracts the implementation of a\n * contract with ownership control features. It's commonly used in upgradable\n * contracts and includes the functionality to get current owner, transfer\n * ownership, and propose and accept ownership.\n */\ninterface IOwnable {\n    error NotOwner();\n    error InvalidOwner();\n    error InvalidOwnerAddress();\n\n    event OwnershipTransferStarted(address indexed newOwner);\n    event OwnershipTransferred(address indexed newOwner);\n\n    /**\n     * @notice Returns the current owner of the contract.\n     * @return address The address of the current owner\n     */\n    function owner() external view returns (address);\n\n    /**\n     * @notice Returns the address of the pending owner of the contract.\n     * @return address The address of the pending owner\n     */\n    function pendingOwner() external view returns (address);\n\n    /**\n     * @notice Transfers ownership of the contract to a new address\n     * @param newOwner The address to transfer ownership to\n     */\n    function transferOwnership(address newOwner) external;\n\n    /**\n     * @notice Proposes to transfer the contract's ownership to a new address.\n     * The new owner needs to accept the ownership explicitly.\n     * @param newOwner The address to transfer ownership to\n     */\n    function proposeOwnership(address newOwner) external;\n\n    /**\n     * @notice Transfers ownership to the pending owner.\n     * @dev Can only be called by the pending owner\n     */\n    function acceptOwnership() external;\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IPausable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title Pausable\n * @notice This contract provides a mechanism to halt the execution of specific functions\n * if a pause condition is activated.\n */\ninterface IPausable {\n    event Paused(address indexed account);\n    event Unpaused(address indexed account);\n\n    error Pause();\n    error NotPaused();\n\n    /**\n     * @notice Check if the contract is paused\n     * @return paused A boolean representing the pause status. True if paused, false otherwise.\n     */\n    function paused() external view returns (bool);\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IRolesBase.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title IRolesBase Interface\n * @notice IRolesBase is an interface that abstracts the implementation of a\n * contract with role control internal functions.\n */\ninterface IRolesBase {\n    error MissingRole(address account, uint8 role);\n    error MissingAllRoles(address account, uint256 accountRoles);\n    error MissingAnyOfRoles(address account, uint256 accountRoles);\n\n    error InvalidProposedRoles(address fromAccount, address toAccount, uint256 accountRoles);\n\n    event RolesProposed(address indexed fromAccount, address indexed toAccount, uint256 accountRoles);\n    event RolesAdded(address indexed account, uint256 accountRoles);\n    event RolesRemoved(address indexed account, uint256 accountRoles);\n\n    /**\n     * @notice Checks if an account has a role.\n     * @param account The address to check\n     * @param role The role to check\n     * @return True if the account has the role, false otherwise\n     */\n    function hasRole(address account, uint8 role) external view returns (bool);\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IUpgradable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IOwnable } from './IOwnable.sol';\nimport { IImplementation } from './IImplementation.sol';\n\n// General interface for upgradable contracts\ninterface IUpgradable is IOwnable, IImplementation {\n    error InvalidCodeHash();\n    error InvalidImplementation();\n    error SetupFailed();\n\n    event Upgraded(address indexed newImplementation);\n\n    function implementation() external view returns (address);\n\n    function upgrade(\n        address newImplementation,\n        bytes32 newImplementationCodeHash,\n        bytes calldata params\n    ) external;\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/AddressBytes.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title AddressBytesUtils\n * @dev This library provides utility functions to convert between `address` and `bytes`.\n */\nlibrary AddressBytes {\n    error InvalidBytesLength(bytes bytesAddress);\n\n    /**\n     * @dev Converts a bytes address to an address type.\n     * @param bytesAddress The bytes representation of an address\n     * @return addr The converted address\n     */\n    function toAddress(bytes memory bytesAddress) internal pure returns (address addr) {\n        if (bytesAddress.length != 20) revert InvalidBytesLength(bytesAddress);\n\n        assembly {\n            addr := mload(add(bytesAddress, 20))\n        }\n    }\n\n    /**\n     * @dev Converts an address to bytes.\n     * @param addr The address to be converted\n     * @return bytesAddress The bytes representation of the address\n     */\n    function toBytes(address addr) internal pure returns (bytes memory bytesAddress) {\n        bytesAddress = new bytes(20);\n        // we can test if using a single 32 byte variable that is the address with the length together and using one mstore would be slightly cheaper.\n        assembly {\n            mstore(add(bytesAddress, 20), addr)\n            mstore(bytesAddress, 20)\n        }\n    }\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/SafeTransfer.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IERC20 } from '../interfaces/IERC20.sol';\n\nerror TokenTransferFailed();\n\n/*\n * @title SafeTokenCall\n * @dev This library is used for performing safe token transfers.\n */\nlibrary SafeTokenCall {\n    /*\n     * @notice Make a safe call to a token contract.\n     * @param token The token contract to interact with.\n     * @param callData The function call data.\n     * @throws TokenTransferFailed error if transfer of token is not successful.\n     */\n    function safeCall(IERC20 token, bytes memory callData) internal {\n        (bool success, bytes memory returnData) = address(token).call(callData);\n        bool transferred = success && (returnData.length == uint256(0) || abi.decode(returnData, (bool)));\n\n        if (!transferred || address(token).code.length == 0) revert TokenTransferFailed();\n    }\n}\n\n/*\n * @title SafeTokenTransfer\n * @dev This library safely transfers tokens from the contract to a recipient.\n */\nlibrary SafeTokenTransfer {\n    /*\n     * @notice Transfer tokens to a recipient.\n     * @param token The token contract.\n     * @param receiver The recipient of the tokens.\n     * @param amount The amount of tokens to transfer.\n     */\n    function safeTransfer(\n        IERC20 token,\n        address receiver,\n        uint256 amount\n    ) internal {\n        SafeTokenCall.safeCall(token, abi.encodeWithSelector(IERC20.transfer.selector, receiver, amount));\n    }\n}\n\n/*\n * @title SafeTokenTransferFrom\n * @dev This library helps to safely transfer tokens on behalf of a token holder.\n */\nlibrary SafeTokenTransferFrom {\n    /*\n     * @notice Transfer tokens on behalf of a token holder.\n     * @param token The token contract.\n     * @param from The address of the token holder.\n     * @param to The address the tokens are to be sent to.\n     * @param amount The amount of tokens to be transferred.\n     */\n    function safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 amount\n    ) internal {\n        SafeTokenCall.safeCall(token, abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, amount));\n    }\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/upgradable/Implementation.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IImplementation } from '../interfaces/IImplementation.sol';\n\n/**\n * @title Implementation\n * @notice This contract serves as a base for other contracts and enforces a proxy-first access restriction.\n * @dev Derived contracts must implement the setup function.\n */\nabstract contract Implementation is IImplementation {\n    address private immutable implementationAddress;\n\n    /**\n     * @dev Contract constructor that sets the implementation address to the address of this contract.\n     */\n    constructor() {\n        implementationAddress = address(this);\n    }\n\n    /**\n     * @dev Modifier to require the caller to be the proxy contract.\n     * Reverts if the caller is the current contract (i.e., the implementation contract itself).\n     */\n    modifier onlyProxy() {\n        if (implementationAddress == address(this)) revert NotProxy();\n        _;\n    }\n\n    /**\n     * @notice Initializes contract parameters.\n     * This function is intended to be overridden by derived contracts.\n     * The overriding function must have the onlyProxy modifier.\n     * @param params The parameters to be used for initialization\n     */\n    function setup(bytes calldata params) external virtual;\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/upgradable/Upgradable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IImplementation } from '../interfaces/IImplementation.sol';\nimport { IUpgradable } from '../interfaces/IUpgradable.sol';\nimport { Ownable } from '../utils/Ownable.sol';\nimport { Implementation } from './Implementation.sol';\n\n/**\n * @title Upgradable Contract\n * @notice This contract provides an interface for upgradable smart contracts and includes the functionality to perform upgrades.\n */\nabstract contract Upgradable is Ownable, Implementation, IUpgradable {\n    // bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\n    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n    /**\n     * @notice Constructor sets the implementation address to the address of the contract itself\n     * @dev This is used in the onlyProxy modifier to prevent certain functions from being called directly\n     * on the implementation contract itself.\n     * @dev The owner is initially set as address(1) because the actual owner is set within the proxy. It is not\n     * set as the zero address because Ownable is designed to throw an error for ownership transfers to the zero address.\n     */\n    constructor() Ownable(address(1)) {}\n\n    /**\n     * @notice Returns the address of the current implementation\n     * @return implementation_ Address of the current implementation\n     */\n    function implementation() public view returns (address implementation_) {\n        assembly {\n            implementation_ := sload(_IMPLEMENTATION_SLOT)\n        }\n    }\n\n    /**\n     * @notice Upgrades the contract to a new implementation\n     * @param newImplementation The address of the new implementation contract\n     * @param newImplementationCodeHash The codehash of the new implementation contract\n     * @param params Optional setup parameters for the new implementation contract\n     * @dev This function is only callable by the owner.\n     */\n    function upgrade(\n        address newImplementation,\n        bytes32 newImplementationCodeHash,\n        bytes calldata params\n    ) external override onlyOwner {\n        if (IUpgradable(newImplementation).contractId() != IUpgradable(implementation()).contractId())\n            revert InvalidImplementation();\n\n        if (newImplementationCodeHash != newImplementation.codehash) revert InvalidCodeHash();\n\n        emit Upgraded(newImplementation);\n\n        if (params.length > 0) {\n            // slither-disable-next-line controlled-delegatecall\n            (bool success, ) = newImplementation.delegatecall(abi.encodeWithSelector(this.setup.selector, params));\n\n            if (!success) revert SetupFailed();\n        }\n\n        assembly {\n            sstore(_IMPLEMENTATION_SLOT, newImplementation)\n        }\n    }\n\n    /**\n     * @notice Sets up the contract with initial data\n     * @param data Initialization data for the contract\n     * @dev This function is only callable by the proxy contract.\n     */\n    function setup(bytes calldata data) external override(IImplementation, Implementation) onlyProxy {\n        _setup(data);\n    }\n\n    /**\n     * @notice Internal function to set up the contract with initial data\n     * @param data Initialization data for the contract\n     * @dev This function should be implemented in derived contracts.\n     */\n    function _setup(bytes calldata data) internal virtual {}\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/Multicall.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IMulticall } from '../interfaces/IMulticall.sol';\n\n/**\n * @title Multicall\n * @notice This contract is a multi-functional smart contract which allows for multiple\n * contract calls in a single transaction.\n */\ncontract Multicall is IMulticall {\n    /**\n     * @notice Performs multiple delegate calls and returns the results of all calls as an array\n     * @dev This function requires that the contract has sufficient balance for the delegate calls.\n     * If any of the calls fail, the function will revert with the failure message.\n     * @param data An array of encoded function calls\n     * @return results An bytes array with the return data of each function call\n     */\n    function multicall(bytes[] calldata data) public payable returns (bytes[] memory results) {\n        results = new bytes[](data.length);\n        bool success;\n        bytes memory result;\n        for (uint256 i = 0; i < data.length; ++i) {\n            // slither-disable-next-line calls-loop,delegatecall-loop\n            (success, result) = address(this).delegatecall(data[i]);\n\n            if (!success) {\n                if (result.length == 0) revert MulticallFailed();\n                assembly {\n                    revert(add(32, result), mload(result))\n                }\n            }\n\n            results[i] = result;\n        }\n    }\n}\n"
      },
      "@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/Ownable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IOwnable } from '../interfaces/IOwnable.sol';\n\n/**\n * @title Ownable\n * @notice A contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The owner account is set through ownership transfer. This module makes\n * it possible to transfer the ownership of the contract to a new account in one\n * step, as well as to an interim pending owner. In the second flow the ownership does not\n * change until the pending owner accepts the ownership transfer.\n */\nabstract contract Ownable is IOwnable {\n    // keccak256('owner')\n    bytes32 internal constant _OWNER_SLOT = 0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0;\n    // keccak256('ownership-transfer')\n    bytes32 internal constant _OWNERSHIP_TRANSFER_SLOT =\n        0x9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d1;\n\n    /**\n     * @notice Initializes the contract by transferring ownership to the owner parameter.\n     * @param _owner Address to set as the initial owner of the contract\n     */\n    constructor(address _owner) {\n        _transferOwnership(_owner);\n    }\n\n    /**\n     * @notice Modifier that throws an error if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        if (owner() != msg.sender) revert NotOwner();\n\n        _;\n    }\n\n    /**\n     * @notice Returns the current owner of the contract.\n     * @return owner_ The current owner of the contract\n     */\n    function owner() public view returns (address owner_) {\n        assembly {\n            owner_ := sload(_OWNER_SLOT)\n        }\n    }\n\n    /**\n     * @notice Returns the pending owner of the contract.\n     * @return owner_ The pending owner of the contract\n     */\n    function pendingOwner() public view returns (address owner_) {\n        assembly {\n            owner_ := sload(_OWNERSHIP_TRANSFER_SLOT)\n        }\n    }\n\n    /**\n     * @notice Transfers ownership of the contract to a new account `newOwner`.\n     * @dev Can only be called by the current owner.\n     * @param newOwner The address to transfer ownership to\n     */\n    function transferOwnership(address newOwner) external virtual onlyOwner {\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @notice Propose to transfer ownership of the contract to a new account `newOwner`.\n     * @dev Can only be called by the current owner. The ownership does not change\n     * until the new owner accepts the ownership transfer.\n     * @param newOwner The address to transfer ownership to\n     */\n    function proposeOwnership(address newOwner) external virtual onlyOwner {\n        if (newOwner == address(0)) revert InvalidOwnerAddress();\n\n        emit OwnershipTransferStarted(newOwner);\n\n        assembly {\n            sstore(_OWNERSHIP_TRANSFER_SLOT, newOwner)\n        }\n    }\n\n    /**\n     * @notice Accepts ownership of the contract.\n     * @dev Can only be called by the pending owner\n     */\n    function acceptOwnership() external virtual {\n        address newOwner = pendingOwner();\n        if (newOwner != msg.sender) revert InvalidOwner();\n\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @notice Internal function to transfer ownership of the contract to a new account `newOwner`.\n     * @dev Called in the constructor to set the initial owner.\n     * @param newOwner The address to transfer ownership to\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        if (newOwner == address(0)) revert InvalidOwnerAddress();\n\n        emit OwnershipTransferred(newOwner);\n\n        assembly {\n            sstore(_OWNER_SLOT, newOwner)\n            sstore(_OWNERSHIP_TRANSFER_SLOT, 0)\n        }\n    }\n}\n"
      },
      "contracts/InterchainTokenFactory.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { AddressBytes } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/AddressBytes.sol';\nimport { SafeTokenTransfer, SafeTokenTransferFrom, SafeTokenCall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/SafeTransfer.sol';\nimport { Multicall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/Multicall.sol';\nimport { Upgradable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/upgradable/Upgradable.sol';\nimport { IAxelarGateway } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGateway.sol';\n\nimport { IInterchainTokenService } from './interfaces/IInterchainTokenService.sol';\nimport { IInterchainTokenFactory } from './interfaces/IInterchainTokenFactory.sol';\nimport { ITokenManagerType } from './interfaces/ITokenManagerType.sol';\nimport { ITokenManager } from './interfaces/ITokenManager.sol';\nimport { IInterchainToken } from './interfaces/IInterchainToken.sol';\n\n/**\n * @title InterchainTokenFactory\n * @notice This contract is responsible for deploying new interchain tokens and managing their token managers.\n */\ncontract InterchainTokenFactory is IInterchainTokenFactory, ITokenManagerType, Multicall, Upgradable {\n    using AddressBytes for bytes;\n    using AddressBytes for address;\n    using SafeTokenTransfer for IInterchainToken;\n    using SafeTokenTransferFrom for IInterchainToken;\n    using SafeTokenCall for IInterchainToken;\n\n    IInterchainTokenService public immutable interchainTokenService;\n    bytes32 public immutable chainNameHash;\n    IAxelarGateway public immutable gateway;\n\n    bytes32 private constant CONTRACT_ID = keccak256('interchain-token-factory');\n    bytes32 internal constant PREFIX_CANONICAL_TOKEN_SALT = keccak256('canonical-token-salt');\n    bytes32 internal constant PREFIX_INTERCHAIN_TOKEN_SALT = keccak256('interchain-token-salt');\n    address private constant TOKEN_FACTORY_DEPLOYER = address(0);\n\n    /**\n     * @notice Constructs the InterchainTokenFactory contract.\n     * @param interchainTokenService_ The address of the interchain token service.\n     */\n    constructor(address interchainTokenService_) {\n        if (interchainTokenService_ == address(0)) revert ZeroAddress();\n\n        interchainTokenService = IInterchainTokenService(interchainTokenService_);\n\n        chainNameHash = interchainTokenService.chainNameHash();\n        gateway = interchainTokenService.gateway();\n    }\n\n    /**\n     * @notice Getter for the contract id.\n     * @return bytes32 The contract id of this contract.\n     */\n    function contractId() external pure returns (bytes32) {\n        return CONTRACT_ID;\n    }\n\n    /**\n     * @notice Calculates the salt for an interchain token.\n     * @param chainNameHash_ The hash of the chain name.\n     * @param deployer The address of the deployer.\n     * @param salt A unique identifier to generate the salt.\n     * @return bytes32 The calculated salt for the interchain token.\n     */\n    function interchainTokenSalt(bytes32 chainNameHash_, address deployer, bytes32 salt) public pure returns (bytes32) {\n        return keccak256(abi.encode(PREFIX_INTERCHAIN_TOKEN_SALT, chainNameHash_, deployer, salt));\n    }\n\n    /**\n     * @notice Calculates the salt for a canonical interchain token.\n     * @param chainNameHash_ The hash of the chain name.\n     * @param tokenAddress The address of the token.\n     * @return salt The calculated salt for the interchain token.\n     */\n    function canonicalInterchainTokenSalt(bytes32 chainNameHash_, address tokenAddress) public pure returns (bytes32 salt) {\n        salt = keccak256(abi.encode(PREFIX_CANONICAL_TOKEN_SALT, chainNameHash_, tokenAddress));\n    }\n\n    /**\n     * @notice Computes the ID for an interchain token based on the deployer and a salt.\n     * @param deployer The address that deployed the interchain token.\n     * @param salt A unique identifier used in the deployment process.\n     * @return tokenId The ID of the interchain token.\n     */\n    function interchainTokenId(address deployer, bytes32 salt) public view returns (bytes32 tokenId) {\n        tokenId = interchainTokenService.interchainTokenId(TOKEN_FACTORY_DEPLOYER, interchainTokenSalt(chainNameHash, deployer, salt));\n    }\n\n    /**\n     * @notice Computes the ID for a canonical interchain token based on its address.\n     * @param tokenAddress The address of the canonical interchain token.\n     * @return tokenId The ID of the canonical interchain token.\n     */\n    function canonicalInterchainTokenId(address tokenAddress) public view returns (bytes32 tokenId) {\n        tokenId = interchainTokenService.interchainTokenId(\n            TOKEN_FACTORY_DEPLOYER,\n            canonicalInterchainTokenSalt(chainNameHash, tokenAddress)\n        );\n    }\n\n    /**\n     * @notice Retrieves the address of an interchain token based on the deployer and a salt.\n     * @param deployer The address that deployed the interchain token.\n     * @param salt A unique identifier used in the deployment process.\n     * @return tokenAddress The address of the interchain token.\n     */\n    function interchainTokenAddress(address deployer, bytes32 salt) public view returns (address tokenAddress) {\n        tokenAddress = interchainTokenService.interchainTokenAddress(interchainTokenId(deployer, salt));\n    }\n\n    /**\n     * @notice Deploys a new interchain token with specified parameters.\n     * @dev Creates a new token and optionally mints an initial amount to a specified minter.\n     * @param salt The unique salt for deploying the token.\n     * @param name The name of the token.\n     * @param symbol The symbol of the token.\n     * @param decimals The number of decimals for the token.\n     * @param initialSupply The amount of tokens to mint initially (can be zero).\n     * @param minter The address to receive the initially minted tokens.\n     * @return tokenId The tokenId corresponding to the deployed InterchainToken.\n     */\n    function deployInterchainToken(\n        bytes32 salt,\n        string calldata name,\n        string calldata symbol,\n        uint8 decimals,\n        uint256 initialSupply,\n        address minter\n    ) external payable returns (bytes32 tokenId) {\n        address sender = msg.sender;\n        salt = interchainTokenSalt(chainNameHash, sender, salt);\n        bytes memory minterBytes = new bytes(0);\n\n        if (initialSupply > 0) {\n            minterBytes = address(this).toBytes();\n        } else if (minter != address(0)) {\n            minterBytes = minter.toBytes();\n        }\n\n        tokenId = _deployInterchainToken(salt, '', name, symbol, decimals, minterBytes, 0);\n\n        if (initialSupply > 0) {\n            IInterchainToken token = IInterchainToken(interchainTokenService.interchainTokenAddress(tokenId));\n            ITokenManager tokenManager = ITokenManager(interchainTokenService.tokenManagerAddress(tokenId));\n\n            token.mint(sender, initialSupply);\n\n            token.transferMintership(minter);\n            tokenManager.removeFlowLimiter(address(this));\n\n            // If minter == address(0), we still set it as a flow limiter for consistency with the remote token manager.\n            tokenManager.addFlowLimiter(minter);\n\n            tokenManager.transferOperatorship(minter);\n        }\n    }\n\n    /**\n     * @notice Deploys a remote interchain token on a specified destination chain.\n     * @param originalChainName The name of the chain where the token originally exists.\n     * @param salt The unique salt for deploying the token.\n     * @param minter The address to distribute the token on the destination chain.\n     * @param destinationChain The name of the destination chain.\n     * @param gasValue The amount of gas to send for the deployment.\n     * @return tokenId The tokenId corresponding to the deployed InterchainToken.\n     */\n    function deployRemoteInterchainToken(\n        string calldata originalChainName,\n        bytes32 salt,\n        address minter,\n        string memory destinationChain,\n        uint256 gasValue\n    ) external payable returns (bytes32 tokenId) {\n        string memory tokenName;\n        string memory tokenSymbol;\n        uint8 tokenDecimals;\n        bytes memory minter_ = new bytes(0);\n\n        {\n            bytes32 chainNameHash_;\n            if (bytes(originalChainName).length == 0) {\n                chainNameHash_ = chainNameHash;\n            } else {\n                chainNameHash_ = keccak256(bytes(originalChainName));\n            }\n\n            address sender = msg.sender;\n            salt = interchainTokenSalt(chainNameHash_, sender, salt);\n            tokenId = interchainTokenService.interchainTokenId(TOKEN_FACTORY_DEPLOYER, salt);\n\n            IInterchainToken token = IInterchainToken(interchainTokenService.interchainTokenAddress(tokenId));\n\n            tokenName = token.name();\n            tokenSymbol = token.symbol();\n            tokenDecimals = token.decimals();\n\n            if (minter != address(0)) {\n                if (!token.isMinter(minter)) revert NotMinter(minter);\n\n                minter_ = minter.toBytes();\n            }\n        }\n\n        tokenId = _deployInterchainToken(salt, destinationChain, tokenName, tokenSymbol, tokenDecimals, minter_, gasValue);\n    }\n\n    /**\n     * @notice Deploys a new interchain token with specified parameters.\n     * @param salt The unique salt for deploying the token.\n     * @param destinationChain The name of the destination chain.\n     * @param tokenName The name of the token.\n     * @param tokenSymbol The symbol of the token.\n     * @param tokenDecimals The number of decimals for the token.\n     * @param minter The address to receive the initially minted tokens.\n     * @param gasValue The amount of gas to send for the transfer.\n     * @return tokenId The tokenId corresponding to the deployed InterchainToken.\n     */\n    function _deployInterchainToken(\n        bytes32 salt,\n        string memory destinationChain,\n        string memory tokenName,\n        string memory tokenSymbol,\n        uint8 tokenDecimals,\n        bytes memory minter,\n        uint256 gasValue\n    ) internal returns (bytes32 tokenId) {\n        // slither-disable-next-line arbitrary-send-eth\n        tokenId = interchainTokenService.deployInterchainToken{ value: gasValue }(\n            salt,\n            destinationChain,\n            tokenName,\n            tokenSymbol,\n            tokenDecimals,\n            minter,\n            gasValue\n        );\n    }\n\n    /**\n     * @notice Registers a canonical token as an interchain token and deploys its token manager.\n     * @param tokenAddress The address of the canonical token.\n     * @return tokenId The tokenId corresponding to the registered canonical token.\n     */\n    function registerCanonicalInterchainToken(address tokenAddress) external payable returns (bytes32 tokenId) {\n        bytes memory params = abi.encode('', tokenAddress);\n\n        if (_isGatewayToken(tokenAddress)) revert GatewayToken(tokenAddress);\n\n        bytes32 salt = canonicalInterchainTokenSalt(chainNameHash, tokenAddress);\n        tokenId = interchainTokenService.deployTokenManager(salt, '', TokenManagerType.LOCK_UNLOCK, params, 0);\n    }\n\n    /**\n     * @notice Deploys a canonical interchain token on a remote chain.\n     * @param originalChain The name of the chain where the token originally exists.\n     * @param originalTokenAddress The address of the original token on the original chain.\n     * @param destinationChain The name of the chain where the token will be deployed.\n     * @param gasValue The gas amount to be sent for deployment.\n     * @return tokenId The tokenId corresponding to the deployed InterchainToken.\n     */\n    function deployRemoteCanonicalInterchainToken(\n        string calldata originalChain,\n        address originalTokenAddress,\n        string calldata destinationChain,\n        uint256 gasValue\n    ) external payable returns (bytes32 tokenId) {\n        bytes32 salt;\n        IInterchainToken token;\n\n        {\n            bytes32 chainNameHash_;\n            if (bytes(originalChain).length == 0) {\n                chainNameHash_ = chainNameHash;\n            } else {\n                chainNameHash_ = keccak256(bytes(originalChain));\n            }\n            // This ensures that the token manager has been deployed by this address, so it's safe to trust it.\n            salt = canonicalInterchainTokenSalt(chainNameHash_, originalTokenAddress);\n            tokenId = interchainTokenService.interchainTokenId(TOKEN_FACTORY_DEPLOYER, salt);\n            token = IInterchainToken(interchainTokenService.validTokenAddress(tokenId));\n        }\n\n        // The 3 lines below will revert if the token does not exist.\n        string memory tokenName = token.name();\n        string memory tokenSymbol = token.symbol();\n        uint8 tokenDecimals = token.decimals();\n\n        tokenId = _deployInterchainToken(salt, destinationChain, tokenName, tokenSymbol, tokenDecimals, '', gasValue);\n    }\n\n    /**\n     * @notice Checks if a given token is a gateway token.\n     * @param token The address of the token to check.\n     * @return bool True if the token is a gateway token, false otherwise.\n     */\n    function _isGatewayToken(address token) internal view returns (bool) {\n        string memory symbol = IInterchainToken(token).symbol();\n        return token == gateway.tokenAddresses(symbol);\n    }\n}\n"
      },
      "contracts/interfaces/IAddressTracker.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IInterchainAddressTracker } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IInterchainAddressTracker.sol';\n\n/**\n * @title IAddressTracker Interface\n * @notice This interface allows setting and removing a trusted address for a specific chain.\n * @dev Extends the IInterchainAddressTracker interface.\n */\ninterface IAddressTracker is IInterchainAddressTracker {\n    /**\n     * @notice Sets the trusted address for the specified chain.\n     * @param chain Chain name to be trusted.\n     * @param address_ Trusted address to be added for the chain.\n     */\n    function setTrustedAddress(string memory chain, string memory address_) external;\n\n    /**\n     * @notice Remove the trusted address of the chain.\n     * @param chain Chain name to remove the trusted address for.\n     */\n    function removeTrustedAddress(string calldata chain) external;\n}\n"
      },
      "contracts/interfaces/IBaseTokenManager.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title IBaseTokenManager\n * @notice This contract is defines the base token manager interface implemented by all token managers.\n */\ninterface IBaseTokenManager {\n    /**\n     * @notice A function that returns the token id.\n     */\n    function interchainTokenId() external view returns (bytes32);\n\n    /**\n     * @notice A function that should return the address of the token.\n     * Must be overridden in the inheriting contract.\n     * @return address address of the token.\n     */\n    function tokenAddress() external view returns (address);\n\n    /**\n     * @notice A function that should return the token address from the init params.\n     */\n    function getTokenAddressFromParams(bytes calldata params) external pure returns (address);\n}\n"
      },
      "contracts/interfaces/IERC20MintableBurnable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title IERC20MintableBurnable Interface\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20MintableBurnable {\n    /**\n     * @notice Function to mint new tokens.\n     * @dev Can only be called by the minter address.\n     * @param to The address that will receive the minted tokens.\n     * @param amount The amount of tokens to mint.\n     */\n    function mint(address to, uint256 amount) external;\n\n    /**\n     * @notice Function to burn tokens.\n     * @dev Can only be called by the minter address.\n     * @param from The address that will have its tokens burnt.\n     * @param amount The amount of tokens to burn.\n     */\n    function burn(address from, uint256 amount) external;\n}\n"
      },
      "contracts/interfaces/IERC20Named.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IERC20 } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IERC20.sol';\n\n/**\n * @title IERC20Named Interface\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Named is IERC20 {\n    /**\n     * @notice Getter for the name of the token.\n     * @return string Name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @notice Getter for the symbol of the token.\n     * @return string The symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @notice Getter for the decimals of the token.\n     * @return uint8 The decimals of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"
      },
      "contracts/interfaces/IFlowLimit.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title FlowLimit Interface\n * @notice Interface for flow limit logic for interchain token transfers.\n */\ninterface IFlowLimit {\n    error FlowLimitExceeded(uint256 limit, uint256 flowAmount, address tokenManager);\n\n    event FlowLimitSet(bytes32 indexed tokenId, address operator, uint256 flowLimit_);\n\n    /**\n     * @notice Returns the current flow limit.\n     * @return flowLimit_ The current flow limit value.\n     */\n    function flowLimit() external view returns (uint256 flowLimit_);\n\n    /**\n     * @notice Returns the current flow out amount.\n     * @return flowOutAmount_ The current flow out amount.\n     */\n    function flowOutAmount() external view returns (uint256 flowOutAmount_);\n\n    /**\n     * @notice Returns the current flow in amount.\n     * @return flowInAmount_ The current flow in amount.\n     */\n    function flowInAmount() external view returns (uint256 flowInAmount_);\n}\n"
      },
      "contracts/interfaces/IInterchainToken.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IInterchainTokenStandard } from './IInterchainTokenStandard.sol';\nimport { IMinter } from './IMinter.sol';\nimport { IERC20MintableBurnable } from './IERC20MintableBurnable.sol';\nimport { IERC20Named } from './IERC20Named.sol';\n\n/**\n * @title IInterchainToken interface\n * @dev Extends IInterchainTokenStandard and IMinter.\n */\ninterface IInterchainToken is IInterchainTokenStandard, IMinter, IERC20MintableBurnable, IERC20Named {\n    error InterchainTokenServiceAddressZero();\n    error TokenIdZero();\n    error TokenNameEmpty();\n    error TokenSymbolEmpty();\n    error AlreadyInitialized();\n\n    /**\n     * @notice Getter for the interchain token service contract.\n     * @dev Needs to be overwitten.\n     * @return interchainTokenServiceAddress The interchain token service address.\n     */\n    function interchainTokenService() external view returns (address interchainTokenServiceAddress);\n\n    /**\n     * @notice Getter for the tokenId used for this token.\n     * @dev Needs to be overwitten.\n     * @return tokenId_ The tokenId for this token.\n     */\n    function interchainTokenId() external view returns (bytes32 tokenId_);\n\n    /**\n     * @notice Setup function to initialize contract parameters.\n     * @param tokenId_ The tokenId of the token.\n     * @param minter The address of the token minter.\n     * @param tokenName The name of the token.\n     * @param tokenSymbol The symbopl of the token.\n     * @param tokenDecimals The decimals of the token.\n     */\n    function init(bytes32 tokenId_, address minter, string calldata tokenName, string calldata tokenSymbol, uint8 tokenDecimals) external;\n}\n"
      },
      "contracts/interfaces/IInterchainTokenFactory.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IMulticall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IMulticall.sol';\nimport { IUpgradable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IUpgradable.sol';\n\nimport { IInterchainTokenService } from './IInterchainTokenService.sol';\n\n/**\n * @title IInterchainTokenFactory Interface\n * @notice This interface defines functions for deploying new interchain tokens and managing their token managers.\n */\ninterface IInterchainTokenFactory is IUpgradable, IMulticall {\n    error ZeroAddress();\n    error InvalidChainName();\n    error NotMinter(address minter);\n    error NotOperator(address operator);\n    error GatewayToken(address tokenAddress);\n\n    /**\n     * @notice Returns the address of the interchain token service.\n     * @return IInterchainTokenService The address of the interchain token service.\n     */\n    function interchainTokenService() external view returns (IInterchainTokenService);\n\n    /**\n     * @notice Returns the hash of the chain name.\n     * @return bytes32 The hash of the chain name.\n     */\n    function chainNameHash() external view returns (bytes32);\n\n    /**\n     * @notice Calculates the salt for an interchain token.\n     * @param chainNameHash_ The hash of the chain name.\n     * @param deployer The address of the deployer.\n     * @param salt A unique identifier to generate the salt.\n     * @return bytes32 The calculated salt for the interchain token.\n     */\n    function interchainTokenSalt(bytes32 chainNameHash_, address deployer, bytes32 salt) external view returns (bytes32);\n\n    /**\n     * @notice Computes the ID for an interchain token based on the deployer and a salt.\n     * @param deployer The address that deployed the interchain token.\n     * @param salt A unique identifier used in the deployment process.\n     * @return tokenId The ID of the interchain token.\n     */\n    function interchainTokenId(address deployer, bytes32 salt) external view returns (bytes32 tokenId);\n\n    /**\n     * @notice Retrieves the address of an interchain token based on the deployer and a salt.\n     * @param deployer The address that deployed the interchain token.\n     * @param salt A unique identifier used in the deployment process.\n     * @return tokenAddress The address of the interchain token.\n     */\n    function interchainTokenAddress(address deployer, bytes32 salt) external view returns (address tokenAddress);\n\n    /**\n     * @notice Deploys a new interchain token with specified parameters.\n     * @param salt The unique salt for deploying the token.\n     * @param name The name of the token.\n     * @param symbol The symbol of the token.\n     * @param decimals The number of decimals for the token.\n     * @param initialSupply The amount of tokens to mint initially (can be zero).\n     * @param minter The address to receive the initially minted tokens.\n     * @return tokenId The tokenId corresponding to the deployed InterchainToken.\n     */\n    function deployInterchainToken(\n        bytes32 salt,\n        string calldata name,\n        string calldata symbol,\n        uint8 decimals,\n        uint256 initialSupply,\n        address minter\n    ) external payable returns (bytes32 tokenId);\n\n    /**\n     * @notice Deploys a remote interchain token on a specified destination chain.\n     * @param originalChainName The name of the chain where the token originally exists.\n     * @param salt The unique salt for deploying the token.\n     * @param minter The address to distribute the token on the destination chain.\n     * @param destinationChain The name of the destination chain.\n     * @param gasValue The amount of gas to send for the deployment.\n     * @return tokenId The tokenId corresponding to the deployed InterchainToken.\n     */\n    function deployRemoteInterchainToken(\n        string calldata originalChainName,\n        bytes32 salt,\n        address minter,\n        string memory destinationChain,\n        uint256 gasValue\n    ) external payable returns (bytes32 tokenId);\n\n    /**\n     * @notice Calculates the salt for a canonical interchain token.\n     * @param chainNameHash_ The hash of the chain name.\n     * @param tokenAddress The address of the token.\n     * @return salt The calculated salt for the interchain token.\n     */\n    function canonicalInterchainTokenSalt(bytes32 chainNameHash_, address tokenAddress) external view returns (bytes32 salt);\n\n    /**\n     * @notice Computes the ID for a canonical interchain token based on its address.\n     * @param tokenAddress The address of the canonical interchain token.\n     * @return tokenId The ID of the canonical interchain token.\n     */\n    function canonicalInterchainTokenId(address tokenAddress) external view returns (bytes32 tokenId);\n\n    /**\n     * @notice Registers a canonical token as an interchain token and deploys its token manager.\n     * @param tokenAddress The address of the canonical token.\n     * @return tokenId The tokenId corresponding to the registered canonical token.\n     */\n    function registerCanonicalInterchainToken(address tokenAddress) external payable returns (bytes32 tokenId);\n\n    /**\n     * @notice Deploys a canonical interchain token on a remote chain.\n     * @param originalChain The name of the chain where the token originally exists.\n     * @param originalTokenAddress The address of the original token on the original chain.\n     * @param destinationChain The name of the chain where the token will be deployed.\n     * @param gasValue The gas amount to be sent for deployment.\n     * @return tokenId The tokenId corresponding to the deployed canonical InterchainToken.\n     */\n    function deployRemoteCanonicalInterchainToken(\n        string calldata originalChain,\n        address originalTokenAddress,\n        string calldata destinationChain,\n        uint256 gasValue\n    ) external payable returns (bytes32 tokenId);\n}\n"
      },
      "contracts/interfaces/IInterchainTokenService.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IAxelarValuedExpressExecutable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarValuedExpressExecutable.sol';\nimport { IMulticall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IMulticall.sol';\nimport { IPausable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IPausable.sol';\nimport { IUpgradable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IUpgradable.sol';\n\nimport { ITransmitInterchainToken } from './ITransmitInterchainToken.sol';\nimport { ITokenManagerType } from './ITokenManagerType.sol';\nimport { ITokenManagerImplementation } from './ITokenManagerImplementation.sol';\nimport { IOperator } from './IOperator.sol';\nimport { IAddressTracker } from './IAddressTracker.sol';\n\n/**\n * @title IInterchainTokenService Interface\n * @notice Interface for the Interchain Token Service\n */\ninterface IInterchainTokenService is\n    ITransmitInterchainToken,\n    ITokenManagerType,\n    ITokenManagerImplementation,\n    IAxelarValuedExpressExecutable,\n    IOperator,\n    IPausable,\n    IMulticall,\n    IAddressTracker,\n    IUpgradable\n{\n    error InvalidTokenManagerImplementationType(address implementation);\n    error InvalidChainName();\n    error NotRemoteService();\n    error TokenManagerDoesNotExist(bytes32 tokenId);\n    error NotToken(address caller, address token);\n    error ExecuteWithInterchainTokenFailed(address contractAddress);\n    error ExpressExecuteWithInterchainTokenFailed(address contractAddress);\n    error GatewayToken();\n    error TokenManagerDeploymentFailed(bytes error);\n    error InterchainTokenDeploymentFailed(bytes error);\n    error InvalidMessageType(uint256 messageType);\n    error InvalidMetadataVersion(uint32 version);\n    error ExecuteWithTokenNotSupported();\n    error InvalidExpressMessageType(uint256 messageType);\n    error TakeTokenFailed(bytes data);\n    error GiveTokenFailed(bytes data);\n    error TokenHandlerFailed(bytes data);\n    error EmptyData();\n    error CannotDeploy(TokenManagerType);\n\n    event InterchainTransfer(\n        bytes32 indexed tokenId,\n        address indexed sourceAddress,\n        string destinationChain,\n        bytes destinationAddress,\n        uint256 amount,\n        bytes32 indexed dataHash\n    );\n    event InterchainTransferReceived(\n        bytes32 indexed commandId,\n        bytes32 indexed tokenId,\n        string sourceChain,\n        bytes sourceAddress,\n        address indexed destinationAddress,\n        uint256 amount,\n        bytes32 dataHash\n    );\n    event TokenManagerDeploymentStarted(\n        bytes32 indexed tokenId,\n        string destinationChain,\n        TokenManagerType indexed tokenManagerType,\n        bytes params\n    );\n    event InterchainTokenDeploymentStarted(\n        bytes32 indexed tokenId,\n        string tokenName,\n        string tokenSymbol,\n        uint8 tokenDecimals,\n        bytes minter,\n        string destinationChain\n    );\n    event TokenManagerDeployed(bytes32 indexed tokenId, address tokenManager, TokenManagerType indexed tokenManagerType, bytes params);\n    event InterchainTokenDeployed(\n        bytes32 indexed tokenId,\n        address tokenAddress,\n        address indexed minter,\n        string name,\n        string symbol,\n        uint8 decimals\n    );\n    event InterchainTokenIdClaimed(bytes32 indexed tokenId, address indexed deployer, bytes32 indexed salt);\n\n    /**\n     * @notice Returns the address of the token manager deployer contract.\n     * @return tokenManagerDeployerAddress The address of the token manager deployer contract.\n     */\n    function tokenManagerDeployer() external view returns (address tokenManagerDeployerAddress);\n\n    /**\n     * @notice Returns the address of the interchain token deployer contract.\n     * @return interchainTokenDeployerAddress The address of the interchain token deployer contract.\n     */\n    function interchainTokenDeployer() external view returns (address interchainTokenDeployerAddress);\n\n    /**\n     * @notice Returns the address of TokenManager implementation.\n     * @return tokenManagerAddress_ The address of the token manager contract.\n     */\n    function tokenManager() external view returns (address tokenManagerAddress_);\n\n    /**\n     * @notice Returns the address of TokenHandler implementation.\n     * @return tokenHandlerAddress The address of the token handler contract.\n     */\n    function tokenHandler() external view returns (address tokenHandlerAddress);\n\n    /**\n     * @notice Returns the address of the interchain token factory.\n     * @return address The address of the interchain token factory.\n     */\n    function interchainTokenFactory() external view returns (address);\n\n    /**\n     * @notice Returns the hash of the chain name.\n     * @return bytes32 The hash of the chain name.\n     */\n    function chainNameHash() external view returns (bytes32);\n\n    /**\n     * @notice Returns the address of the token manager associated with the given tokenId.\n     * @param tokenId The tokenId of the token manager.\n     * @return tokenManagerAddress_ The address of the token manager.\n     */\n    function tokenManagerAddress(bytes32 tokenId) external view returns (address tokenManagerAddress_);\n\n    /**\n     * @notice Returns the address of the valid token manager associated with the given tokenId.\n     * @param tokenId The tokenId of the token manager.\n     * @return tokenManagerAddress_ The address of the valid token manager.\n     */\n    function validTokenManagerAddress(bytes32 tokenId) external view returns (address tokenManagerAddress_);\n\n    /**\n     * @notice Returns the address of the token that an existing tokenManager points to.\n     * @param tokenId The tokenId of the token manager.\n     * @return tokenAddress The address of the token.\n     */\n    function validTokenAddress(bytes32 tokenId) external view returns (address tokenAddress);\n\n    /**\n     * @notice Returns the address of the interchain token associated with the given tokenId.\n     * @param tokenId The tokenId of the interchain token.\n     * @return tokenAddress The address of the interchain token.\n     */\n    function interchainTokenAddress(bytes32 tokenId) external view returns (address tokenAddress);\n\n    /**\n     * @notice Returns the custom tokenId associated with the given operator and salt.\n     * @param operator_ The operator address.\n     * @param salt The salt used for token id calculation.\n     * @return tokenId The custom tokenId associated with the operator and salt.\n     */\n    function interchainTokenId(address operator_, bytes32 salt) external view returns (bytes32 tokenId);\n\n    /**\n     * @notice Deploys a custom token manager contract on a remote chain.\n     * @param salt The salt used for token manager deployment.\n     * @param destinationChain The name of the destination chain.\n     * @param tokenManagerType The type of token manager. Cannot be NATIVE_INTERCHAIN_TOKEN.\n     * @param params The deployment parameters.\n     * @param gasValue The gas value for deployment.\n     * @return tokenId The tokenId associated with the token manager.\n     */\n    function deployTokenManager(\n        bytes32 salt,\n        string calldata destinationChain,\n        TokenManagerType tokenManagerType,\n        bytes calldata params,\n        uint256 gasValue\n    ) external payable returns (bytes32 tokenId);\n\n    /**\n     * @notice Deploys and registers an interchain token on a remote chain.\n     * @param salt The salt used for token deployment.\n     * @param destinationChain The name of the destination chain. Use '' for this chain.\n     * @param name The name of the interchain tokens.\n     * @param symbol The symbol of the interchain tokens.\n     * @param decimals The number of decimals for the interchain tokens.\n     * @param minter The minter data for mint/burn operations.\n     * @param gasValue The gas value for deployment.\n     * @return tokenId The tokenId corresponding to the deployed InterchainToken.\n     */\n    function deployInterchainToken(\n        bytes32 salt,\n        string calldata destinationChain,\n        string memory name,\n        string memory symbol,\n        uint8 decimals,\n        bytes memory minter,\n        uint256 gasValue\n    ) external payable returns (bytes32 tokenId);\n\n    /**\n     * @notice Initiates an interchain transfer of a specified token to a destination chain.\n     * @param tokenId The unique identifier of the token to be transferred.\n     * @param destinationChain The destination chain to send the tokens to.\n     * @param destinationAddress The address on the destination chain to send the tokens to.\n     * @param amount The amount of tokens to be transferred.\n     * @param metadata Optional metadata for the call for additional effects (such as calling a destination contract).\n     */\n    function interchainTransfer(\n        bytes32 tokenId,\n        string calldata destinationChain,\n        bytes calldata destinationAddress,\n        uint256 amount,\n        bytes calldata metadata,\n        uint256 gasValue\n    ) external payable;\n\n    /**\n     * @notice Initiates an interchain call contract with interchain token to a destination chain.\n     * @param tokenId The unique identifier of the token to be transferred.\n     * @param destinationChain The destination chain to send the tokens to.\n     * @param destinationAddress The address on the destination chain to send the tokens to.\n     * @param amount The amount of tokens to be transferred.\n     * @param data Additional data to be passed along with the transfer.\n     */\n    function callContractWithInterchainToken(\n        bytes32 tokenId,\n        string calldata destinationChain,\n        bytes calldata destinationAddress,\n        uint256 amount,\n        bytes calldata data,\n        uint256 gasValue\n    ) external payable;\n\n    /**\n     * @notice Sets the flow limits for multiple tokens.\n     * @param tokenIds An array of tokenIds.\n     * @param flowLimits An array of flow limits corresponding to the tokenIds.\n     */\n    function setFlowLimits(bytes32[] calldata tokenIds, uint256[] calldata flowLimits) external;\n\n    /**\n     * @notice Returns the flow limit for a specific token.\n     * @param tokenId The tokenId of the token.\n     * @return flowLimit_ The flow limit for the token.\n     */\n    function flowLimit(bytes32 tokenId) external view returns (uint256 flowLimit_);\n\n    /**\n     * @notice Returns the total amount of outgoing flow for a specific token.\n     * @param tokenId The tokenId of the token.\n     * @return flowOutAmount_ The total amount of outgoing flow for the token.\n     */\n    function flowOutAmount(bytes32 tokenId) external view returns (uint256 flowOutAmount_);\n\n    /**\n     * @notice Returns the total amount of incoming flow for a specific token.\n     * @param tokenId The tokenId of the token.\n     * @return flowInAmount_ The total amount of incoming flow for the token.\n     */\n    function flowInAmount(bytes32 tokenId) external view returns (uint256 flowInAmount_);\n\n    /**\n     * @notice Allows the owner to pause/unpause the token service.\n     * @param paused whether to pause or unpause.\n     */\n    function setPauseStatus(bool paused) external;\n}\n"
      },
      "contracts/interfaces/IInterchainTokenStandard.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title IInterchainTokenStandard interface\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IInterchainTokenStandard {\n    /**\n     * @notice Implementation of the interchainTransfer method.\n     * @dev We chose to either pass `metadata` as raw data on a remote contract call, or if no data is passed, just do a transfer.\n     * A different implementation could use metadata to specify a function to invoke, or for other purposes as well.\n     * @param destinationChain The destination chain identifier.\n     * @param recipient The bytes representation of the address of the recipient.\n     * @param amount The amount of token to be transferred.\n     * @param metadata Optional metadata for the call for additional effects (such as calling a destination contract).\n     */\n    function interchainTransfer(\n        string calldata destinationChain,\n        bytes calldata recipient,\n        uint256 amount,\n        bytes calldata metadata\n    ) external payable;\n\n    /**\n     * @notice Implementation of the interchainTransferFrom method\n     * @dev We chose to either pass `metadata` as raw data on a remote contract call, or, if no data is passed, just do a transfer.\n     * A different implementation could use metadata to specify a function to invoke, or for other purposes as well.\n     * @param sender The sender of the tokens. They need to have approved `msg.sender` before this is called.\n     * @param destinationChain The string representation of the destination chain.\n     * @param recipient The bytes representation of the address of the recipient.\n     * @param amount The amount of token to be transferred.\n     * @param metadata Optional metadata for the call for additional effects (such as calling a destination contract.)\n     */\n    function interchainTransferFrom(\n        address sender,\n        string calldata destinationChain,\n        bytes calldata recipient,\n        uint256 amount,\n        bytes calldata metadata\n    ) external payable;\n}\n"
      },
      "contracts/interfaces/IMinter.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IRolesBase } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IRolesBase.sol';\n\n/**\n * @title IMinter Interface\n * @notice An interface for a contract module which provides a basic access control mechanism, where\n * there is an account (a minter) that can be granted exclusive access to specific functions.\n */\ninterface IMinter is IRolesBase {\n    /**\n     * @notice Change the minter of the contract.\n     * @dev Can only be called by the current minter.\n     * @param minter_ The address of the new minter.\n     */\n    function transferMintership(address minter_) external;\n\n    /**\n     * @notice Proposed a change of the minter of the contract.\n     * @dev Can only be called by the current minter.\n     * @param minter_ The address of the new minter.\n     */\n    function proposeMintership(address minter_) external;\n\n    /**\n     * @notice Accept a change of the minter of the contract.\n     * @dev Can only be called by the proposed minter.\n     * @param fromMinter The previous minter.\n     */\n    function acceptMintership(address fromMinter) external;\n\n    /**\n     * @notice Query if an address is a minter\n     * @param addr the address to query for\n     * @return bool Boolean value representing whether or not the address is a minter.\n     */\n    function isMinter(address addr) external view returns (bool);\n}\n"
      },
      "contracts/interfaces/IOperator.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IRolesBase } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IRolesBase.sol';\n\n/**\n * @title IOperator Interface\n * @notice An interface for a contract module which provides a basic access control mechanism, where\n * there is an account (a operator) that can be granted exclusive access to specific functions.\n */\ninterface IOperator is IRolesBase {\n    /**\n     * @notice Change the operator of the contract.\n     * @dev Can only be called by the current operator.\n     * @param operator_ The address of the new operator.\n     */\n    function transferOperatorship(address operator_) external;\n\n    /**\n     * @notice Proposed a change of the operator of the contract.\n     * @dev Can only be called by the current operator.\n     * @param operator_ The address of the new operator.\n     */\n    function proposeOperatorship(address operator_) external;\n\n    /**\n     * @notice Accept a proposed change of operatorship.\n     * @dev Can only be called by the proposed operator.\n     * @param fromOperator The previous operator of the contract.\n     */\n    function acceptOperatorship(address fromOperator) external;\n\n    /**\n     * @notice Query if an address is a operator.\n     * @param addr The address to query for.\n     * @return bool Boolean value representing whether or not the address is an operator.\n     */\n    function isOperator(address addr) external view returns (bool);\n}\n"
      },
      "contracts/interfaces/ITokenManager.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { IImplementation } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IImplementation.sol';\n\nimport { IBaseTokenManager } from './IBaseTokenManager.sol';\nimport { IOperator } from './IOperator.sol';\nimport { IFlowLimit } from './IFlowLimit.sol';\n\n/**\n * @title ITokenManager Interface\n * @notice This contract is responsible for managing tokens, such as setting locking token balances, or setting flow limits, for interchain transfers.\n */\ninterface ITokenManager is IBaseTokenManager, IOperator, IFlowLimit, IImplementation {\n    error TokenLinkerZeroAddress();\n    error NotService(address caller);\n    error TakeTokenFailed();\n    error GiveTokenFailed();\n    error NotToken(address caller);\n    error ZeroAddress();\n    error AlreadyFlowLimiter(address flowLimiter);\n    error NotFlowLimiter(address flowLimiter);\n    error NotSupported();\n\n    /**\n     * @notice Returns implementation type of this token manager.\n     * @return uint256 The implementation type of this token manager.\n     */\n    function implementationType() external view returns (uint256);\n\n    function addFlowIn(uint256 amount) external;\n\n    function addFlowOut(uint256 amount) external;\n\n    /**\n     * @notice This function adds a flow limiter for this TokenManager.\n     * @dev Can only be called by the operator.\n     * @param flowLimiter the address of the new flow limiter.\n     */\n    function addFlowLimiter(address flowLimiter) external;\n\n    /**\n     * @notice This function removes a flow limiter for this TokenManager.\n     * @dev Can only be called by the operator.\n     * @param flowLimiter the address of an existing flow limiter.\n     */\n    function removeFlowLimiter(address flowLimiter) external;\n\n    /**\n     * @notice Query if an address is a flow limiter.\n     * @param addr The address to query for.\n     * @return bool Boolean value representing whether or not the address is a flow limiter.\n     */\n    function isFlowLimiter(address addr) external view returns (bool);\n\n    /**\n     * @notice This function sets the flow limit for this TokenManager.\n     * @dev Can only be called by the flow limiters.\n     * @param flowLimit_ The maximum difference between the tokens flowing in and/or out at any given interval of time (6h).\n     */\n    function setFlowLimit(uint256 flowLimit_) external;\n\n    /**\n     * @notice A function to renew approval to the service if we need to.\n     */\n    function approveService() external;\n\n    /**\n     * @notice Getter function for the parameters of a lock/unlock TokenManager.\n     * @dev This function will be mainly used by frontends.\n     * @param operator_ The operator of the TokenManager.\n     * @param tokenAddress_ The token to be managed.\n     * @return params_ The resulting params to be passed to custom TokenManager deployments.\n     */\n    function params(bytes calldata operator_, address tokenAddress_) external pure returns (bytes memory params_);\n\n    /**\n     * @notice External function to allow the service to mint tokens through the tokenManager\n     * @dev This function should revert if called by anyone but the service.\n     * @param tokenAddress_ The address of the token, since its cheaper to pass it in instead of reading it as the token manager.\n     * @param to The recipient.\n     * @param amount The amount to mint.\n     */\n    function mintToken(address tokenAddress_, address to, uint256 amount) external;\n\n    /**\n     * @notice External function to allow the service to burn tokens through the tokenManager\n     * @dev This function should revert if called by anyone but the service.\n     * @param tokenAddress_ The address of the token, since its cheaper to pass it in instead of reading it as the token manager.\n     * @param from The address to burn the token from.\n     * @param amount The amount to burn.\n     */\n    function burnToken(address tokenAddress_, address from, uint256 amount) external;\n}\n"
      },
      "contracts/interfaces/ITokenManagerImplementation.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title ITokenManagerImplementation Interface\n * @notice Interface for returning the token manager implementation type.\n */\ninterface ITokenManagerImplementation {\n    /**\n     * @notice Returns the implementation address for a given token manager type.\n     * @param tokenManagerType The type of token manager.\n     * @return tokenManagerAddress_ The address of the token manager implementation.\n     */\n    function tokenManagerImplementation(uint256 tokenManagerType) external view returns (address tokenManagerAddress_);\n}\n"
      },
      "contracts/interfaces/ITokenManagerType.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title ITokenManagerType Interface\n * @notice A simple interface that defines all the token manager types.\n */\ninterface ITokenManagerType {\n    enum TokenManagerType {\n        NATIVE_INTERCHAIN_TOKEN, // This type is reserved for interchain tokens deployed by ITS, and can't be used by custom token managers.\n        MINT_BURN_FROM, // The token will be minted/burned on transfers. The token needs to give mint permission to the token manager, but burning happens via an approval.\n        LOCK_UNLOCK, // The token will be locked/unlocked at the token manager.\n        LOCK_UNLOCK_FEE, // The token will be locked/unlocked at the token manager, which will account for any fee-on-transfer behaviour.\n        MINT_BURN // The token will be minted/burned on transfers. The token needs to give mint and burn permission to the token manager.\n    }\n}\n"
      },
      "contracts/interfaces/ITransmitInterchainToken.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title ITransmitInterchainToken Interface\n * @notice Interface for transmiting interchain tokens via the interchain token service\n */\ninterface ITransmitInterchainToken {\n    /**\n     * @notice Transmit an interchain transfer for the given tokenId.\n     * @dev Only callable by a token registered under a tokenId.\n     * @param tokenId The tokenId of the token (which must be the msg.sender).\n     * @param sourceAddress The address where the token is coming from.\n     * @param destinationChain The name of the chain to send tokens to.\n     * @param destinationAddress The destinationAddress for the interchainTransfer.\n     * @param amount The amount of token to give.\n     * @param metadata Optional metadata for the call for additional effects (such as calling a destination contract).\n     */\n    function transmitInterchainTransfer(\n        bytes32 tokenId,\n        address sourceAddress,\n        string calldata destinationChain,\n        bytes memory destinationAddress,\n        uint256 amount,\n        bytes calldata metadata\n    ) external payable;\n}\n"
      }
    },
    "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": {}
    }
  }}