FRAX Price: $0.90 (+11.01%)

Contract

0x9c551097d890E16f407a1e675490a2359B3933FD

Overview

FRAX Balance | FXTL Balance

0 FRAX | 63,718 FXTL

FRAX Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

> 10 Internal Transactions and 2 Token Transfers found.

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
226427372025-07-09 21:23:05208 days ago1752096185
0x9c551097...59B3933FD
0 FRAX
226427372025-07-09 21:23:05208 days ago1752096185
0x9c551097...59B3933FD
0 FRAX
218875252025-06-22 9:49:21225 days ago1750585761
0x9c551097...59B3933FD
0.00005483 FRAX
218875252025-06-22 9:49:21225 days ago1750585761
0x9c551097...59B3933FD
0.00005483 FRAX
218869842025-06-22 9:31:19225 days ago1750584679
0x9c551097...59B3933FD
0.0000547 FRAX
218869842025-06-22 9:31:19225 days ago1750584679
0x9c551097...59B3933FD
0.0000547 FRAX
218863692025-06-22 9:10:49225 days ago1750583449
0x9c551097...59B3933FD
0.00005001 FRAX
218863692025-06-22 9:10:49225 days ago1750583449
0x9c551097...59B3933FD
0.00005001 FRAX
218863692025-06-22 9:10:49225 days ago1750583449
0x9c551097...59B3933FD
0.00005001 FRAX
218270002025-06-21 0:11:51227 days ago1750464711
0x9c551097...59B3933FD
0.00004928 FRAX
218270002025-06-21 0:11:51227 days ago1750464711
0x9c551097...59B3933FD
0.00004928 FRAX
218270002025-06-21 0:11:51227 days ago1750464711
0x9c551097...59B3933FD
0.00004928 FRAX
203420282025-05-17 15:12:47261 days ago1747494767
0x9c551097...59B3933FD
0.00013756 FRAX
203420282025-05-17 15:12:47261 days ago1747494767
0x9c551097...59B3933FD
0.00013756 FRAX
203420282025-05-17 15:12:47261 days ago1747494767
0x9c551097...59B3933FD
0.00013756 FRAX
197957052025-05-04 23:42:01274 days ago1746402121
0x9c551097...59B3933FD
0.00016204 FRAX
197957052025-05-04 23:42:01274 days ago1746402121
0x9c551097...59B3933FD
0.00016204 FRAX
197957052025-05-04 23:42:01274 days ago1746402121
0x9c551097...59B3933FD
0.00016204 FRAX
197956552025-05-04 23:40:21274 days ago1746402021
0x9c551097...59B3933FD
0.00016204 FRAX
197956552025-05-04 23:40:21274 days ago1746402021
0x9c551097...59B3933FD
0.00016204 FRAX
197956552025-05-04 23:40:21274 days ago1746402021
0x9c551097...59B3933FD
0.00016204 FRAX
197533682025-05-04 0:10:47275 days ago1746317447
0x9c551097...59B3933FD
0.00015681 FRAX
197533682025-05-04 0:10:47275 days ago1746317447
0x9c551097...59B3933FD
0.00015681 FRAX
197533462025-05-04 0:10:03275 days ago1746317403
0x9c551097...59B3933FD
0 FRAX
197533462025-05-04 0:10:03275 days ago1746317403
0x9c551097...59B3933FD
0 FRAX
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
InterchainTokenFactory

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 1000 runs

Other Settings:
london EvmVersion
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { AddressBytes } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/AddressBytes.sol';
import { Multicall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/Multicall.sol';
import { Upgradable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/upgradable/Upgradable.sol';
import { IInterchainTokenService } from './interfaces/IInterchainTokenService.sol';
import { IInterchainTokenFactory } from './interfaces/IInterchainTokenFactory.sol';
import { ITokenManager } from './interfaces/ITokenManager.sol';
import { IInterchainToken } from './interfaces/IInterchainToken.sol';
import { IERC20Named } from './interfaces/IERC20Named.sol';

/**
 * @title InterchainTokenFactory
 * @notice This contract is responsible for deploying new interchain tokens and managing their token managers.
 */
contract InterchainTokenFactory is IInterchainTokenFactory, Multicall, Upgradable {
    using AddressBytes for address;

    /// @dev This slot contains the storage for this contract in an upgrade-compatible manner
    /// keccak256('InterchainTokenFactory.Slot') - 1;
    bytes32 internal constant INTERCHAIN_TOKEN_FACTORY_SLOT = 0xd4f5c43117c663161acfe6af3208a49856d85e586baf0f60749de2055e001465;

    bytes32 private constant CONTRACT_ID = keccak256('interchain-token-factory');
    bytes32 internal constant PREFIX_CANONICAL_TOKEN_SALT = keccak256('canonical-token-salt');
    bytes32 internal constant PREFIX_INTERCHAIN_TOKEN_SALT = keccak256('interchain-token-salt');
    bytes32 internal constant PREFIX_DEPLOY_APPROVAL = keccak256('deploy-approval');
    bytes32 internal constant PREFIX_CUSTOM_TOKEN_SALT = keccak256('custom-token-salt');
    address private constant TOKEN_FACTORY_DEPLOYER = address(0);

    IInterchainTokenService public immutable interchainTokenService;
    bytes32 public immutable chainNameHash;

    struct DeployApproval {
        address minter;
        bytes32 tokenId;
        string destinationChain;
    }

    /// @dev Storage for this contract
    /// @param approvedDestinationMinters Mapping of approved destination minters
    struct InterchainTokenFactoryStorage {
        mapping(bytes32 => bytes32) approvedDestinationMinters;
    }

    /**
     * @notice Constructs the InterchainTokenFactory contract.
     * @param interchainTokenService_ The address of the interchain token service.
     */
    constructor(address interchainTokenService_) {
        if (interchainTokenService_ == address(0)) revert ZeroAddress();

        interchainTokenService = IInterchainTokenService(interchainTokenService_);

        chainNameHash = interchainTokenService.chainNameHash();
    }

    function _setup(bytes calldata /* data */) internal pure override {}

    /**
     * @notice Getter for the contract id.
     * @return bytes32 The contract id of this contract.
     */
    function contractId() external pure returns (bytes32) {
        return CONTRACT_ID;
    }

    /**
     * @notice Computes the deploy salt for an interchain token.
     * @param deployer The address of the deployer.
     * @param salt A unique identifier to generate the salt.
     * @return deploySalt The deploy salt for the interchain token.
     */
    function interchainTokenDeploySalt(address deployer, bytes32 salt) public view returns (bytes32 deploySalt) {
        deploySalt = keccak256(abi.encode(PREFIX_INTERCHAIN_TOKEN_SALT, chainNameHash, deployer, salt));
    }

    /**
     * @notice Computes the deploy salt for a canonical interchain token.
     * @param tokenAddress The address of the token.
     * @return deploySalt The deploy salt for the interchain token.
     */
    function canonicalInterchainTokenDeploySalt(address tokenAddress) public view returns (bytes32 deploySalt) {
        deploySalt = keccak256(abi.encode(PREFIX_CANONICAL_TOKEN_SALT, chainNameHash, tokenAddress));
    }

    /**
     * @notice Computes the ID for an interchain token based on the deployer and a salt.
     * @param deployer The address that deployed the interchain token.
     * @param salt A unique identifier used in the deployment process.
     * @return tokenId The ID of the interchain token.
     */
    function interchainTokenId(address deployer, bytes32 salt) public view returns (bytes32 tokenId) {
        bytes32 deploySalt = interchainTokenDeploySalt(deployer, salt);
        tokenId = _interchainTokenId(deploySalt);
    }

    /**
     * @notice Computes the ID for a canonical interchain token based on its address.
     * @param tokenAddress The address of the canonical interchain token.
     * @return tokenId The ID of the canonical interchain token.
     */
    function canonicalInterchainTokenId(address tokenAddress) public view returns (bytes32 tokenId) {
        bytes32 deploySalt = canonicalInterchainTokenDeploySalt(tokenAddress);
        tokenId = _interchainTokenId(deploySalt);
    }

    /**
     * @notice Computes the tokenId for an interchain token based on the deploySalt.
     * @param deploySalt The salt used for the deployment.
     * @return tokenId The tokenId of the interchain token.
     */
    function _interchainTokenId(bytes32 deploySalt) internal view returns (bytes32 tokenId) {
        tokenId = interchainTokenService.interchainTokenId(TOKEN_FACTORY_DEPLOYER, deploySalt);
    }

    /**
     * @notice Deploys a new interchain token with specified parameters.
     * @dev Creates a new token and optionally mints an initial amount to a specified minter.
     * This function is `payable` because non-payable functions cannot be called in a multicall that calls other `payable` functions.
     * Cannot deploy tokens with empty supply and no minter.
     * @param salt The unique salt for deploying the token.
     * @param name The name of the token.
     * @param symbol The symbol of the token.
     * @param decimals The number of decimals for the token.
     * @param initialSupply The amount of tokens to mint initially (can be zero), allocated to the msg.sender.
     * @param minter The address to receive the minter and operator role of the token, in addition to ITS. If it is set to `address(0)`,
     * the additional minter isn't set, and can't be added later. This allows creating tokens that are managed only by ITS, reducing trust assumptions.
     * Reverts if the minter is the ITS address since it's already added as a minter.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function deployInterchainToken(
        bytes32 salt,
        string calldata name,
        string calldata symbol,
        uint8 decimals,
        uint256 initialSupply,
        address minter
    ) external payable returns (bytes32 tokenId) {
        address sender = msg.sender;
        bytes32 deploySalt = interchainTokenDeploySalt(sender, salt);
        bytes memory minterBytes = new bytes(0);
        string memory currentChain = '';
        uint256 gasValue = 0;

        if (initialSupply > 0) {
            minterBytes = address(this).toBytes();
        } else if (minter != address(0)) {
            if (minter == address(interchainTokenService)) revert InvalidMinter(minter);

            minterBytes = minter.toBytes();
        } else {
            revert ZeroSupplyToken();
        }

        tokenId = _deployInterchainToken(deploySalt, currentChain, name, symbol, decimals, minterBytes, gasValue);

        if (initialSupply > 0) {
            IInterchainToken token = IInterchainToken(interchainTokenService.registeredTokenAddress(tokenId));
            ITokenManager tokenManager = ITokenManager(interchainTokenService.deployedTokenManager(tokenId));

            token.mint(sender, initialSupply);

            token.transferMintership(minter);
            tokenManager.removeFlowLimiter(address(this));

            // If minter == address(0), we still set it as a flow limiter for consistency with the remote token manager.
            tokenManager.addFlowLimiter(minter);

            tokenManager.transferOperatorship(minter);
        }
    }

    /**
     * @notice Allow the minter to approve the deployer for a remote interchain token deployment that uses a custom destinationMinter address.
     * This ensures that a token deployer can't choose the destinationMinter itself, and requires the approval of the minter to reduce trust assumptions on the deployer.
     * @param deployer The address of the deployer.
     * @param salt The unique salt for deploying the token.
     * @param destinationChain The name of the destination chain.
     * @param destinationMinter The minter address to set on the deployed token on the destination chain. This can be arbitrary bytes
     * since the encoding of the account is dependent on the destination chain.
     */
    function approveDeployRemoteInterchainToken(
        address deployer,
        bytes32 salt,
        string calldata destinationChain,
        bytes calldata destinationMinter
    ) external {
        address minter = msg.sender;
        bytes32 tokenId = interchainTokenId(deployer, salt);

        _checkTokenMinter(tokenId, minter);

        if (bytes(interchainTokenService.trustedAddress(destinationChain)).length == 0) revert InvalidChainName();

        bytes32 approvalKey = _deployApprovalKey(DeployApproval({ minter: minter, tokenId: tokenId, destinationChain: destinationChain }));

        _interchainTokenFactoryStorage().approvedDestinationMinters[approvalKey] = keccak256(destinationMinter);

        emit DeployRemoteInterchainTokenApproval(minter, deployer, tokenId, destinationChain, destinationMinter);
    }

    /**
     * @notice Allows the minter to revoke a deployer's approval for a remote interchain token deployment that uses a custom destinationMinter address.
     * @param deployer The address of the deployer.
     * @param salt The unique salt for deploying the token.
     * @param destinationChain The name of the destination chain.
     */
    function revokeDeployRemoteInterchainToken(address deployer, bytes32 salt, string calldata destinationChain) external {
        address minter = msg.sender;
        bytes32 tokenId = interchainTokenId(deployer, salt);

        bytes32 approvalKey = _deployApprovalKey(DeployApproval({ minter: minter, tokenId: tokenId, destinationChain: destinationChain }));

        delete _interchainTokenFactoryStorage().approvedDestinationMinters[approvalKey];

        emit RevokedDeployRemoteInterchainTokenApproval(minter, deployer, tokenId, destinationChain);
    }

    /**
     * @dev Compute the key for the deploy approval mapping.
     */
    function _deployApprovalKey(DeployApproval memory approval) internal pure returns (bytes32 key) {
        key = keccak256(abi.encode(PREFIX_DEPLOY_APPROVAL, approval));
    }

    /**
     * @dev Use the deploy approval to check that the destination minter is valid and then delete the approval.
     */
    function _useDeployApproval(DeployApproval memory approval, bytes memory destinationMinter) internal {
        bytes32 approvalKey = _deployApprovalKey(approval);

        InterchainTokenFactoryStorage storage slot = _interchainTokenFactoryStorage();

        if (slot.approvedDestinationMinters[approvalKey] != keccak256(destinationMinter)) revert RemoteDeploymentNotApproved();

        delete slot.approvedDestinationMinters[approvalKey];
    }

    /**
     * @notice Deploys a remote interchain token on a specified destination chain. No additional minter is set on the deployed token.
     * Use the `deployRemoteInterchainTokenWithMinter` method to do so.
     * @param salt The unique salt for deploying the token.
     * @param destinationChain The name of the destination chain.
     * @param gasValue The amount of gas to send for the deployment.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function deployRemoteInterchainToken(
        bytes32 salt,
        string calldata destinationChain,
        uint256 gasValue
    ) external payable returns (bytes32 tokenId) {
        return deployRemoteInterchainTokenWithMinter(salt, address(0), destinationChain, new bytes(0), gasValue);
    }

    /**
     * @notice Deploys a remote interchain token on a specified destination chain.
     * @param salt The unique salt for deploying the token.
     * @param minter The address to receive the minter and operator role of the token, in addition to ITS. If the address is `address(0)`,
     * no additional minter is set on the token. Reverts if the minter does not have mint permission for the token.
     * @param destinationChain The name of the destination chain.
     * @param destinationMinter The minter address to set on the deployed token on the destination chain. This can be arbitrary bytes
     * since the encoding of the account is dependent on the destination chain. If this is empty, then the `minter` of the token on the current chain
     * is used as the destination minter, which makes it convenient when deploying to other EVM chains.
     * @param gasValue The amount of gas to send for the deployment.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function deployRemoteInterchainTokenWithMinter(
        bytes32 salt,
        address minter,
        string calldata destinationChain,
        bytes memory destinationMinter,
        uint256 gasValue
    ) public payable returns (bytes32 tokenId) {
        bytes32 deploySalt = interchainTokenDeploySalt(msg.sender, salt);

        if (minter != address(0)) {
            bytes32 deployedTokenId = _interchainTokenId(deploySalt);
            _checkTokenMinter(deployedTokenId, minter);

            if (destinationMinter.length > 0) {
                DeployApproval memory approval = DeployApproval({
                    minter: minter,
                    tokenId: deployedTokenId,
                    destinationChain: destinationChain
                });
                _useDeployApproval(approval, destinationMinter);
            } else {
                destinationMinter = minter.toBytes();
            }
        } else if (destinationMinter.length > 0) {
            // If a destinationMinter is provided, then minter must not be address(0)
            revert InvalidMinter(minter);
        }

        tokenId = _deployRemoteInterchainToken(deploySalt, destinationChain, destinationMinter, gasValue);
    }

    /**
     * @notice Deploys a remote interchain token on a specified destination chain.
     * This method is deprecated and will be removed in the future. Please use the above method instead.
     * @dev originalChainName is only allowed to be '', i.e the current chain.
     * Other source chains are not supported anymore to simplify ITS token deployment behaviour.
     * @param originalChainName The name of the chain where the token originally exists.
     * @param salt The unique salt for deploying the token.
     * @param minter The address to receive the minter and operator role of the token, in addition to ITS. If the address is `address(0)`,
     * no additional minter is set on the token. Reverts if the minter does not have mint permission for the token.
     * @param destinationChain The name of the destination chain.
     * @param gasValue The amount of gas to send for the deployment.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function deployRemoteInterchainToken(
        string calldata originalChainName,
        bytes32 salt,
        address minter,
        string calldata destinationChain,
        uint256 gasValue
    ) external payable returns (bytes32 tokenId) {
        if (bytes(originalChainName).length != 0) revert NotSupported();

        tokenId = deployRemoteInterchainTokenWithMinter(salt, minter, destinationChain, new bytes(0), gasValue);
    }

    /**
     * @notice Checks that the minter is registered for the token on the current chain and not the ITS address.
     * @param tokenId The unique identifier for the token. The token must be an interchain token deployed via ITS.
     * @param minter The address to be checked as a minter for the interchain token.
     */
    function _checkTokenMinter(bytes32 tokenId, address minter) internal view {
        // Ensure that the minter is registered for the token on the current chain
        IInterchainToken token = IInterchainToken(interchainTokenService.registeredTokenAddress(tokenId));
        if (!token.isMinter(minter)) revert NotMinter(minter);

        // Sanity check to prevent accidental use of the current ITS address as the token minter
        if (minter == address(interchainTokenService)) revert InvalidMinter(minter);
    }

    /**
     * @notice Deploys a new interchain token with specified parameters.
     * @param salt The unique salt for deploying the token.
     * @param destinationChain The name of the destination chain.
     * @param tokenName The name of the token.
     * @param tokenSymbol The symbol of the token.
     * @param tokenDecimals The number of decimals for the token.
     * @param minter The address to receive the initially minted tokens.
     * @param gasValue The amount of gas to send for the transfer.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function _deployInterchainToken(
        bytes32 salt,
        string memory destinationChain,
        string memory tokenName,
        string memory tokenSymbol,
        uint8 tokenDecimals,
        bytes memory minter,
        uint256 gasValue
    ) internal returns (bytes32 tokenId) {
        // slither-disable-next-line arbitrary-send-eth
        tokenId = interchainTokenService.deployInterchainToken{ value: gasValue }(
            salt,
            destinationChain,
            tokenName,
            tokenSymbol,
            tokenDecimals,
            minter,
            gasValue
        );
    }

    /**
     * @notice Deploys a remote interchain token on a specified destination chain.
     * @param deploySalt The salt used for the deployment.
     * @param destinationChain The name of the destination chain.
     * @param minter The address to receive the minter and operator role of the token, in addition to ITS.
     * @param gasValue The amount of gas to send for the deployment.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function _deployRemoteInterchainToken(
        bytes32 deploySalt,
        string calldata destinationChain,
        bytes memory minter,
        uint256 gasValue
    ) internal returns (bytes32 tokenId) {
        // Ensure that a token is registered locally for the tokenId before allowing a remote deployment
        bytes32 expectedTokenId = _interchainTokenId(deploySalt);
        address tokenAddress = interchainTokenService.registeredTokenAddress(expectedTokenId);

        // The local token must expose the name, symbol, and decimals metadata
        (string memory name, string memory symbol, uint8 decimals) = _getTokenMetadata(tokenAddress);

        tokenId = _deployInterchainToken(deploySalt, destinationChain, name, symbol, decimals, minter, gasValue);
        if (tokenId != expectedTokenId) revert InvalidTokenId(tokenId, expectedTokenId);
    }

    /**
     * @notice Registers a canonical token as an interchain token and deploys its token manager.
     * @dev This function is `payable` because non-payable functions cannot be called in a multicall that calls other `payable` functions.
     * @param tokenAddress The address of the canonical token.
     * @return tokenId The tokenId corresponding to the registered canonical token.
     */
    function registerCanonicalInterchainToken(address tokenAddress) external payable returns (bytes32 tokenId) {
        bytes32 deploySalt = canonicalInterchainTokenDeploySalt(tokenAddress);
        // No custom operator is set for canonical token registration
        bytes memory linkParams = '';

        // Ensure that the ERC20 token has metadata before registering it
        // slither-disable-next-line unused-return
        _getTokenMetadata(tokenAddress);

        tokenId = interchainTokenService.registerCustomToken(deploySalt, tokenAddress, TokenManagerType.LOCK_UNLOCK, linkParams);
    }

    /**
     * @notice Retrieves the metadata of an ERC20 token. Reverts with `NotToken` error if metadata is not available.
     * @param tokenAddress The address of the token.
     * @return name The name of the token.
     * @return symbol The symbol of the token.
     * @return decimals The number of decimals for the token.
     */
    function _getTokenMetadata(address tokenAddress) internal view returns (string memory name, string memory symbol, uint8 decimals) {
        IERC20Named token = IERC20Named(tokenAddress);

        try token.name() returns (string memory name_) {
            name = name_;
        } catch {
            revert NotToken(tokenAddress);
        }

        try token.symbol() returns (string memory symbol_) {
            symbol = symbol_;
        } catch {
            revert NotToken(tokenAddress);
        }

        try token.decimals() returns (uint8 decimals_) {
            decimals = decimals_;
        } catch {
            revert NotToken(tokenAddress);
        }
    }

    /**
     * @notice Deploys a canonical interchain token on a remote chain.
     * @param originalTokenAddress The address of the original token on the original chain.
     * @param destinationChain The name of the chain where the token will be deployed.
     * @param gasValue The gas amount to be sent for deployment.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function deployRemoteCanonicalInterchainToken(
        address originalTokenAddress,
        string calldata destinationChain,
        uint256 gasValue
    ) public payable returns (bytes32 tokenId) {
        // No additional minter is set on a canonical token deployment
        bytes memory minter = '';
        bytes32 deploySalt = canonicalInterchainTokenDeploySalt(originalTokenAddress);

        tokenId = _deployRemoteInterchainToken(deploySalt, destinationChain, minter, gasValue);
    }

    /**
     * @notice Deploys a canonical interchain token on a remote chain.
     * This method is deprecated and will be removed in the future. Please use the above method instead.
     * @dev originalChain is only allowed to be '', i.e the current chain.
     * Other source chains are not supported anymore to simplify ITS token deployment behaviour.
     * @param originalChain The name of the chain where the token originally exists.
     * @param originalTokenAddress The address of the original token on the original chain.
     * @param destinationChain The name of the chain where the token will be deployed.
     * @param gasValue The gas amount to be sent for deployment.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function deployRemoteCanonicalInterchainToken(
        string calldata originalChain,
        address originalTokenAddress,
        string calldata destinationChain,
        uint256 gasValue
    ) external payable returns (bytes32 tokenId) {
        if (bytes(originalChain).length != 0) revert NotSupported();

        tokenId = deployRemoteCanonicalInterchainToken(originalTokenAddress, destinationChain, gasValue);
    }

    /**
     * @notice Computes the deploy salt for a linked interchain token.
     * @param deployer The address of the deployer.
     * @param salt The unique salt for deploying the token.
     * @return deploySalt The deploy salt for the interchain token.
     */
    function linkedTokenDeploySalt(address deployer, bytes32 salt) public view returns (bytes32 deploySalt) {
        deploySalt = keccak256(abi.encode(PREFIX_CUSTOM_TOKEN_SALT, chainNameHash, deployer, salt));
    }

    /**
     * @notice Computes the ID for a linked token based on its address.
     * @param deployer The address of the deployer.
     * @param salt The unique salt for deploying the token.
     * @return tokenId The ID of the linked token.
     */
    function linkedTokenId(address deployer, bytes32 salt) external view returns (bytes32 tokenId) {
        bytes32 deploySalt = linkedTokenDeploySalt(deployer, salt);
        tokenId = _interchainTokenId(deploySalt);
    }

    /**
     * @notice Register an existing ERC20 token under a `tokenId` computed from the provided `salt`.
     * A token metadata registration message will also be sent to the ITS Hub.
     * This token can then be linked to remote tokens on different chains by submitting the `linkToken` function from the same `msg.sender` and using the same `salt`.
     * @dev This function is marked as payable since it can be called within a multicall with other payable methods.
     * @param salt The salt used to derive the tokenId for the custom token registration. The same salt must be used when linking this token on other chains under the same tokenId.
     * @param tokenAddress The token address of the token being registered.
     * @param tokenManagerType The token manager type used for the token link.
     * @param operator The operator of the token manager.
     */
    function registerCustomToken(
        bytes32 salt,
        address tokenAddress,
        TokenManagerType tokenManagerType,
        address operator
    ) external payable returns (bytes32 tokenId) {
        bytes32 deploySalt = linkedTokenDeploySalt(msg.sender, salt);
        bytes memory linkParams = '';
        if (operator != address(0)) {
            linkParams = operator.toBytes();
        }

        tokenId = interchainTokenService.registerCustomToken(deploySalt, tokenAddress, tokenManagerType, linkParams);
    }

    /**
     * @notice Links a remote token on `destinationChain` to a local token corresponding to the `tokenId` computed from the provided `salt`.
     * A local token must have been registered first using the `registerCustomToken` function.
     * @param salt The salt used to derive the tokenId for the custom token registration. The same salt must be used when linking this token on other chains under the same tokenId.
     * @param destinationChain The name of the destination chain.
     * @param destinationTokenAddress The token address of the token being linked.
     * @param tokenManagerType The token manager type used for the token link.
     * @param linkParams Additional parameters for the token link depending on the destination chain. For EVM destination chains, this is an optional custom operator address.
     * @param gasValue The cross-chain gas value used to link the token on the destination chain.
     * @return tokenId The tokenId corresponding to the linked token.
     */
    function linkToken(
        bytes32 salt,
        string calldata destinationChain,
        bytes calldata destinationTokenAddress,
        TokenManagerType tokenManagerType,
        bytes calldata linkParams,
        uint256 gasValue
    ) external payable returns (bytes32 tokenId) {
        bytes32 deploySalt = linkedTokenDeploySalt(msg.sender, salt);
        tokenId = interchainTokenService.linkToken{ value: gasValue }(
            deploySalt,
            destinationChain,
            destinationTokenAddress,
            tokenManagerType,
            linkParams,
            gasValue
        );
    }

    /********************\
    |* Pure Key Getters *|
    \********************/

    /**
     * @notice Gets the specific storage location for preventing upgrade collisions
     * @return slot containing the storage struct
     */
    function _interchainTokenFactoryStorage() private pure returns (InterchainTokenFactoryStorage storage slot) {
        assembly {
            slot.slot := INTERCHAIN_TOKEN_FACTORY_SLOT
        }
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @title IAxelarExecutable
 * @dev Interface for a contract that is executable by Axelar Gateway's cross-chain message passing.
 * It defines a standard interface to execute commands sent from another chain.
 */
interface IAxelarExecutable {
    /**
     * @dev Thrown when a function is called with an invalid address.
     */
    error InvalidAddress();

    /**
     * @dev Thrown when the call is not approved by the Axelar Gateway.
     */
    error NotApprovedByGateway();

    /**
     * @notice Returns the address of the AxelarGateway contract.
     * @return The Axelar Gateway contract associated with this executable contract.
     */
    function gateway() external view returns (IAxelarGateway);

    /**
     * @notice Executes the specified command sent from another chain.
     * @dev This function is called by the Axelar Gateway to carry out cross-chain commands.
     * Reverts if the call is not approved by the gateway or other checks fail.
     * @param commandId The identifier of the command to execute.
     * @param sourceChain The name of the source chain from where the command originated.
     * @param sourceAddress The address on the source chain that sent the command.
     * @param payload The payload of the command to be executed. This typically includes the function selector and encoded arguments.
     */
    function execute(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes calldata payload
    ) external;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IAxelarExecutable } from './IAxelarExecutable.sol';

/**
 * @title IAxelarExpressExecutable
 * @notice Interface for the Axelar Express Executable contract.
 */
interface IAxelarExpressExecutable is IAxelarExecutable {
    // Custom errors
    error AlreadyExecuted();
    error InsufficientValue();

    /**
     * @notice Emitted when an express execution is successfully performed.
     * @param commandId The unique identifier for the command.
     * @param sourceChain The source chain.
     * @param sourceAddress The source address.
     * @param payloadHash The hash of the payload.
     * @param expressExecutor The address of the express executor.
     */
    event ExpressExecuted(
        bytes32 indexed commandId,
        string sourceChain,
        string sourceAddress,
        bytes32 payloadHash,
        address indexed expressExecutor
    );

    /**
     * @notice Emitted when an express execution is fulfilled.
     * @param commandId The commandId for the contractCall.
     * @param sourceChain The source chain.
     * @param sourceAddress The source address.
     * @param payloadHash The hash of the payload.
     * @param expressExecutor The address of the express executor.
     */
    event ExpressExecutionFulfilled(
        bytes32 indexed commandId,
        string sourceChain,
        string sourceAddress,
        bytes32 payloadHash,
        address indexed expressExecutor
    );

    /**
     * @notice Returns the express executor for a given command.
     * @param commandId The commandId for the contractCall.
     * @param sourceChain The source chain.
     * @param sourceAddress The source address.
     * @param payloadHash The hash of the payload.
     * @return expressExecutor The address of the express executor.
     */
    function getExpressExecutor(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes32 payloadHash
    ) external view returns (address expressExecutor);

    /**
     * @notice Express executes a contract call.
     * @param commandId The commandId for the contractCall.
     * @param sourceChain The source chain.
     * @param sourceAddress The source address.
     * @param payload The payload data.
     */
    function expressExecute(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes calldata payload
    ) external payable;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title IAxelarGateway
 * @dev Interface for the Axelar Gateway that supports general message passing and contract call execution.
 */
interface IAxelarGateway {
    /**
     * @notice Emitted when a contract call is made through the gateway.
     * @dev Logs the attempt to call a contract on another chain.
     * @param sender The address of the sender who initiated the contract call.
     * @param destinationChain The name of the destination chain.
     * @param destinationContractAddress The address of the contract on the destination chain.
     * @param payloadHash The keccak256 hash of the sent payload data.
     * @param payload The payload data used for the contract call.
     */
    event ContractCall(
        address indexed sender,
        string destinationChain,
        string destinationContractAddress,
        bytes32 indexed payloadHash,
        bytes payload
    );

    /**
     * @notice Sends a contract call to another chain.
     * @dev Initiates a cross-chain contract call through the gateway to the specified destination chain and contract.
     * @param destinationChain The name of the destination chain.
     * @param contractAddress The address of the contract on the destination chain.
     * @param payload The payload data to be used in the contract call.
     */
    function callContract(
        string calldata destinationChain,
        string calldata contractAddress,
        bytes calldata payload
    ) external;

    /**
     * @notice Checks if a contract call is approved.
     * @dev Determines whether a given contract call, identified by the commandId and payloadHash, is approved.
     * @param commandId The identifier of the command to check.
     * @param sourceChain The name of the source chain.
     * @param sourceAddress The address of the sender on the source chain.
     * @param contractAddress The address of the contract where the call will be executed.
     * @param payloadHash The keccak256 hash of the payload data.
     * @return True if the contract call is approved, false otherwise.
     */
    function isContractCallApproved(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        address contractAddress,
        bytes32 payloadHash
    ) external view returns (bool);

    /**
     * @notice Validates and approves a contract call.
     * @dev Validates the given contract call information and marks it as approved if valid.
     * @param commandId The identifier of the command to validate.
     * @param sourceChain The name of the source chain.
     * @param sourceAddress The address of the sender on the source chain.
     * @param payloadHash The keccak256 hash of the payload data.
     * @return True if the contract call is validated and approved, false otherwise.
     */
    function validateContractCall(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes32 payloadHash
    ) external returns (bool);

    /**
     * @notice Checks if a command has been executed.
     * @dev Determines whether a command, identified by the commandId, has been executed.
     * @param commandId The identifier of the command to check.
     * @return True if the command has been executed, false otherwise.
     */
    function isCommandExecuted(bytes32 commandId) external view returns (bool);
}

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

pragma solidity ^0.8.0;

import { IAxelarExpressExecutable } from './IAxelarExpressExecutable.sol';

/**
 * @title IAxelarValuedExpressExecutable
 * @dev Interface for the Axelar Valued Express Executable contract.
 */
interface IAxelarValuedExpressExecutable is IAxelarExpressExecutable {
    /**
     * @dev Returns the value (token address and amount) associated with a contract call
     * @param sourceChain The source chain.
     * @param sourceAddress The source address.
     * @param payload The payload data.
     * @return tokenAddress The address of the token used.
     * @return value The value associated with the contract call.
     */
    function contractCallValue(
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes calldata payload
    ) external view returns (address tokenAddress, uint256 value);
}

File 6 of 34 : IContractIdentifier.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// General interface for upgradable contracts
interface IContractIdentifier {
    /**
     * @notice Returns the contract ID. It can be used as a check during upgrades.
     * @dev Meant to be overridden in derived contracts.
     * @return bytes32 The contract ID
     */
    function contractId() external pure returns (bytes32);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IContractIdentifier } from './IContractIdentifier.sol';

interface IImplementation is IContractIdentifier {
    error NotProxy();

    function setup(bytes calldata data) external;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title IInterchainAddressTracker
 * @dev Manages trusted addresses by chain, keeps track of addresses supported by the Axelar gateway contract
 */
interface IInterchainAddressTracker {
    error ZeroAddress();
    error LengthMismatch();
    error ZeroStringLength();
    error UntrustedChain();

    event TrustedAddressSet(string chain, string address_);
    event TrustedAddressRemoved(string chain);

    /**
     * @dev Gets the name of the chain this is deployed at
     */
    function chainName() external view returns (string memory);

    /**
     * @dev Gets the trusted address at a remote chain
     * @param chain Chain name of the remote chain
     * @return trustedAddress_ The trusted address for the chain. Returns '' if the chain is untrusted
     */
    function trustedAddress(string memory chain) external view returns (string memory trustedAddress_);

    /**
     * @dev Gets the trusted address hash for a chain
     * @param chain Chain name
     * @return trustedAddressHash_ the hash of the trusted address for that chain
     */
    function trustedAddressHash(string memory chain) external view returns (bytes32 trustedAddressHash_);

    /**
     * @dev Checks whether the interchain sender is a trusted address
     * @param chain Chain name of the sender
     * @param address_ Address of the sender
     * @return bool true if the sender chain/address are trusted, false otherwise
     */
    function isTrustedAddress(string calldata chain, string calldata address_) external view returns (bool);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title IMulticall
 * @notice This contract is a multi-functional smart contract which allows for multiple
 * contract calls in a single transaction.
 */
interface IMulticall {
    error MulticallFailed();

    /**
     * @notice Performs multiple delegate calls and returns the results of all calls as an array
     * @dev This function requires that the contract has sufficient balance for the delegate calls.
     * If any of the calls fail, the function will revert with the failure message.
     * @param data An array of encoded function calls
     * @return results An bytes array with the return data of each function call
     */
    function multicall(bytes[] calldata data) external payable returns (bytes[] memory results);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title IOwnable Interface
 * @notice IOwnable is an interface that abstracts the implementation of a
 * contract with ownership control features. It's commonly used in upgradable
 * contracts and includes the functionality to get current owner, transfer
 * ownership, and propose and accept ownership.
 */
interface IOwnable {
    error NotOwner();
    error InvalidOwner();
    error InvalidOwnerAddress();

    event OwnershipTransferStarted(address indexed newOwner);
    event OwnershipTransferred(address indexed newOwner);

    /**
     * @notice Returns the current owner of the contract.
     * @return address The address of the current owner
     */
    function owner() external view returns (address);

    /**
     * @notice Returns the address of the pending owner of the contract.
     * @return address The address of the pending owner
     */
    function pendingOwner() external view returns (address);

    /**
     * @notice Transfers ownership of the contract to a new address
     * @param newOwner The address to transfer ownership to
     */
    function transferOwnership(address newOwner) external;

    /**
     * @notice Proposes to transfer the contract's ownership to a new address.
     * The new owner needs to accept the ownership explicitly.
     * @param newOwner The address to transfer ownership to
     */
    function proposeOwnership(address newOwner) external;

    /**
     * @notice Transfers ownership to the pending owner.
     * @dev Can only be called by the pending owner
     */
    function acceptOwnership() external;
}

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

pragma solidity ^0.8.0;

/**
 * @title Pausable
 * @notice This contract provides a mechanism to halt the execution of specific functions
 * if a pause condition is activated.
 */
interface IPausable {
    event Paused(address indexed account);
    event Unpaused(address indexed account);

    error Pause();
    error NotPaused();

    /**
     * @notice Check if the contract is paused
     * @return paused A boolean representing the pause status. True if paused, false otherwise.
     */
    function paused() external view returns (bool);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title IRolesBase Interface
 * @notice IRolesBase is an interface that abstracts the implementation of a
 * contract with role control internal functions.
 */
interface IRolesBase {
    error MissingRole(address account, uint8 role);
    error MissingAllRoles(address account, uint256 accountRoles);
    error MissingAnyOfRoles(address account, uint256 accountRoles);

    error InvalidProposedRoles(address fromAccount, address toAccount, uint256 accountRoles);

    event RolesProposed(address indexed fromAccount, address indexed toAccount, uint256 accountRoles);
    event RolesAdded(address indexed account, uint256 accountRoles);
    event RolesRemoved(address indexed account, uint256 accountRoles);

    /**
     * @notice Checks if an account has a role.
     * @param account The address to check
     * @param role The role to check
     * @return True if the account has the role, false otherwise
     */
    function hasRole(address account, uint8 role) external view returns (bool);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IOwnable } from './IOwnable.sol';
import { IImplementation } from './IImplementation.sol';

// General interface for upgradable contracts
interface IUpgradable is IOwnable, IImplementation {
    error InvalidCodeHash();
    error InvalidImplementation();
    error SetupFailed();

    event Upgraded(address indexed newImplementation);

    function implementation() external view returns (address);

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title AddressBytesUtils
 * @dev This library provides utility functions to convert between `address` and `bytes`.
 */
library AddressBytes {
    error InvalidBytesLength(bytes bytesAddress);

    /**
     * @dev Converts a bytes address to an address type.
     * @param bytesAddress The bytes representation of an address
     * @return addr The converted address
     */
    function toAddress(bytes memory bytesAddress) internal pure returns (address addr) {
        if (bytesAddress.length != 20) revert InvalidBytesLength(bytesAddress);

        assembly {
            addr := mload(add(bytesAddress, 20))
        }
    }

    /**
     * @dev Converts an address to bytes.
     * @param addr The address to be converted
     * @return bytesAddress The bytes representation of the address
     */
    function toBytes(address addr) internal pure returns (bytes memory bytesAddress) {
        bytesAddress = new bytes(20);
        // 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.
        assembly {
            mstore(add(bytesAddress, 20), addr)
            mstore(bytesAddress, 20)
        }
    }
}

File 16 of 34 : Implementation.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IImplementation } from '../interfaces/IImplementation.sol';

/**
 * @title Implementation
 * @notice This contract serves as a base for other contracts and enforces a proxy-first access restriction.
 * @dev Derived contracts must implement the setup function.
 */
abstract contract Implementation is IImplementation {
    address private immutable implementationAddress;

    /**
     * @dev Contract constructor that sets the implementation address to the address of this contract.
     */
    constructor() {
        implementationAddress = address(this);
    }

    /**
     * @dev Modifier to require the caller to be the proxy contract.
     * Reverts if the caller is the current contract (i.e., the implementation contract itself).
     */
    modifier onlyProxy() {
        if (implementationAddress == address(this)) revert NotProxy();
        _;
    }

    /**
     * @notice Initializes contract parameters.
     * This function is intended to be overridden by derived contracts.
     * The overriding function must have the onlyProxy modifier.
     * @param params The parameters to be used for initialization
     */
    function setup(bytes calldata params) external virtual;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IImplementation } from '../interfaces/IImplementation.sol';
import { IUpgradable } from '../interfaces/IUpgradable.sol';
import { Ownable } from '../utils/Ownable.sol';
import { Implementation } from './Implementation.sol';

/**
 * @title Upgradable Contract
 * @notice This contract provides an interface for upgradable smart contracts and includes the functionality to perform upgrades.
 */
abstract contract Upgradable is Ownable, Implementation, IUpgradable {
    // bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)
    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @notice Constructor sets the implementation address to the address of the contract itself
     * @dev This is used in the onlyProxy modifier to prevent certain functions from being called directly
     * on the implementation contract itself.
     * @dev The owner is initially set as address(1) because the actual owner is set within the proxy. It is not
     * set as the zero address because Ownable is designed to throw an error for ownership transfers to the zero address.
     */
    constructor() Ownable(address(1)) {}

    /**
     * @notice Returns the address of the current implementation
     * @return implementation_ Address of the current implementation
     */
    function implementation() public view returns (address implementation_) {
        assembly {
            implementation_ := sload(_IMPLEMENTATION_SLOT)
        }
    }

    /**
     * @notice Upgrades the contract to a new implementation
     * @param newImplementation The address of the new implementation contract
     * @param newImplementationCodeHash The codehash of the new implementation contract
     * @param params Optional setup parameters for the new implementation contract
     * @dev This function is only callable by the owner.
     */
    function upgrade(
        address newImplementation,
        bytes32 newImplementationCodeHash,
        bytes calldata params
    ) external override onlyOwner {
        if (IUpgradable(newImplementation).contractId() != IUpgradable(implementation()).contractId())
            revert InvalidImplementation();

        if (newImplementationCodeHash != newImplementation.codehash) revert InvalidCodeHash();

        assembly {
            sstore(_IMPLEMENTATION_SLOT, newImplementation)
        }

        emit Upgraded(newImplementation);

        if (params.length > 0) {
            // slither-disable-next-line controlled-delegatecall
            (bool success, ) = newImplementation.delegatecall(abi.encodeWithSelector(this.setup.selector, params));

            if (!success) revert SetupFailed();
        }
    }

    /**
     * @notice Sets up the contract with initial data
     * @param data Initialization data for the contract
     * @dev This function is only callable by the proxy contract.
     */
    function setup(bytes calldata data) external override(IImplementation, Implementation) onlyProxy {
        _setup(data);
    }

    /**
     * @notice Internal function to set up the contract with initial data
     * @param data Initialization data for the contract
     * @dev This function should be implemented in derived contracts.
     */
    function _setup(bytes calldata data) internal virtual;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IMulticall } from '../interfaces/IMulticall.sol';

/**
 * @title Multicall
 * @notice This contract is a multi-functional smart contract which allows for multiple
 * contract calls in a single transaction.
 */
contract Multicall is IMulticall {
    /**
     * @notice Performs multiple delegate calls and returns the results of all calls as an array
     * @dev This function requires that the contract has sufficient balance for the delegate calls.
     * If any of the calls fail, the function will revert with the failure message.
     * @param data An array of encoded function calls
     * @return results An bytes array with the return data of each function call
     */
    function multicall(bytes[] calldata data) public payable returns (bytes[] memory results) {
        results = new bytes[](data.length);
        bool success;
        bytes memory result;
        for (uint256 i = 0; i < data.length; ++i) {
            // slither-disable-next-line calls-loop,delegatecall-loop
            (success, result) = address(this).delegatecall(data[i]);

            if (!success) {
                if (result.length == 0) revert MulticallFailed();
                assembly {
                    revert(add(32, result), mload(result))
                }
            }

            results[i] = result;
        }
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IOwnable } from '../interfaces/IOwnable.sol';

/**
 * @title Ownable
 * @notice A contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The owner account is set through ownership transfer. This module makes
 * it possible to transfer the ownership of the contract to a new account in one
 * step, as well as to an interim pending owner. In the second flow the ownership does not
 * change until the pending owner accepts the ownership transfer.
 */
abstract contract Ownable is IOwnable {
    // keccak256('owner')
    bytes32 internal constant _OWNER_SLOT = 0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0;
    // keccak256('ownership-transfer')
    bytes32 internal constant _OWNERSHIP_TRANSFER_SLOT =
        0x9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d1;

    /**
     * @notice Initializes the contract by transferring ownership to the owner parameter.
     * @param _owner Address to set as the initial owner of the contract
     */
    constructor(address _owner) {
        _transferOwnership(_owner);
    }

    /**
     * @notice Modifier that throws an error if called by any account other than the owner.
     */
    modifier onlyOwner() {
        if (owner() != msg.sender) revert NotOwner();

        _;
    }

    /**
     * @notice Returns the current owner of the contract.
     * @return owner_ The current owner of the contract
     */
    function owner() public view returns (address owner_) {
        assembly {
            owner_ := sload(_OWNER_SLOT)
        }
    }

    /**
     * @notice Returns the pending owner of the contract.
     * @return owner_ The pending owner of the contract
     */
    function pendingOwner() public view returns (address owner_) {
        assembly {
            owner_ := sload(_OWNERSHIP_TRANSFER_SLOT)
        }
    }

    /**
     * @notice Transfers ownership of the contract to a new account `newOwner`.
     * @dev Can only be called by the current owner.
     * @param newOwner The address to transfer ownership to
     */
    function transferOwnership(address newOwner) external virtual onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @notice Propose to transfer ownership of the contract to a new account `newOwner`.
     * @dev Can only be called by the current owner. The ownership does not change
     * until the new owner accepts the ownership transfer.
     * @param newOwner The address to transfer ownership to
     */
    function proposeOwnership(address newOwner) external virtual onlyOwner {
        if (newOwner == address(0)) revert InvalidOwnerAddress();

        emit OwnershipTransferStarted(newOwner);

        assembly {
            sstore(_OWNERSHIP_TRANSFER_SLOT, newOwner)
        }
    }

    /**
     * @notice Accepts ownership of the contract.
     * @dev Can only be called by the pending owner
     */
    function acceptOwnership() external virtual {
        address newOwner = pendingOwner();
        if (newOwner != msg.sender) revert InvalidOwner();

        _transferOwnership(newOwner);
    }

    /**
     * @notice Internal function to transfer ownership of the contract to a new account `newOwner`.
     * @dev Called in the constructor to set the initial owner.
     * @param newOwner The address to transfer ownership to
     */
    function _transferOwnership(address newOwner) internal virtual {
        if (newOwner == address(0)) revert InvalidOwnerAddress();

        emit OwnershipTransferred(newOwner);

        assembly {
            sstore(_OWNER_SLOT, newOwner)
            sstore(_OWNERSHIP_TRANSFER_SLOT, 0)
        }
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IInterchainAddressTracker } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IInterchainAddressTracker.sol';

/**
 * @title IAddressTracker Interface
 * @notice This interface allows setting and removing a trusted address for a specific chain.
 * @dev Extends the IInterchainAddressTracker interface.
 */
interface IAddressTracker is IInterchainAddressTracker {
    /**
     * @notice Sets the trusted address for the specified chain.
     * @param chain Chain name to be trusted.
     * @param address_ Trusted address to be added for the chain.
     */
    function setTrustedAddress(string memory chain, string memory address_) external;

    /**
     * @notice Remove the trusted address of the chain.
     * @param chain Chain name to remove the trusted address for.
     */
    function removeTrustedAddress(string calldata chain) external;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title IBaseTokenManager
 * @notice This contract is defines the base token manager interface implemented by all token managers.
 */
interface IBaseTokenManager {
    /**
     * @notice A function that returns the token id.
     */
    function interchainTokenId() external view returns (bytes32);

    /**
     * @notice A function that should return the address of the token.
     * Must be overridden in the inheriting contract.
     * @return address address of the token.
     */
    function tokenAddress() external view returns (address);

    /**
     * @notice A function that should return the token address from the init params.
     */
    function getTokenAddressFromParams(bytes calldata params) external pure returns (address);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title IERC20MintableBurnable Interface
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20MintableBurnable {
    /**
     * @notice Function to mint new tokens.
     * @dev Can only be called by the minter address.
     * @param to The address that will receive the minted tokens.
     * @param amount The amount of tokens to mint.
     */
    function mint(address to, uint256 amount) external;

    /**
     * @notice Function to burn tokens.
     * @dev Can only be called by the minter address.
     * @param from The address that will have its tokens burnt.
     * @param amount The amount of tokens to burn.
     */
    function burn(address from, uint256 amount) external;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC20 } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IERC20.sol';

/**
 * @title IERC20Named Interface
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Named is IERC20 {
    /**
     * @notice Getter for the name of the token.
     * @return string Name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @notice Getter for the symbol of the token.
     * @return string The symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @notice Getter for the decimals of the token.
     * @return uint8 The decimals of the token.
     */
    function decimals() external view returns (uint8);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title FlowLimit Interface
 * @notice Interface for flow limit logic for interchain token transfers.
 */
interface IFlowLimit {
    error FlowLimitExceeded(uint256 limit, uint256 flowAmount, address tokenManager);
    error FlowAdditionOverflow(uint256 flowAmount, uint256 flowToAdd, address tokenManager);
    error FlowLimitOverflow(uint256 flowLimit, uint256 flowToCompare, address tokenManager);

    event FlowLimitSet(bytes32 indexed tokenId, address operator, uint256 flowLimit_);

    /**
     * @notice Returns the current flow limit.
     * @return flowLimit_ The current flow limit value.
     */
    function flowLimit() external view returns (uint256 flowLimit_);

    /**
     * @notice Returns the current flow out amount.
     * @return flowOutAmount_ The current flow out amount.
     */
    function flowOutAmount() external view returns (uint256 flowOutAmount_);

    /**
     * @notice Returns the current flow in amount.
     * @return flowInAmount_ The current flow in amount.
     */
    function flowInAmount() external view returns (uint256 flowInAmount_);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IInterchainTokenStandard } from './IInterchainTokenStandard.sol';
import { IMinter } from './IMinter.sol';
import { IERC20MintableBurnable } from './IERC20MintableBurnable.sol';
import { IERC20Named } from './IERC20Named.sol';

/**
 * @title IInterchainToken interface
 * @dev Extends IInterchainTokenStandard and IMinter.
 */
interface IInterchainToken is IInterchainTokenStandard, IMinter, IERC20MintableBurnable, IERC20Named {
    error InterchainTokenServiceAddressZero();
    error TokenIdZero();
    error TokenNameEmpty();
    error TokenSymbolEmpty();
    error AlreadyInitialized();

    /**
     * @notice Getter for the interchain token service contract.
     * @dev Needs to be overwitten.
     * @return interchainTokenServiceAddress The interchain token service address.
     */
    function interchainTokenService() external view returns (address interchainTokenServiceAddress);

    /**
     * @notice Getter for the tokenId used for this token.
     * @dev Needs to be overwitten.
     * @return tokenId_ The tokenId for this token.
     */
    function interchainTokenId() external view returns (bytes32 tokenId_);

    /**
     * @notice Setup function to initialize contract parameters.
     * @param tokenId_ The tokenId of the token.
     * @param minter The address of the token minter.
     * @param tokenName The name of the token.
     * @param tokenSymbol The symbopl of the token.
     * @param tokenDecimals The decimals of the token.
     */
    function init(bytes32 tokenId_, address minter, string calldata tokenName, string calldata tokenSymbol, uint8 tokenDecimals) external;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IMulticall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IMulticall.sol';
import { IUpgradable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IUpgradable.sol';

import { IInterchainTokenService } from './IInterchainTokenService.sol';
import { ITokenManagerType } from './ITokenManagerType.sol';

/**
 * @title IInterchainTokenFactory Interface
 * @notice This interface defines functions for deploying new interchain tokens and managing their token managers.
 */
interface IInterchainTokenFactory is ITokenManagerType, IUpgradable, IMulticall {
    error ZeroAddress();
    error InvalidChainName();
    error InvalidMinter(address minter);
    error NotMinter(address minter);
    error NotSupported();
    error RemoteDeploymentNotApproved();
    error InvalidTokenId(bytes32 tokenId, bytes32 expectedTokenId);
    error ZeroSupplyToken();
    error NotToken(address tokenAddress);

    /// @notice Emitted when a minter approves a deployer for a remote interchain token deployment that uses a custom destinationMinter address.
    event DeployRemoteInterchainTokenApproval(
        address indexed minter,
        address indexed deployer,
        bytes32 indexed tokenId,
        string destinationChain,
        bytes destinationMinter
    );

    /// @notice Emitted when a minter revokes a deployer's approval for a remote interchain token deployment that uses a custom destinationMinter address.
    event RevokedDeployRemoteInterchainTokenApproval(
        address indexed minter,
        address indexed deployer,
        bytes32 indexed tokenId,
        string destinationChain
    );

    /**
     * @notice Returns the address of the interchain token service.
     * @return IInterchainTokenService The address of the interchain token service.
     */
    function interchainTokenService() external view returns (IInterchainTokenService);

    /**
     * @notice Returns the hash of the chain name.
     * @return bytes32 The hash of the chain name.
     */
    function chainNameHash() external view returns (bytes32);

    /**
     * @notice Computes the deploy salt for an interchain token.
     * @param deployer The address of the deployer.
     * @param salt A unique identifier to generate the salt.
     * @return deploySalt The deploy salt for the interchain token.
     */
    function interchainTokenDeploySalt(address deployer, bytes32 salt) external view returns (bytes32 deploySalt);

    /**
     * @notice Computes the ID for an interchain token based on the deployer and a salt.
     * @param deployer The address that deployed the interchain token.
     * @param salt A unique identifier used in the deployment process.
     * @return tokenId The ID of the interchain token.
     */
    function interchainTokenId(address deployer, bytes32 salt) external view returns (bytes32 tokenId);

    /**
     * @notice Deploys a new interchain token with specified parameters.
     * @param salt The unique salt for deploying the token.
     * @param name The name of the token.
     * @param symbol The symbol of the token.
     * @param decimals The number of decimals for the token.
     * @param initialSupply The amount of tokens to mint initially (can be zero), allocated to the msg.sender.
     * @param minter The address to receive the initially minted tokens.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function deployInterchainToken(
        bytes32 salt,
        string calldata name,
        string calldata symbol,
        uint8 decimals,
        uint256 initialSupply,
        address minter
    ) external payable returns (bytes32 tokenId);

    /**
     * @notice Allow the minter to approve the deployer for a remote interchain token deployment that uses a custom destinationMinter address.
     * This ensures that a token deployer can't choose the destinationMinter itself, and requires the approval of the minter to reduce trust assumptions on the deployer.
     * @param deployer The address of the deployer.
     * @param salt The unique salt for deploying the token.
     * @param destinationChain The name of the destination chain.
     * @param destinationMinter The minter address to set on the deployed token on the destination chain. This can be arbitrary bytes
     * since the encoding of the account is dependent on the destination chain.
     */
    function approveDeployRemoteInterchainToken(
        address deployer,
        bytes32 salt,
        string calldata destinationChain,
        bytes calldata destinationMinter
    ) external;

    /**
     * @notice Allows the minter to revoke a deployer's approval for a remote interchain token deployment that uses a custom destinationMinter address.
     * @param deployer The address of the deployer.
     * @param salt The unique salt for deploying the token.
     * @param destinationChain The name of the destination chain.
     */
    function revokeDeployRemoteInterchainToken(address deployer, bytes32 salt, string calldata destinationChain) external;

    /**
     * @notice Deploys a remote interchain token on a specified destination chain. No additional minter is set on the deployed token.
     * Use the `deployRemoteInterchainTokenWithMinter` method to do so.
     * @param salt The unique salt for deploying the token.
     * @param destinationChain The name of the destination chain.
     * @param gasValue The amount of gas to send for the deployment.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function deployRemoteInterchainToken(
        bytes32 salt,
        string calldata destinationChain,
        uint256 gasValue
    ) external payable returns (bytes32 tokenId);

    /**
     * @notice Deploys a remote interchain token on a specified destination chain.
     * @param salt The unique salt for deploying the token.
     * @param minter The address to distribute the token on the destination chain.
     * @param destinationChain The name of the destination chain.
     * @param destinationMinter The minter address to set on the deployed token on the destination chain. This can be arbitrary bytes
     * since the encoding of the account is dependent on the destination chain. If this is empty, then the `minter` of the token on the current chain
     * is used as the destination minter, which makes it convenient when deploying to other EVM chains.
     * @param gasValue The amount of gas to send for the deployment.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function deployRemoteInterchainTokenWithMinter(
        bytes32 salt,
        address minter,
        string calldata destinationChain,
        bytes memory destinationMinter,
        uint256 gasValue
    ) external payable returns (bytes32 tokenId);

    /**
     * @notice Deprecated: Use `deployRemoteInterchainToken` or `deployRemoteInterchainTokenWithMinter` instead.
     * Deploys a remote interchain token on a specified destination chain.
     * @dev originalChainName is only allowed to be '', i.e the current chain.
     * Other source chains are not supported anymore to simplify ITS token deployment behaviour.
     * @param originalChainName The name of the chain where the token originally exists.
     * @param salt The unique salt for deploying the token.
     * @param minter The address to distribute the token on the destination chain.
     * @param destinationChain The name of the destination chain.
     * @param gasValue The amount of gas to send for the deployment.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function deployRemoteInterchainToken(
        string calldata originalChainName,
        bytes32 salt,
        address minter,
        string calldata destinationChain,
        uint256 gasValue
    ) external payable returns (bytes32 tokenId);

    /**
     * @notice Computes the deploy salt for a canonical interchain token.
     * @param tokenAddress The address of the token.
     * @return deploySalt The deploy salt for the interchain token.
     */
    function canonicalInterchainTokenDeploySalt(address tokenAddress) external view returns (bytes32 deploySalt);

    /**
     * @notice Computes the ID for a canonical interchain token based on its address.
     * @param tokenAddress The address of the canonical interchain token.
     * @return tokenId The ID of the canonical interchain token.
     */
    function canonicalInterchainTokenId(address tokenAddress) external view returns (bytes32 tokenId);

    /**
     * @notice Registers a canonical token as an interchain token and deploys its token manager.
     * @param tokenAddress The address of the canonical token.
     * @return tokenId The tokenId corresponding to the registered canonical token.
     */
    function registerCanonicalInterchainToken(address tokenAddress) external payable returns (bytes32 tokenId);

    /**
     * @notice Deploys a canonical interchain token on a remote chain.
     * @param originalTokenAddress The address of the original token on the original chain.
     * @param destinationChain The name of the chain where the token will be deployed.
     * @param gasValue The gas amount to be sent for deployment.
     * @return tokenId The tokenId corresponding to the deployed canonical InterchainToken.
     */
    function deployRemoteCanonicalInterchainToken(
        address originalTokenAddress,
        string calldata destinationChain,
        uint256 gasValue
    ) external payable returns (bytes32 tokenId);

    /**
     * @notice Deploys a canonical interchain token on a remote chain.
     * This method is deprecated and will be removed in the future. Please use the above method instead.
     * @dev originalChain is only allowed to be '', i.e the current chain.
     * Other source chains are not supported anymore to simplify ITS token deployment behaviour.
     * @param originalChain The name of the chain where the token originally exists.
     * @param originalTokenAddress The address of the original token on the original chain.
     * @param destinationChain The name of the chain where the token will be deployed.
     * @param gasValue The gas amount to be sent for deployment.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function deployRemoteCanonicalInterchainToken(
        string calldata originalChain,
        address originalTokenAddress,
        string calldata destinationChain,
        uint256 gasValue
    ) external payable returns (bytes32 tokenId);

    /**
     * @notice Computes the deploy salt for a linked interchain token.
     * @param deployer The address of the deployer.
     * @param salt The unique salt for deploying the token.
     * @return deploySalt The deploy salt for the interchain token.
     */
    function linkedTokenDeploySalt(address deployer, bytes32 salt) external view returns (bytes32 deploySalt);

    /**
     * @notice Computes the ID for a linked token based on its address.
     * @param deployer The address of the deployer.
     * @param salt The unique salt for deploying the token.
     * @return tokenId The ID of the linked token.
     */
    function linkedTokenId(address deployer, bytes32 salt) external view returns (bytes32 tokenId);

    /**
     * @notice Register an existing ERC20 token under a `tokenId` computed from the provided `salt`.
     * The token metadata must have been registered for tokens on each chain via `InterchainTokenService.registerTokenMetadata`.
     * This token can then be linked to remote tokens on different chains by submitting the `linkToken` function from the same `msg.sender` and using the same `salt`.
     * @dev This function is marked as payable since it can be called within a multicall with other payable methods.
     * @param salt The salt used to derive the tokenId for the custom token registration. The same salt must be used when linking this token on other chains under the same tokenId.
     * @param tokenAddress The token address of the token being registered.
     * @param tokenManagerType The token manager type used for the token link.
     * @param operator The operator of the token manager.
     */
    function registerCustomToken(
        bytes32 salt,
        address tokenAddress,
        TokenManagerType tokenManagerType,
        address operator
    ) external payable returns (bytes32 tokenId);

    /**
     * @notice Links a remote token on `destinationChain` to a local token corresponding to the `tokenId` computed from the provided `salt`.
     * A local token must have been registered first using the `registerCustomToken` function.
     * @param salt The salt used to derive the tokenId for the custom token registration. The same salt must be used when linking this token on other chains under the same tokenId.
     * @param destinationChain The name of the destination chain.
     * @param destinationTokenAddress The token address of the token being linked.
     * @param tokenManagerType The token manager type used for the token link.
     * @param linkParams Additional parameters for the token link depending on the destination chain. For EVM destination chains, this is an optional custom operator address.
     * @param gasValue The cross-chain gas value used to link the token on the destination chain.
     * @return tokenId The tokenId corresponding to the linked token.
     */
    function linkToken(
        bytes32 salt,
        string calldata destinationChain,
        bytes calldata destinationTokenAddress,
        TokenManagerType tokenManagerType,
        bytes calldata linkParams,
        uint256 gasValue
    ) external payable returns (bytes32 tokenId);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IAxelarValuedExpressExecutable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarValuedExpressExecutable.sol';
import { IMulticall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IMulticall.sol';
import { IPausable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IPausable.sol';
import { IUpgradable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IUpgradable.sol';

import { ITransmitInterchainToken } from './ITransmitInterchainToken.sol';
import { ITokenManager } from './ITokenManager.sol';
import { ITokenManagerType } from './ITokenManagerType.sol';
import { ITokenManagerImplementation } from './ITokenManagerImplementation.sol';
import { IOperator } from './IOperator.sol';
import { IAddressTracker } from './IAddressTracker.sol';

/**
 * @title IInterchainTokenService Interface
 * @notice Interface for the Interchain Token Service
 */
interface IInterchainTokenService is
    ITransmitInterchainToken,
    ITokenManagerType,
    ITokenManagerImplementation,
    IAxelarValuedExpressExecutable,
    IOperator,
    IPausable,
    IMulticall,
    IAddressTracker,
    IUpgradable
{
    error InvalidChainName();
    error NotRemoteService();
    error TokenManagerDoesNotExist(bytes32 tokenId);
    error ExecuteWithInterchainTokenFailed(address contractAddress);
    error ExpressExecuteWithInterchainTokenFailed(address contractAddress);
    error TokenManagerDeploymentFailed(bytes error);
    error InterchainTokenDeploymentFailed(bytes error);
    error InvalidMessageType(uint256 messageType);
    error InvalidMetadataVersion(uint32 version);
    error InvalidExpressMessageType(uint256 messageType);
    error TakeTokenFailed(bytes data);
    error GiveTokenFailed(bytes data);
    error TokenHandlerFailed(bytes data);
    error EmptyData();
    error PostDeployFailed(bytes data);
    error ZeroAmount();
    error CannotDeploy(TokenManagerType);
    error CannotDeployRemotelyToSelf();
    error InvalidPayload();
    error GatewayCallFailed(bytes data);
    error EmptyTokenName();
    error EmptyTokenSymbol();
    error EmptyParams();
    error EmptyDestinationAddress();
    error EmptyTokenAddress();
    error NotSupported();
    error NotInterchainTokenFactory(address sender);

    event InterchainTransfer(
        bytes32 indexed tokenId,
        address indexed sourceAddress,
        string destinationChain,
        bytes destinationAddress,
        uint256 amount,
        bytes32 indexed dataHash
    );
    event InterchainTransferReceived(
        bytes32 indexed commandId,
        bytes32 indexed tokenId,
        string sourceChain,
        bytes sourceAddress,
        address indexed destinationAddress,
        uint256 amount,
        bytes32 dataHash
    );
    event TokenMetadataRegistered(address indexed tokenAddress, uint8 decimals);
    event LinkTokenStarted(
        bytes32 indexed tokenId,
        string destinationChain,
        bytes sourceTokenAddress,
        bytes destinationTokenAddress,
        TokenManagerType indexed tokenManagerType,
        bytes params
    );
    event InterchainTokenDeploymentStarted(
        bytes32 indexed tokenId,
        string tokenName,
        string tokenSymbol,
        uint8 tokenDecimals,
        bytes minter,
        string destinationChain
    );
    event TokenManagerDeployed(bytes32 indexed tokenId, address tokenManager, TokenManagerType indexed tokenManagerType, bytes params);
    event InterchainTokenDeployed(
        bytes32 indexed tokenId,
        address tokenAddress,
        address indexed minter,
        string name,
        string symbol,
        uint8 decimals
    );
    event InterchainTokenIdClaimed(bytes32 indexed tokenId, address indexed deployer, bytes32 indexed salt);

    /**
     * @notice Returns the address of the token manager deployer contract.
     * @return tokenManagerDeployerAddress The address of the token manager deployer contract.
     */
    function tokenManagerDeployer() external view returns (address tokenManagerDeployerAddress);

    /**
     * @notice Returns the address of the interchain token deployer contract.
     * @return interchainTokenDeployerAddress The address of the interchain token deployer contract.
     */
    function interchainTokenDeployer() external view returns (address interchainTokenDeployerAddress);

    /**
     * @notice Returns the address of TokenManager implementation.
     * @return tokenManagerAddress_ The address of the token manager contract.
     */
    function tokenManager() external view returns (address tokenManagerAddress_);

    /**
     * @notice Returns the address of TokenHandler implementation.
     * @return tokenHandlerAddress The address of the token handler contract.
     */
    function tokenHandler() external view returns (address tokenHandlerAddress);

    /**
     * @notice Returns the address of the interchain token factory.
     * @return address The address of the interchain token factory.
     */
    function interchainTokenFactory() external view returns (address);

    /**
     * @notice Returns the hash of the chain name.
     * @return bytes32 The hash of the chain name.
     */
    function chainNameHash() external view returns (bytes32);

    /**
     * @notice Returns the address of the token manager associated with the given tokenId.
     * @param tokenId The tokenId of the token manager.
     * @return tokenManagerAddress_ The address of the token manager.
     */
    function tokenManagerAddress(bytes32 tokenId) external view returns (address tokenManagerAddress_);

    /**
     * @notice Returns the instance of ITokenManager from a specific tokenId.
     * @param tokenId The tokenId of the deployed token manager.
     * @return tokenManager_ The instance of ITokenManager associated with the specified tokenId.
     */
    function deployedTokenManager(bytes32 tokenId) external view returns (ITokenManager tokenManager_);

    /**
     * @notice Returns the address of the token that an existing tokenManager points to.
     * @param tokenId The tokenId of the registered token.
     * @return tokenAddress The address of the token.
     */
    function registeredTokenAddress(bytes32 tokenId) external view returns (address tokenAddress);

    /**
     * @notice Returns the address of the interchain token associated with the given tokenId.
     * @param tokenId The tokenId of the interchain token.
     * @return tokenAddress The address of the interchain token.
     */
    function interchainTokenAddress(bytes32 tokenId) external view returns (address tokenAddress);

    /**
     * @notice Returns the custom tokenId associated with the given operator and salt.
     * @param operator_ The operator address.
     * @param salt The salt used for token id calculation.
     * @return tokenId The custom tokenId associated with the operator and salt.
     */
    function interchainTokenId(address operator_, bytes32 salt) external view returns (bytes32 tokenId);

    /**
     * @notice Registers metadata for a token on the ITS Hub. This metadata is used for scaling linked tokens.
     * The token metadata must be registered before linkToken can be called for the corresponding token.
     * @param tokenAddress The address of the token.
     * @param gasValue The cross-chain gas value for sending the registration message to ITS Hub.
     */
    function registerTokenMetadata(address tokenAddress, uint256 gasValue) external payable;

    /**
     * @notice Only to be used by the InterchainTokenFactory to register custom tokens to this chain. Then link token can be used to register those tokens to other chains.
     * @param salt A unique salt to derive tokenId from.
     * @param tokenManagerType The type of the token manager to use for the token registration.
     * @param linkParams The operator for the token.
     */
    function registerCustomToken(
        bytes32 salt,
        address tokenAddress,
        TokenManagerType tokenManagerType,
        bytes calldata linkParams
    ) external payable returns (bytes32 tokenId);

    /**
     * @notice If `destinationChain` is an empty string, this function will register the token address on the current chain.
     * Otherwise, it will link the token address on the destination chain with the token corresponding to the tokenId on the current chain.
     * A token manager is deployed on EVM chains that's responsible for managing the linked token.
     * @dev This function replaces the prior `deployTokenManager` function.
     * @param salt A unique identifier to allow for multiple tokens registered per deployer.
     * @param destinationChain The chain to link the token to. Pass an empty string for this chain.
     * @param destinationTokenAddress The token address to link, as bytes.
     * @param tokenManagerType The type of the token manager to use to send and receive tokens.
     * @param linkParams Additional parameteres to use to link the token. Fow not it is just the address of the operator.
     * @param gasValue Pass a non-zero value only for remote linking, which should be the gas to use to pay for the contract call.
     * @return tokenId The tokenId associated with the token manager.
     */
    function linkToken(
        bytes32 salt,
        string calldata destinationChain,
        bytes memory destinationTokenAddress,
        TokenManagerType tokenManagerType,
        bytes memory linkParams,
        uint256 gasValue
    ) external payable returns (bytes32 tokenId);

    /**
     * @notice Deploys and registers an interchain token on a remote chain.
     * @param salt The salt used for token deployment.
     * @param destinationChain The name of the destination chain. Use '' for this chain.
     * @param name The name of the interchain tokens.
     * @param symbol The symbol of the interchain tokens.
     * @param decimals The number of decimals for the interchain tokens.
     * @param minter The minter data for mint/burn operations.
     * @param gasValue The gas value for deployment.
     * @return tokenId The tokenId corresponding to the deployed InterchainToken.
     */
    function deployInterchainToken(
        bytes32 salt,
        string calldata destinationChain,
        string memory name,
        string memory symbol,
        uint8 decimals,
        bytes memory minter,
        uint256 gasValue
    ) external payable returns (bytes32 tokenId);

    /**
     * @notice Initiates an interchain transfer of a specified token to a destination chain.
     * @param tokenId The unique identifier of the token to be transferred.
     * @param destinationChain The destination chain to send the tokens to.
     * @param destinationAddress The address on the destination chain to send the tokens to.
     * @param amount The amount of tokens to be transferred.
     * @param metadata Optional metadata for the call for additional effects (such as calling a destination contract).
     */
    function interchainTransfer(
        bytes32 tokenId,
        string calldata destinationChain,
        bytes calldata destinationAddress,
        uint256 amount,
        bytes calldata metadata,
        uint256 gasValue
    ) external payable;

    /**
     * @notice Sets the flow limits for multiple tokens.
     * @param tokenIds An array of tokenIds.
     * @param flowLimits An array of flow limits corresponding to the tokenIds.
     */
    function setFlowLimits(bytes32[] calldata tokenIds, uint256[] calldata flowLimits) external;

    /**
     * @notice Allows the owner to pause/unpause the token service.
     * @param paused whether to pause or unpause.
     */
    function setPauseStatus(bool paused) external;

    /**
     * @notice Allows the owner to migrate legacy tokens that cannot be migrated automatically.
     * @param tokenId the tokenId of the registered token.
     */
    function migrateInterchainToken(bytes32 tokenId) external;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title IInterchainTokenStandard interface
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IInterchainTokenStandard {
    /**
     * @notice Implementation of the interchainTransfer method.
     * @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.
     * A different implementation could use metadata to specify a function to invoke, or for other purposes as well.
     * @param destinationChain The destination chain identifier.
     * @param recipient The bytes representation of the address of the recipient.
     * @param amount The amount of token to be transferred.
     * @param metadata Optional metadata for the call for additional effects (such as calling a destination contract).
     */
    function interchainTransfer(
        string calldata destinationChain,
        bytes calldata recipient,
        uint256 amount,
        bytes calldata metadata
    ) external payable;

    /**
     * @notice Implementation of the interchainTransferFrom method
     * @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.
     * A different implementation could use metadata to specify a function to invoke, or for other purposes as well.
     * @param sender The sender of the tokens. They need to have approved `msg.sender` before this is called.
     * @param destinationChain The string representation of the destination chain.
     * @param recipient The bytes representation of the address of the recipient.
     * @param amount The amount of token to be transferred.
     * @param metadata Optional metadata for the call for additional effects (such as calling a destination contract.)
     */
    function interchainTransferFrom(
        address sender,
        string calldata destinationChain,
        bytes calldata recipient,
        uint256 amount,
        bytes calldata metadata
    ) external payable;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IRolesBase } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IRolesBase.sol';

/**
 * @title IMinter Interface
 * @notice An interface for a contract module which provides a basic access control mechanism, where
 * there is an account (a minter) that can be granted exclusive access to specific functions.
 */
interface IMinter is IRolesBase {
    /**
     * @notice Change the minter of the contract.
     * @dev Can only be called by the current minter.
     * @param minter_ The address of the new minter.
     */
    function transferMintership(address minter_) external;

    /**
     * @notice Proposed a change of the minter of the contract.
     * @dev Can only be called by the current minter.
     * @param minter_ The address of the new minter.
     */
    function proposeMintership(address minter_) external;

    /**
     * @notice Accept a change of the minter of the contract.
     * @dev Can only be called by the proposed minter.
     * @param fromMinter The previous minter.
     */
    function acceptMintership(address fromMinter) external;

    /**
     * @notice Query if an address is a minter
     * @param addr the address to query for
     * @return bool Boolean value representing whether or not the address is a minter.
     */
    function isMinter(address addr) external view returns (bool);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IRolesBase } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IRolesBase.sol';

/**
 * @title IOperator Interface
 * @notice An interface for a contract module which provides a basic access control mechanism, where
 * there is an account (a operator) that can be granted exclusive access to specific functions.
 */
interface IOperator is IRolesBase {
    /**
     * @notice Change the operator of the contract.
     * @dev Can only be called by the current operator.
     * @param operator_ The address of the new operator.
     */
    function transferOperatorship(address operator_) external;

    /**
     * @notice Proposed a change of the operator of the contract.
     * @dev Can only be called by the current operator.
     * @param operator_ The address of the new operator.
     */
    function proposeOperatorship(address operator_) external;

    /**
     * @notice Accept a proposed change of operatorship.
     * @dev Can only be called by the proposed operator.
     * @param fromOperator The previous operator of the contract.
     */
    function acceptOperatorship(address fromOperator) external;

    /**
     * @notice Query if an address is a operator.
     * @param addr The address to query for.
     * @return bool Boolean value representing whether or not the address is an operator.
     */
    function isOperator(address addr) external view returns (bool);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IImplementation } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IImplementation.sol';

import { IBaseTokenManager } from './IBaseTokenManager.sol';
import { IOperator } from './IOperator.sol';
import { IFlowLimit } from './IFlowLimit.sol';

/**
 * @title ITokenManager Interface
 * @notice This contract is responsible for managing tokens, such as setting locking token balances, or setting flow limits, for interchain transfers.
 */
interface ITokenManager is IBaseTokenManager, IOperator, IFlowLimit, IImplementation {
    error TokenLinkerZeroAddress();
    error NotService(address caller);
    error TakeTokenFailed();
    error GiveTokenFailed();
    error NotToken(address caller);
    error ZeroAddress();
    error AlreadyFlowLimiter(address flowLimiter);
    error NotFlowLimiter(address flowLimiter);
    error NotSupported();

    /**
     * @notice Returns implementation type of this token manager.
     * @return uint256 The implementation type of this token manager.
     */
    function implementationType() external view returns (uint256);

    function addFlowIn(uint256 amount) external;

    function addFlowOut(uint256 amount) external;

    /**
     * @notice This function adds a flow limiter for this TokenManager.
     * @dev Can only be called by the operator.
     * @param flowLimiter the address of the new flow limiter.
     */
    function addFlowLimiter(address flowLimiter) external;

    /**
     * @notice This function removes a flow limiter for this TokenManager.
     * @dev Can only be called by the operator.
     * @param flowLimiter the address of an existing flow limiter.
     */
    function removeFlowLimiter(address flowLimiter) external;

    /**
     * @notice Query if an address is a flow limiter.
     * @param addr The address to query for.
     * @return bool Boolean value representing whether or not the address is a flow limiter.
     */
    function isFlowLimiter(address addr) external view returns (bool);

    /**
     * @notice This function sets the flow limit for this TokenManager.
     * @dev Can only be called by the flow limiters.
     * @param flowLimit_ The maximum difference between the tokens flowing in and/or out at any given interval of time (6h).
     */
    function setFlowLimit(uint256 flowLimit_) external;

    /**
     * @notice A function to renew approval to the service if we need to.
     */
    function approveService() external;

    /**
     * @notice Getter function for the parameters of a lock/unlock TokenManager.
     * @dev This function will be mainly used by frontends.
     * @param operator_ The operator of the TokenManager.
     * @param tokenAddress_ The token to be managed.
     * @return params_ The resulting params to be passed to custom TokenManager deployments.
     */
    function params(bytes calldata operator_, address tokenAddress_) external pure returns (bytes memory params_);

    /**
     * @notice External function to allow the service to mint tokens through the tokenManager
     * @dev This function should revert if called by anyone but the service.
     * @param tokenAddress_ The address of the token, since its cheaper to pass it in instead of reading it as the token manager.
     * @param to The recipient.
     * @param amount The amount to mint.
     */
    function mintToken(address tokenAddress_, address to, uint256 amount) external;

    /**
     * @notice External function to allow the service to burn tokens through the tokenManager
     * @dev This function should revert if called by anyone but the service.
     * @param tokenAddress_ The address of the token, since its cheaper to pass it in instead of reading it as the token manager.
     * @param from The address to burn the token from.
     * @param amount The amount to burn.
     */
    function burnToken(address tokenAddress_, address from, uint256 amount) external;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title ITokenManagerImplementation Interface
 * @notice Interface for returning the token manager implementation type.
 */
interface ITokenManagerImplementation {
    /**
     * @notice Returns the implementation address for a given token manager type.
     * @param tokenManagerType The type of token manager.
     * @return tokenManagerAddress_ The address of the token manager implementation.
     */
    function tokenManagerImplementation(uint256 tokenManagerType) external view returns (address tokenManagerAddress_);
}

File 33 of 34 : ITokenManagerType.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title ITokenManagerType Interface
 * @notice A simple interface that defines all the token manager types.
 */
interface ITokenManagerType {
    enum TokenManagerType {
        NATIVE_INTERCHAIN_TOKEN, // This type is reserved for interchain tokens deployed by ITS, and can't be used by custom token managers.
        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.
        LOCK_UNLOCK, // The token will be locked/unlocked at the token manager.
        LOCK_UNLOCK_FEE, // The token will be locked/unlocked at the token manager, which will account for any fee-on-transfer behaviour.
        MINT_BURN // The token will be minted/burned on transfers. The token needs to give mint and burn permission to the token manager.
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title ITransmitInterchainToken Interface
 * @notice Interface for transmiting interchain tokens via the interchain token service
 */
interface ITransmitInterchainToken {
    /**
     * @notice Transmit an interchain transfer for the given tokenId.
     * @dev Only callable by a token registered under a tokenId.
     * @param tokenId The tokenId of the token (which must be the msg.sender).
     * @param sourceAddress The address where the token is coming from.
     * @param destinationChain The name of the chain to send tokens to.
     * @param destinationAddress The destinationAddress for the interchainTransfer.
     * @param amount The amount of token to give.
     * @param metadata Optional metadata for the call for additional effects (such as calling a destination contract).
     */
    function transmitInterchainTransfer(
        bytes32 tokenId,
        address sourceAddress,
        string calldata destinationChain,
        bytes memory destinationAddress,
        uint256 amount,
        bytes calldata metadata
    ) external payable;
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"interchainTokenService_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidChainName","type":"error"},{"inputs":[],"name":"InvalidCodeHash","type":"error"},{"inputs":[],"name":"InvalidImplementation","type":"error"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"InvalidMinter","type":"error"},{"inputs":[],"name":"InvalidOwner","type":"error"},{"inputs":[],"name":"InvalidOwnerAddress","type":"error"},{"inputs":[{"internalType":"bytes32","name":"tokenId","type":"bytes32"},{"internalType":"bytes32","name":"expectedTokenId","type":"bytes32"}],"name":"InvalidTokenId","type":"error"},{"inputs":[],"name":"MulticallFailed","type":"error"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"NotMinter","type":"error"},{"inputs":[],"name":"NotOwner","type":"error"},{"inputs":[],"name":"NotProxy","type":"error"},{"inputs":[],"name":"NotSupported","type":"error"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"NotToken","type":"error"},{"inputs":[],"name":"RemoteDeploymentNotApproved","type":"error"},{"inputs":[],"name":"SetupFailed","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroSupplyToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":true,"internalType":"address","name":"deployer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"tokenId","type":"bytes32"},{"indexed":false,"internalType":"string","name":"destinationChain","type":"string"},{"indexed":false,"internalType":"bytes","name":"destinationMinter","type":"bytes"}],"name":"DeployRemoteInterchainTokenApproval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":true,"internalType":"address","name":"deployer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"tokenId","type":"bytes32"},{"indexed":false,"internalType":"string","name":"destinationChain","type":"string"}],"name":"RevokedDeployRemoteInterchainTokenApproval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newImplementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"deployer","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"string","name":"destinationChain","type":"string"},{"internalType":"bytes","name":"destinationMinter","type":"bytes"}],"name":"approveDeployRemoteInterchainToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"canonicalInterchainTokenDeploySalt","outputs":[{"internalType":"bytes32","name":"deploySalt","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"canonicalInterchainTokenId","outputs":[{"internalType":"bytes32","name":"tokenId","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainNameHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint256","name":"initialSupply","type":"uint256"},{"internalType":"address","name":"minter","type":"address"}],"name":"deployInterchainToken","outputs":[{"internalType":"bytes32","name":"tokenId","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"originalChain","type":"string"},{"internalType":"address","name":"originalTokenAddress","type":"address"},{"internalType":"string","name":"destinationChain","type":"string"},{"internalType":"uint256","name":"gasValue","type":"uint256"}],"name":"deployRemoteCanonicalInterchainToken","outputs":[{"internalType":"bytes32","name":"tokenId","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"originalTokenAddress","type":"address"},{"internalType":"string","name":"destinationChain","type":"string"},{"internalType":"uint256","name":"gasValue","type":"uint256"}],"name":"deployRemoteCanonicalInterchainToken","outputs":[{"internalType":"bytes32","name":"tokenId","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"string","name":"destinationChain","type":"string"},{"internalType":"uint256","name":"gasValue","type":"uint256"}],"name":"deployRemoteInterchainToken","outputs":[{"internalType":"bytes32","name":"tokenId","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"originalChainName","type":"string"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"minter","type":"address"},{"internalType":"string","name":"destinationChain","type":"string"},{"internalType":"uint256","name":"gasValue","type":"uint256"}],"name":"deployRemoteInterchainToken","outputs":[{"internalType":"bytes32","name":"tokenId","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"minter","type":"address"},{"internalType":"string","name":"destinationChain","type":"string"},{"internalType":"bytes","name":"destinationMinter","type":"bytes"},{"internalType":"uint256","name":"gasValue","type":"uint256"}],"name":"deployRemoteInterchainTokenWithMinter","outputs":[{"internalType":"bytes32","name":"tokenId","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"implementation_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"deployer","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"interchainTokenDeploySalt","outputs":[{"internalType":"bytes32","name":"deploySalt","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"deployer","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"interchainTokenId","outputs":[{"internalType":"bytes32","name":"tokenId","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"interchainTokenService","outputs":[{"internalType":"contract IInterchainTokenService","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"string","name":"destinationChain","type":"string"},{"internalType":"bytes","name":"destinationTokenAddress","type":"bytes"},{"internalType":"enum ITokenManagerType.TokenManagerType","name":"tokenManagerType","type":"uint8"},{"internalType":"bytes","name":"linkParams","type":"bytes"},{"internalType":"uint256","name":"gasValue","type":"uint256"}],"name":"linkToken","outputs":[{"internalType":"bytes32","name":"tokenId","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"deployer","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"linkedTokenDeploySalt","outputs":[{"internalType":"bytes32","name":"deploySalt","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"deployer","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"linkedTokenId","outputs":[{"internalType":"bytes32","name":"tokenId","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"proposeOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"registerCanonicalInterchainToken","outputs":[{"internalType":"bytes32","name":"tokenId","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"enum ITokenManagerType.TokenManagerType","name":"tokenManagerType","type":"uint8"},{"internalType":"address","name":"operator","type":"address"}],"name":"registerCustomToken","outputs":[{"internalType":"bytes32","name":"tokenId","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"deployer","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"string","name":"destinationChain","type":"string"}],"name":"revokeDeployRemoteInterchainToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes32","name":"newImplementationCodeHash","type":"bytes32"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e060405234801561001057600080fd5b50604051612f97380380612f9783398101604081905261002f91610180565b600161003a816100dd565b50306080526001600160a01b0381166100665760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b03811660a08190526040805163864a0dcf60e01b8152905163864a0dcf916004808201926020929091908290030181865afa1580156100b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d491906101b0565b60c052506101c9565b6001600160a01b03811661010457604051633649397d60e21b815260040160405180910390fd5b6040516001600160a01b038216907f04dba622d284ed0014ee4b9a6a68386be1a4c08a4913ae272de89199cc68616390600090a27f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05560007f9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d155565b60006020828403121561019257600080fd5b81516001600160a01b03811681146101a957600080fd5b9392505050565b6000602082840312156101c257600080fd5b5051919050565b60805160a05160c051612d36610261600039600081816103b501528181610be101528181610c6601526110cc0152600081816101ff015281816105e1015281816106de01528181610839015281816108e9015281816115120152818161175a0152818161182101528181611a7101528181611b4401528181611bd601528181611d130152611e34015260006111160152612d366000f3fe6080604052600436106101c25760003560e01c8063864a0dcf116100f7578063a5269ef111610095578063d8c0326811610064578063d8c0326814610504578063e30c397814610517578063e8a1d6f61461054b578063f2fde38b1461056b57600080fd5b8063a5269ef114610491578063a75483d1146104b1578063ac9650d8146104c4578063b2292888146104e457600080fd5b80639d6d57b3116100d15780639d6d57b31461041e5780639ded06df1461043e578063a3499c731461045e578063a37fcf4e1461047e57600080fd5b8063864a0dcf146103a35780638da5cb5b146103d7578063993a5b9e1461040b57600080fd5b80635c60da1b1161016457806379ba50971161013e57806379ba50971461031b5780637c2def17146103305780638291286c14610350578063848f7b631461038357600080fd5b80635c60da1b146102b25780635d79c00e146102e6578063710bf322146102f957600080fd5b80633e12f8c5116101a05780633e12f8c51461024c578063415621061461025f57806343b0f3d31461027f5780634987e2c21461029f57600080fd5b8063010987dc146101c757806309c6bed9146101ed5780630f4433d314610239575b600080fd5b6101da6101d5366004612213565b61058b565b6040519081526020015b60405180910390f35b3480156101f957600080fd5b506102217f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101e4565b6101da61024736600461227a565b6105d0565b6101da61025a366004612367565b61068e565b34801561026b57600080fd5b506101da61027a366004612415565b610bb5565b34801561028b57600080fd5b506101da61029a366004612432565b610c3a565b6101da6102ad3660046124cd565b610cc7565b3480156102be57600080fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54610221565b6101da6102f43660046125a6565b610dcd565b34801561030557600080fd5b50610319610314366004612415565b610dfc565b005b34801561032757600080fd5b50610319610ecb565b34801561033c57600080fd5b506101da61034b366004612432565b610f45565b34801561035c57600080fd5b507f80547d63ed663962b99f8ed432bff3879a35b5418af92258aa171feef14cc3cc6101da565b34801561038f57600080fd5b5061031961039e366004612640565b610f65565b3480156103af57600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103e357600080fd5b507f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c054610221565b6101da61041936600461269c565b611068565b34801561042a57600080fd5b506101da610439366004612432565b6110a0565b34801561044a57600080fd5b5061031961045936600461272c565b611113565b34801561046a57600080fd5b50610319610479366004612640565b611179565b6101da61048c36600461276e565b61149b565b34801561049d57600080fd5b506101da6104ac366004612432565b6114c5565b6101da6104bf366004612415565b6114d2565b6104d76104d23660046127ab565b611592565b6040516101e49190612872565b3480156104f057600080fd5b506101da6104ff366004612415565b6116e2565b6101da6105123660046128d7565b611700565b34801561052357600080fd5b507f9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d154610221565b34801561055757600080fd5b50610319610566366004612928565b6117d8565b34801561057757600080fd5b50610319610586366004612415565b6119ef565b60006105c785828686825b6040519080825280601f01601f1916602001820160405280156105c0576020820181803683370190505b5087610cc7565b95945050505050565b6000806105dd338c6110a0565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630f4433d384838d8d8d8d8d8d8d8d6040518b63ffffffff1660e01b815260040161063c99989796959493929190612a04565b60206040518083038185885af115801561065a573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061067f9190612a6a565b9b9a5050505050505050505050565b6000338161069c828c610c3a565b60408051600080825281830190925260208101828152929350919087156106cd576106c630611a3f565b9250610781565b6001600160a01b0387161561074f577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b03160361073d5760405162f78d2360e81b81526001600160a01b03881660048201526024015b60405180910390fd5b6106c6876001600160a01b0316611a3f565b6040517fdb80c5f100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61081884838f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8887611a6d565b95508715610ba45760405163b90d6afd60e01b8152600481018790526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b90d6afd90602401602060405180830381865afa158015610888573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ac9190612a83565b6040517f7e10eb15000000000000000000000000000000000000000000000000000000008152600481018990529091506000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637e10eb1590602401602060405180830381865afa158015610930573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109549190612a83565b6040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b038981166004830152602482018d9052919250908316906340c10f1990604401600060405180830381600087803b1580156109bb57600080fd5b505af11580156109cf573d6000803e3d6000fd5b50506040517fcf86a95a0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301528516925063cf86a95a9150602401600060405180830381600087803b158015610a2f57600080fd5b505af1158015610a43573d6000803e3d6000fd5b50506040517fe915cfd10000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038416925063e915cfd19150602401600060405180830381600087803b158015610aa157600080fd5b505af1158015610ab5573d6000803e3d6000fd5b50506040517f120a63b50000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301528416925063120a63b59150602401600060405180830381600087803b158015610b1557600080fd5b505af1158015610b29573d6000803e3d6000fd5b50506040517f4a6a42d80000000000000000000000000000000000000000000000000000000081526001600160a01b038c8116600483015284169250634a6a42d89150602401600060405180830381600087803b158015610b8957600080fd5b505af1158015610b9d573d6000803e3d6000fd5b5050505050505b505050505098975050505050505050565b604080517f9ca52083bb00ac0f5bed7edcaabb0534d03efb0719807b54a8029c4d1313630960208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091526001600160a01b03821660608201526000906080015b604051602081830303815290604052805190602001209050919050565b604080517ff84d43c32bc607f1bdb175c63a0cf1939bf0cc8cc3565450be225afbb5a1098560208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091526001600160a01b03831660608201526080810182905260009060a0015b60405160208183030381529060405280519060200120905092915050565b600080610cd43389610c3a565b90506001600160a01b03871615610d8a576000610cf082611b0b565b9050610cfc8189611bbd565b845115610d6f57600060405180606001604052808a6001600160a01b0316815260200183815260200189898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152509050610d698187611d72565b50610d84565b610d81886001600160a01b0316611a3f565b94505b50610db4565b835115610db45760405162f78d2360e81b81526001600160a01b0388166004820152602401610734565b610dc18187878787611e04565b98975050505050505050565b60008615610dee57604051630280e1e560e61b815260040160405180910390fd5b610dc1868686866000610596565b33610e257f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05490565b6001600160a01b031614610e4c576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b038116610e7357604051633649397d60e21b815260040160405180910390fd5b6040516001600160a01b038216907fd9be0e8e07417e00f2521db636cb53e316fd288f5051f16d2aa2bf0c3938a87690600090a27f9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d155565b6000610ef57f9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d15490565b90506001600160a01b0381163314610f39576040517f49e27cff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f4281611f4f565b50565b600080610f5284846110a0565b9050610f5d81611b0b565b949350505050565b336000610f7286866114c5565b90506000610fd66040518060600160405280856001600160a01b0316815260200184815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050915250611ff2565b90507fd4f5c43117c663161acfe6af3208a49856d85e586baf0f60749de2055e00146560000160008281526020019081526020016000206000905581876001600160a01b0316846001600160a01b03167f45aa4b37a2bdfa1ab8962f148a8e9cdf22eda891c46dbdea19295cd85c10b1128888604051611057929190612aa0565b60405180910390a450505050505050565b6000851561108957604051630280e1e560e61b815260040160405180910390fd5b6110958585858561149b565b979650505050505050565b604080517f5498bf1696259c19f826e687122ca9404f85fe476a9e186af31eb6a53bf123dc60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091526001600160a01b03831660608201526080810182905260009060a001610ca9565b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031603611175576040517fbf10dd3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b336111a27f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05490565b6001600160a01b0316146111c9576040516330cd747160e01b815260040160405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b0316638291286c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611228573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124c9190612a6a565b846001600160a01b0316638291286c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561128a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ae9190612a6a565b146112e5576040517f68155f9a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836001600160a01b03163f8314611328576040517f8f84fb2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8490556040516001600160a01b038516907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28015611495576000846001600160a01b0316639ded06df60e01b84846040516024016113ad929190612aa0565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516114189190612ab4565b600060405180830381855af49150503d8060008114611453576040519150601f19603f3d011682016040523d82523d6000602084013e611458565b606091505b5050905080611493576040517f97905dfb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b50505050565b6040805160208101909152600080825290816114b687610bb5565b90506110958187878588611e04565b600080610f528484610c3a565b6000806114de83610bb5565b6040805160208101909152600081529091506114f984612027565b5050604051637a4e022560e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063f49c044a9061154f90859088906002908790600401612ad0565b6020604051808303816000875af115801561156e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5d9190612a6a565b60608167ffffffffffffffff8111156115ad576115ad61245e565b6040519080825280602002602001820160405280156115e057816020015b60608152602001906001900390816115cb5790505b5090506000606060005b848110156116d9573086868381811061160557611605612b0f565b90506020028101906116179190612b25565b604051611625929190612b6c565b600060405180830381855af49150503d8060008114611660576040519150601f19603f3d011682016040523d82523d6000602084013e611665565b606091505b509093509150826116b35781516000036116ab576040517f4d6a232800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815182602001fd5b818482815181106116c6576116c6612b0f565b60209081029190910101526001016115ea565b50505092915050565b6000806116ee83610bb5565b90506116f981611b0b565b9392505050565b60008061170d33876110a0565b6040805160208101909152600081529091506001600160a01b0384161561174357611740846001600160a01b0316611a3f565b90505b604051637a4e022560e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f49c044a906117959085908a908a908790600401612ad0565b6020604051808303816000875af11580156117b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110959190612a6a565b3360006117e588886114c5565b90506117f18183611bbd565b6040517f477aedc70000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063477aedc7906118589089908990600401612aa0565b600060405180830381865afa158015611875573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261189d9190810190612b7c565b516000036118d7576040517f08e1064e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006119396040518060600160405280856001600160a01b0316815260200184815260200189898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050915250611ff2565b9050848460405161194b929190612b6c565b604051809103902061197a7fd4f5c43117c663161acfe6af3208a49856d85e586baf0f60749de2055e00146590565b60000160008381526020019081526020016000208190555081896001600160a01b0316846001600160a01b03167fa8c6a99761ac63f2758a4683a64d2be54964d5d74b9d296b6563a5b4c0d23fce8a8a8a8a6040516119dc9493929190612bea565b60405180910390a4505050505050505050565b33611a187f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05490565b6001600160a01b031614610f39576040516330cd747160e01b815260040160405180910390fd5b6040805160148082528183019092526060916020820181803683375050506014808201939093529182525090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e1d40c77838a8a8a8a8a8a8a6040518963ffffffff1660e01b8152600401611ac89796959493929190612c11565b60206040518083038185885af1158015611ae6573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610dc19190612a6a565b6040517fa5269ef100000000000000000000000000000000000000000000000000000000815260006004820181905260248201839052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a5269ef190604401602060405180830381865afa158015611b93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb79190612a6a565b92915050565b60405163b90d6afd60e01b8152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b90d6afd90602401602060405180830381865afa158015611c25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c499190612a83565b6040517faa271e1a0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301529192509082169063aa271e1a90602401602060405180830381865afa158015611cac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cd09190612c82565b611d11576040517f361c31f20000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610734565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031603611d6d5760405162f78d2360e81b81526001600160a01b0383166004820152602401610734565b505050565b6000611d7d83611ff2565b825160208085019190912060008381527fd4f5c43117c663161acfe6af3208a49856d85e586baf0f60749de2055e001465928390526040902054929350909114611df3576040517f4e9f6b5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600091825260205260408120555050565b600080611e1087611b0b565b60405163b90d6afd60e01b8152600481018290529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b90d6afd90602401602060405180830381865afa158015611e7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e9f9190612a83565b90506000806000611eaf84612027565b925092509250611efc8b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791508690508d8d611a6d565b9550848614611f41576040517f750285420000000000000000000000000000000000000000000000000000000081526004810187905260248101869052604401610734565b505050505095945050505050565b6001600160a01b038116611f7657604051633649397d60e21b815260040160405180910390fd5b6040516001600160a01b038216907f04dba622d284ed0014ee4b9a6a68386be1a4c08a4913ae272de89199cc68616390600090a27f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05560007f9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d155565b60007ff1302cc23b373b441b50010257156be4e920e78f3dc60bf8cd05c64367827f6082604051602001610c1d929190612ca4565b606080600080849050806001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa92505050801561208f57506040513d6000823e601f3d908101601f1916820160405261208c9190810190612b7c565b60015b6120b657604051629fd8a560e11b81526001600160a01b0386166004820152602401610734565b9350806001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa92505050801561211757506040513d6000823e601f3d908101601f191682016040526121149190810190612b7c565b60015b61213e57604051629fd8a560e11b81526001600160a01b0386166004820152602401610734565b9250806001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561219a575060408051601f3d908101601f1916820190925261219791810190612ce3565b60015b6121c157604051629fd8a560e11b81526001600160a01b0386166004820152602401610734565b93959294505050565b60008083601f8401126121dc57600080fd5b50813567ffffffffffffffff8111156121f457600080fd5b60208301915083602082850101111561220c57600080fd5b9250929050565b6000806000806060858703121561222957600080fd5b84359350602085013567ffffffffffffffff81111561224757600080fd5b612253878288016121ca565b9598909750949560400135949350505050565b80356005811061227557600080fd5b919050565b600080600080600080600080600060c08a8c03121561229857600080fd5b8935985060208a013567ffffffffffffffff8111156122b657600080fd5b6122c28c828d016121ca565b90995097505060408a013567ffffffffffffffff8111156122e257600080fd5b6122ee8c828d016121ca565b9097509550612301905060608b01612266565b935060808a013567ffffffffffffffff81111561231d57600080fd5b6123298c828d016121ca565b9a9d999c50979a9699959894979660a00135949350505050565b60ff81168114610f4257600080fd5b6001600160a01b0381168114610f4257600080fd5b60008060008060008060008060c0898b03121561238357600080fd5b88359750602089013567ffffffffffffffff8111156123a157600080fd5b6123ad8b828c016121ca565b909850965050604089013567ffffffffffffffff8111156123cd57600080fd5b6123d98b828c016121ca565b90965094505060608901356123ed81612343565b92506080890135915060a089013561240481612352565b809150509295985092959890939650565b60006020828403121561242757600080fd5b81356116f981612352565b6000806040838503121561244557600080fd5b823561245081612352565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561249d5761249d61245e565b604052919050565b600067ffffffffffffffff8211156124bf576124bf61245e565b50601f01601f191660200190565b60008060008060008060a087890312156124e657600080fd5b8635955060208701356124f881612352565b9450604087013567ffffffffffffffff81111561251457600080fd5b61252089828a016121ca565b909550935050606087013567ffffffffffffffff81111561254057600080fd5b8701601f8101891361255157600080fd5b803561256461255f826124a5565b612474565b8181528a602083850101111561257957600080fd5b81602084016020830137600091810160200191909152969995985093969295946080939093013593505050565b600080600080600080600060a0888a0312156125c157600080fd5b873567ffffffffffffffff8111156125d857600080fd5b6125e48a828b016121ca565b9098509650506020880135945060408801356125ff81612352565b9350606088013567ffffffffffffffff81111561261b57600080fd5b6126278a828b016121ca565b989b979a50959894979596608090950135949350505050565b6000806000806060858703121561265657600080fd5b843561266181612352565b935060208501359250604085013567ffffffffffffffff81111561268457600080fd5b612690878288016121ca565b95989497509550505050565b600080600080600080608087890312156126b557600080fd5b863567ffffffffffffffff8111156126cc57600080fd5b6126d889828a016121ca565b90975095505060208701356126ec81612352565b9350604087013567ffffffffffffffff81111561270857600080fd5b61271489828a016121ca565b979a9699509497949695606090950135949350505050565b6000806020838503121561273f57600080fd5b823567ffffffffffffffff81111561275657600080fd5b612762858286016121ca565b90969095509350505050565b6000806000806060858703121561278457600080fd5b843561278f81612352565b9350602085013567ffffffffffffffff81111561224757600080fd5b600080602083850312156127be57600080fd5b823567ffffffffffffffff8111156127d557600080fd5b8301601f810185136127e657600080fd5b803567ffffffffffffffff8111156127fd57600080fd5b8560208260051b840101111561281257600080fd5b6020919091019590945092505050565b60005b8381101561283d578181015183820152602001612825565b50506000910152565b6000815180845261285e816020860160208601612822565b601f01601f19169290920160200192915050565b6000602082016020835280845180835260408501915060408160051b86010192506020860160005b828110156128cb57603f198786030184526128b6858351612846565b9450602093840193919091019060010161289a565b50929695505050505050565b600080600080608085870312156128ed57600080fd5b8435935060208501356128ff81612352565b925061290d60408601612266565b9150606085013561291d81612352565b939692955090935050565b6000806000806000806080878903121561294157600080fd5b863561294c81612352565b955060208701359450604087013567ffffffffffffffff81111561296f57600080fd5b61297b89828a016121ca565b909550935050606087013567ffffffffffffffff81111561299b57600080fd5b6129a789828a016121ca565b979a9699509497509295939492505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60058110612a0057634e487b7160e01b600052602160045260246000fd5b9052565b89815260c060208201526000612a1e60c083018a8c6129b9565b8281036040840152612a3181898b6129b9565b9050612a4060608401886129e2565b8281036080840152612a538186886129b9565b9150508260a08301529a9950505050505050505050565b600060208284031215612a7c57600080fd5b5051919050565b600060208284031215612a9557600080fd5b81516116f981612352565b602081526000610f5d6020830184866129b9565b60008251612ac6818460208701612822565b9190910192915050565b8481526001600160a01b0384166020820152612aef60408201846129e2565b608060608201526000612b056080830184612846565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112612b3c57600080fd5b83018035915067ffffffffffffffff821115612b5757600080fd5b60200191503681900382131561220c57600080fd5b8183823760009101908152919050565b600060208284031215612b8e57600080fd5b815167ffffffffffffffff811115612ba557600080fd5b8201601f81018413612bb657600080fd5b8051612bc461255f826124a5565b818152856020838501011115612bd957600080fd5b6105c7826020830160208601612822565b604081526000612bfe6040830186886129b9565b82810360208401526110958185876129b9565b87815260e060208201526000612c2a60e0830189612846565b8281036040840152612c3c8189612846565b90508281036060840152612c508188612846565b905060ff8616608084015282810360a0840152612c6d8186612846565b9150508260c083015298975050505050505050565b600060208284031215612c9457600080fd5b815180151581146116f957600080fd5b828152604060208201526001600160a01b0382511660408201526020820151606082015260006040830151606060808401526105c760a0840182612846565b600060208284031215612cf557600080fd5b81516116f98161234356fea2646970667358221220cacd0b832a9965a402d4ae25f46cea9101570fa545d1329e9171ce8a8171860364736f6c634300081b0033000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c

Deployed Bytecode

0x6080604052600436106101c25760003560e01c8063864a0dcf116100f7578063a5269ef111610095578063d8c0326811610064578063d8c0326814610504578063e30c397814610517578063e8a1d6f61461054b578063f2fde38b1461056b57600080fd5b8063a5269ef114610491578063a75483d1146104b1578063ac9650d8146104c4578063b2292888146104e457600080fd5b80639d6d57b3116100d15780639d6d57b31461041e5780639ded06df1461043e578063a3499c731461045e578063a37fcf4e1461047e57600080fd5b8063864a0dcf146103a35780638da5cb5b146103d7578063993a5b9e1461040b57600080fd5b80635c60da1b1161016457806379ba50971161013e57806379ba50971461031b5780637c2def17146103305780638291286c14610350578063848f7b631461038357600080fd5b80635c60da1b146102b25780635d79c00e146102e6578063710bf322146102f957600080fd5b80633e12f8c5116101a05780633e12f8c51461024c578063415621061461025f57806343b0f3d31461027f5780634987e2c21461029f57600080fd5b8063010987dc146101c757806309c6bed9146101ed5780630f4433d314610239575b600080fd5b6101da6101d5366004612213565b61058b565b6040519081526020015b60405180910390f35b3480156101f957600080fd5b506102217f000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c81565b6040516001600160a01b0390911681526020016101e4565b6101da61024736600461227a565b6105d0565b6101da61025a366004612367565b61068e565b34801561026b57600080fd5b506101da61027a366004612415565b610bb5565b34801561028b57600080fd5b506101da61029a366004612432565b610c3a565b6101da6102ad3660046124cd565b610cc7565b3480156102be57600080fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54610221565b6101da6102f43660046125a6565b610dcd565b34801561030557600080fd5b50610319610314366004612415565b610dfc565b005b34801561032757600080fd5b50610319610ecb565b34801561033c57600080fd5b506101da61034b366004612432565b610f45565b34801561035c57600080fd5b507f80547d63ed663962b99f8ed432bff3879a35b5418af92258aa171feef14cc3cc6101da565b34801561038f57600080fd5b5061031961039e366004612640565b610f65565b3480156103af57600080fd5b506101da7f39520897016aaf0ab8e5bf7b0c72c0875359483112298e4b64220a3abfb31c1a81565b3480156103e357600080fd5b507f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c054610221565b6101da61041936600461269c565b611068565b34801561042a57600080fd5b506101da610439366004612432565b6110a0565b34801561044a57600080fd5b5061031961045936600461272c565b611113565b34801561046a57600080fd5b50610319610479366004612640565b611179565b6101da61048c36600461276e565b61149b565b34801561049d57600080fd5b506101da6104ac366004612432565b6114c5565b6101da6104bf366004612415565b6114d2565b6104d76104d23660046127ab565b611592565b6040516101e49190612872565b3480156104f057600080fd5b506101da6104ff366004612415565b6116e2565b6101da6105123660046128d7565b611700565b34801561052357600080fd5b507f9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d154610221565b34801561055757600080fd5b50610319610566366004612928565b6117d8565b34801561057757600080fd5b50610319610586366004612415565b6119ef565b60006105c785828686825b6040519080825280601f01601f1916602001820160405280156105c0576020820181803683370190505b5087610cc7565b95945050505050565b6000806105dd338c6110a0565b90507f000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c6001600160a01b0316630f4433d384838d8d8d8d8d8d8d8d6040518b63ffffffff1660e01b815260040161063c99989796959493929190612a04565b60206040518083038185885af115801561065a573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061067f9190612a6a565b9b9a5050505050505050505050565b6000338161069c828c610c3a565b60408051600080825281830190925260208101828152929350919087156106cd576106c630611a3f565b9250610781565b6001600160a01b0387161561074f577f000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c6001600160a01b0316876001600160a01b03160361073d5760405162f78d2360e81b81526001600160a01b03881660048201526024015b60405180910390fd5b6106c6876001600160a01b0316611a3f565b6040517fdb80c5f100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61081884838f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8887611a6d565b95508715610ba45760405163b90d6afd60e01b8152600481018790526000907f000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c6001600160a01b03169063b90d6afd90602401602060405180830381865afa158015610888573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ac9190612a83565b6040517f7e10eb15000000000000000000000000000000000000000000000000000000008152600481018990529091506000906001600160a01b037f000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c1690637e10eb1590602401602060405180830381865afa158015610930573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109549190612a83565b6040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b038981166004830152602482018d9052919250908316906340c10f1990604401600060405180830381600087803b1580156109bb57600080fd5b505af11580156109cf573d6000803e3d6000fd5b50506040517fcf86a95a0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301528516925063cf86a95a9150602401600060405180830381600087803b158015610a2f57600080fd5b505af1158015610a43573d6000803e3d6000fd5b50506040517fe915cfd10000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038416925063e915cfd19150602401600060405180830381600087803b158015610aa157600080fd5b505af1158015610ab5573d6000803e3d6000fd5b50506040517f120a63b50000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301528416925063120a63b59150602401600060405180830381600087803b158015610b1557600080fd5b505af1158015610b29573d6000803e3d6000fd5b50506040517f4a6a42d80000000000000000000000000000000000000000000000000000000081526001600160a01b038c8116600483015284169250634a6a42d89150602401600060405180830381600087803b158015610b8957600080fd5b505af1158015610b9d573d6000803e3d6000fd5b5050505050505b505050505098975050505050505050565b604080517f9ca52083bb00ac0f5bed7edcaabb0534d03efb0719807b54a8029c4d1313630960208201527f39520897016aaf0ab8e5bf7b0c72c0875359483112298e4b64220a3abfb31c1a918101919091526001600160a01b03821660608201526000906080015b604051602081830303815290604052805190602001209050919050565b604080517ff84d43c32bc607f1bdb175c63a0cf1939bf0cc8cc3565450be225afbb5a1098560208201527f39520897016aaf0ab8e5bf7b0c72c0875359483112298e4b64220a3abfb31c1a918101919091526001600160a01b03831660608201526080810182905260009060a0015b60405160208183030381529060405280519060200120905092915050565b600080610cd43389610c3a565b90506001600160a01b03871615610d8a576000610cf082611b0b565b9050610cfc8189611bbd565b845115610d6f57600060405180606001604052808a6001600160a01b0316815260200183815260200189898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152509050610d698187611d72565b50610d84565b610d81886001600160a01b0316611a3f565b94505b50610db4565b835115610db45760405162f78d2360e81b81526001600160a01b0388166004820152602401610734565b610dc18187878787611e04565b98975050505050505050565b60008615610dee57604051630280e1e560e61b815260040160405180910390fd5b610dc1868686866000610596565b33610e257f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05490565b6001600160a01b031614610e4c576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b038116610e7357604051633649397d60e21b815260040160405180910390fd5b6040516001600160a01b038216907fd9be0e8e07417e00f2521db636cb53e316fd288f5051f16d2aa2bf0c3938a87690600090a27f9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d155565b6000610ef57f9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d15490565b90506001600160a01b0381163314610f39576040517f49e27cff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f4281611f4f565b50565b600080610f5284846110a0565b9050610f5d81611b0b565b949350505050565b336000610f7286866114c5565b90506000610fd66040518060600160405280856001600160a01b0316815260200184815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050915250611ff2565b90507fd4f5c43117c663161acfe6af3208a49856d85e586baf0f60749de2055e00146560000160008281526020019081526020016000206000905581876001600160a01b0316846001600160a01b03167f45aa4b37a2bdfa1ab8962f148a8e9cdf22eda891c46dbdea19295cd85c10b1128888604051611057929190612aa0565b60405180910390a450505050505050565b6000851561108957604051630280e1e560e61b815260040160405180910390fd5b6110958585858561149b565b979650505050505050565b604080517f5498bf1696259c19f826e687122ca9404f85fe476a9e186af31eb6a53bf123dc60208201527f39520897016aaf0ab8e5bf7b0c72c0875359483112298e4b64220a3abfb31c1a918101919091526001600160a01b03831660608201526080810182905260009060a001610ca9565b307f0000000000000000000000009c551097d890e16f407a1e675490a2359b3933fd6001600160a01b031603611175576040517fbf10dd3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b336111a27f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05490565b6001600160a01b0316146111c9576040516330cd747160e01b815260040160405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b0316638291286c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611228573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124c9190612a6a565b846001600160a01b0316638291286c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561128a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ae9190612a6a565b146112e5576040517f68155f9a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836001600160a01b03163f8314611328576040517f8f84fb2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8490556040516001600160a01b038516907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28015611495576000846001600160a01b0316639ded06df60e01b84846040516024016113ad929190612aa0565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516114189190612ab4565b600060405180830381855af49150503d8060008114611453576040519150601f19603f3d011682016040523d82523d6000602084013e611458565b606091505b5050905080611493576040517f97905dfb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b50505050565b6040805160208101909152600080825290816114b687610bb5565b90506110958187878588611e04565b600080610f528484610c3a565b6000806114de83610bb5565b6040805160208101909152600081529091506114f984612027565b5050604051637a4e022560e11b81526001600160a01b037f000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c16915063f49c044a9061154f90859088906002908790600401612ad0565b6020604051808303816000875af115801561156e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5d9190612a6a565b60608167ffffffffffffffff8111156115ad576115ad61245e565b6040519080825280602002602001820160405280156115e057816020015b60608152602001906001900390816115cb5790505b5090506000606060005b848110156116d9573086868381811061160557611605612b0f565b90506020028101906116179190612b25565b604051611625929190612b6c565b600060405180830381855af49150503d8060008114611660576040519150601f19603f3d011682016040523d82523d6000602084013e611665565b606091505b509093509150826116b35781516000036116ab576040517f4d6a232800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815182602001fd5b818482815181106116c6576116c6612b0f565b60209081029190910101526001016115ea565b50505092915050565b6000806116ee83610bb5565b90506116f981611b0b565b9392505050565b60008061170d33876110a0565b6040805160208101909152600081529091506001600160a01b0384161561174357611740846001600160a01b0316611a3f565b90505b604051637a4e022560e11b81526001600160a01b037f000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c169063f49c044a906117959085908a908a908790600401612ad0565b6020604051808303816000875af11580156117b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110959190612a6a565b3360006117e588886114c5565b90506117f18183611bbd565b6040517f477aedc70000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c169063477aedc7906118589089908990600401612aa0565b600060405180830381865afa158015611875573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261189d9190810190612b7c565b516000036118d7576040517f08e1064e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006119396040518060600160405280856001600160a01b0316815260200184815260200189898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050915250611ff2565b9050848460405161194b929190612b6c565b604051809103902061197a7fd4f5c43117c663161acfe6af3208a49856d85e586baf0f60749de2055e00146590565b60000160008381526020019081526020016000208190555081896001600160a01b0316846001600160a01b03167fa8c6a99761ac63f2758a4683a64d2be54964d5d74b9d296b6563a5b4c0d23fce8a8a8a8a6040516119dc9493929190612bea565b60405180910390a4505050505050505050565b33611a187f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05490565b6001600160a01b031614610f39576040516330cd747160e01b815260040160405180910390fd5b6040805160148082528183019092526060916020820181803683375050506014808201939093529182525090565b60007f000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c6001600160a01b031663e1d40c77838a8a8a8a8a8a8a6040518963ffffffff1660e01b8152600401611ac89796959493929190612c11565b60206040518083038185885af1158015611ae6573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610dc19190612a6a565b6040517fa5269ef100000000000000000000000000000000000000000000000000000000815260006004820181905260248201839052907f000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c6001600160a01b03169063a5269ef190604401602060405180830381865afa158015611b93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb79190612a6a565b92915050565b60405163b90d6afd60e01b8152600481018390526000907f000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c6001600160a01b03169063b90d6afd90602401602060405180830381865afa158015611c25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c499190612a83565b6040517faa271e1a0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301529192509082169063aa271e1a90602401602060405180830381865afa158015611cac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cd09190612c82565b611d11576040517f361c31f20000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610734565b7f000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c6001600160a01b0316826001600160a01b031603611d6d5760405162f78d2360e81b81526001600160a01b0383166004820152602401610734565b505050565b6000611d7d83611ff2565b825160208085019190912060008381527fd4f5c43117c663161acfe6af3208a49856d85e586baf0f60749de2055e001465928390526040902054929350909114611df3576040517f4e9f6b5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600091825260205260408120555050565b600080611e1087611b0b565b60405163b90d6afd60e01b8152600481018290529091506000906001600160a01b037f000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c169063b90d6afd90602401602060405180830381865afa158015611e7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e9f9190612a83565b90506000806000611eaf84612027565b925092509250611efc8b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791508690508d8d611a6d565b9550848614611f41576040517f750285420000000000000000000000000000000000000000000000000000000081526004810187905260248101869052604401610734565b505050505095945050505050565b6001600160a01b038116611f7657604051633649397d60e21b815260040160405180910390fd5b6040516001600160a01b038216907f04dba622d284ed0014ee4b9a6a68386be1a4c08a4913ae272de89199cc68616390600090a27f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c05560007f9855384122b55936fbfb8ca5120e63c6537a1ac40caf6ae33502b3c5da8c87d155565b60007ff1302cc23b373b441b50010257156be4e920e78f3dc60bf8cd05c64367827f6082604051602001610c1d929190612ca4565b606080600080849050806001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa92505050801561208f57506040513d6000823e601f3d908101601f1916820160405261208c9190810190612b7c565b60015b6120b657604051629fd8a560e11b81526001600160a01b0386166004820152602401610734565b9350806001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa92505050801561211757506040513d6000823e601f3d908101601f191682016040526121149190810190612b7c565b60015b61213e57604051629fd8a560e11b81526001600160a01b0386166004820152602401610734565b9250806001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561219a575060408051601f3d908101601f1916820190925261219791810190612ce3565b60015b6121c157604051629fd8a560e11b81526001600160a01b0386166004820152602401610734565b93959294505050565b60008083601f8401126121dc57600080fd5b50813567ffffffffffffffff8111156121f457600080fd5b60208301915083602082850101111561220c57600080fd5b9250929050565b6000806000806060858703121561222957600080fd5b84359350602085013567ffffffffffffffff81111561224757600080fd5b612253878288016121ca565b9598909750949560400135949350505050565b80356005811061227557600080fd5b919050565b600080600080600080600080600060c08a8c03121561229857600080fd5b8935985060208a013567ffffffffffffffff8111156122b657600080fd5b6122c28c828d016121ca565b90995097505060408a013567ffffffffffffffff8111156122e257600080fd5b6122ee8c828d016121ca565b9097509550612301905060608b01612266565b935060808a013567ffffffffffffffff81111561231d57600080fd5b6123298c828d016121ca565b9a9d999c50979a9699959894979660a00135949350505050565b60ff81168114610f4257600080fd5b6001600160a01b0381168114610f4257600080fd5b60008060008060008060008060c0898b03121561238357600080fd5b88359750602089013567ffffffffffffffff8111156123a157600080fd5b6123ad8b828c016121ca565b909850965050604089013567ffffffffffffffff8111156123cd57600080fd5b6123d98b828c016121ca565b90965094505060608901356123ed81612343565b92506080890135915060a089013561240481612352565b809150509295985092959890939650565b60006020828403121561242757600080fd5b81356116f981612352565b6000806040838503121561244557600080fd5b823561245081612352565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561249d5761249d61245e565b604052919050565b600067ffffffffffffffff8211156124bf576124bf61245e565b50601f01601f191660200190565b60008060008060008060a087890312156124e657600080fd5b8635955060208701356124f881612352565b9450604087013567ffffffffffffffff81111561251457600080fd5b61252089828a016121ca565b909550935050606087013567ffffffffffffffff81111561254057600080fd5b8701601f8101891361255157600080fd5b803561256461255f826124a5565b612474565b8181528a602083850101111561257957600080fd5b81602084016020830137600091810160200191909152969995985093969295946080939093013593505050565b600080600080600080600060a0888a0312156125c157600080fd5b873567ffffffffffffffff8111156125d857600080fd5b6125e48a828b016121ca565b9098509650506020880135945060408801356125ff81612352565b9350606088013567ffffffffffffffff81111561261b57600080fd5b6126278a828b016121ca565b989b979a50959894979596608090950135949350505050565b6000806000806060858703121561265657600080fd5b843561266181612352565b935060208501359250604085013567ffffffffffffffff81111561268457600080fd5b612690878288016121ca565b95989497509550505050565b600080600080600080608087890312156126b557600080fd5b863567ffffffffffffffff8111156126cc57600080fd5b6126d889828a016121ca565b90975095505060208701356126ec81612352565b9350604087013567ffffffffffffffff81111561270857600080fd5b61271489828a016121ca565b979a9699509497949695606090950135949350505050565b6000806020838503121561273f57600080fd5b823567ffffffffffffffff81111561275657600080fd5b612762858286016121ca565b90969095509350505050565b6000806000806060858703121561278457600080fd5b843561278f81612352565b9350602085013567ffffffffffffffff81111561224757600080fd5b600080602083850312156127be57600080fd5b823567ffffffffffffffff8111156127d557600080fd5b8301601f810185136127e657600080fd5b803567ffffffffffffffff8111156127fd57600080fd5b8560208260051b840101111561281257600080fd5b6020919091019590945092505050565b60005b8381101561283d578181015183820152602001612825565b50506000910152565b6000815180845261285e816020860160208601612822565b601f01601f19169290920160200192915050565b6000602082016020835280845180835260408501915060408160051b86010192506020860160005b828110156128cb57603f198786030184526128b6858351612846565b9450602093840193919091019060010161289a565b50929695505050505050565b600080600080608085870312156128ed57600080fd5b8435935060208501356128ff81612352565b925061290d60408601612266565b9150606085013561291d81612352565b939692955090935050565b6000806000806000806080878903121561294157600080fd5b863561294c81612352565b955060208701359450604087013567ffffffffffffffff81111561296f57600080fd5b61297b89828a016121ca565b909550935050606087013567ffffffffffffffff81111561299b57600080fd5b6129a789828a016121ca565b979a9699509497509295939492505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60058110612a0057634e487b7160e01b600052602160045260246000fd5b9052565b89815260c060208201526000612a1e60c083018a8c6129b9565b8281036040840152612a3181898b6129b9565b9050612a4060608401886129e2565b8281036080840152612a538186886129b9565b9150508260a08301529a9950505050505050505050565b600060208284031215612a7c57600080fd5b5051919050565b600060208284031215612a9557600080fd5b81516116f981612352565b602081526000610f5d6020830184866129b9565b60008251612ac6818460208701612822565b9190910192915050565b8481526001600160a01b0384166020820152612aef60408201846129e2565b608060608201526000612b056080830184612846565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112612b3c57600080fd5b83018035915067ffffffffffffffff821115612b5757600080fd5b60200191503681900382131561220c57600080fd5b8183823760009101908152919050565b600060208284031215612b8e57600080fd5b815167ffffffffffffffff811115612ba557600080fd5b8201601f81018413612bb657600080fd5b8051612bc461255f826124a5565b818152856020838501011115612bd957600080fd5b6105c7826020830160208601612822565b604081526000612bfe6040830186886129b9565b82810360208401526110958185876129b9565b87815260e060208201526000612c2a60e0830189612846565b8281036040840152612c3c8189612846565b90508281036060840152612c508188612846565b905060ff8616608084015282810360a0840152612c6d8186612846565b9150508260c083015298975050505050505050565b600060208284031215612c9457600080fd5b815180151581146116f957600080fd5b828152604060208201526001600160a01b0382511660408201526020820151606082015260006040830151606060808401526105c760a0840182612846565b600060208284031215612cf557600080fd5b81516116f98161234356fea2646970667358221220cacd0b832a9965a402d4ae25f46cea9101570fa545d1329e9171ce8a8171860364736f6c634300081b0033

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

000000000000000000000000b5fb4be02232b1bba4dc8f81dc24c26980de9e3c

-----Decoded View---------------
Arg [0] : interchainTokenService_ (address): 0xB5FB4BE02232B1bBA4dC8f81dc24C26980dE9e3C

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


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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