{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/deposit-service/AxelarDepositService.sol",
    "Parent Contracts": [
        "contracts/interfaces/IAxelarDepositService.sol",
        "contracts/deposit-service/DepositBase.sol",
        "contracts/interfaces/IDepositBase.sol",
        "contracts/util/Upgradable.sol",
        "contracts/interfaces/IUpgradable.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract AxelarDepositService is Upgradable, DepositBase, IAxelarDepositService {\n    address public immutable receiverImplementation;\n\n    constructor(address gateway, string memory wrappedSymbol) DepositBase(gateway, wrappedSymbol) {\n        receiverImplementation = address(new ReceiverImplementation(gateway, wrappedSymbol));\n    }\n\n    // @dev This method is meant to called directly by user to send native token cross-chain\n    function sendNative(string calldata destinationChain, string calldata destinationAddress) external payable {\n        address wrappedTokenAddress = wrappedToken();\n        uint256 amount = msg.value;\n\n        if (amount == 0) revert NothingDeposited();\n\n        IWETH9(wrappedTokenAddress).deposit{ value: amount }();\n        IERC20(wrappedTokenAddress).approve(gateway, amount);\n        IAxelarGateway(gateway).sendToken(destinationChain, destinationAddress, wrappedSymbol(), amount);\n    }\n\n    // @dev Generates a deposit address for sending an ERC20 token cross-chain\n    function addressForTokenDeposit(\n        bytes32 salt,\n        address refundAddress,\n        string calldata destinationChain,\n        string calldata destinationAddress,\n        string calldata tokenSymbol\n    ) external view returns (address) {\n        return\n            _depositAddress(\n                salt,\n                abi.encodeWithSelector(\n                    ReceiverImplementation.receiveAndSendToken.selector,\n                    refundAddress,\n                    destinationChain,\n                    destinationAddress,\n                    tokenSymbol\n                )\n            );\n    }\n\n    // @dev Generates a deposit address for sending native currency cross-chain\n    function addressForNativeDeposit(\n        bytes32 salt,\n        address refundAddress,\n        string calldata destinationChain,\n        string calldata destinationAddress\n    ) public view returns (address) {\n        return\n            _depositAddress(\n                salt,\n                abi.encodeWithSelector(\n                    ReceiverImplementation.receiveAndSendNative.selector,\n                    refundAddress,\n                    destinationChain,\n                    destinationAddress\n                )\n            );\n    }\n\n    // @dev Generates a deposit address for unwrapping WETH-like token into native currency\n    function addressForNativeUnwrap(\n        bytes32 salt,\n        address refundAddress,\n        address recipient\n    ) external view returns (address) {\n        return\n            _depositAddress(salt, abi.encodeWithSelector(ReceiverImplementation.receiveAndUnwrapNative.selector, refundAddress, recipient));\n    }\n\n    // @dev Receives ERC20 token from the deposit address and sends it cross-chain\n    function sendTokenDeposit(\n        bytes32 salt,\n        address refundAddress,\n        string calldata destinationChain,\n        string calldata destinationAddress,\n        string calldata tokenSymbol\n    ) external {\n        // NOTE: `DepositReceiver` is destroyed in the same runtime context that it is deployed.\n        new DepositReceiver{ salt: salt }(\n            abi.encodeWithSelector(\n                ReceiverImplementation.receiveAndSendToken.selector,\n                refundAddress,\n                destinationChain,\n                destinationAddress,\n                tokenSymbol\n            )\n        );\n    }\n\n    // @dev Refunds ERC20 tokens from the deposit address if they don't match the intended token\n    // Only refundAddress can refund the token that was intended to go cross-chain (if not sent yet)\n    function refundTokenDeposit(\n        bytes32 salt,\n        address refundAddress,\n        string calldata destinationChain,\n        string calldata destinationAddress,\n        string calldata tokenSymbol,\n        address[] calldata refundTokens\n    ) external {\n        for (uint256 i; i < refundTokens.length; i++) {\n            address gatewayToken = IAxelarGateway(gateway).tokenAddresses(tokenSymbol);\n\n            // Allowing only the refundAddress to refund the intended token\n            if (refundTokens[i] == gatewayToken && msg.sender != refundAddress) continue;\n\n            // Saving to public storage to be accessed by the DepositReceiver\n            refundToken = refundTokens[i];\n            // NOTE: `DepositReceiver` is destroyed in the same runtime context that it is deployed.\n            new DepositReceiver{ salt: salt }(\n                abi.encodeWithSelector(\n                    ReceiverImplementation.receiveAndSendToken.selector,\n                    refundAddress,\n                    destinationChain,\n                    destinationAddress,\n                    tokenSymbol\n                )\n            );\n        }\n\n        refundToken = address(0);\n    }\n\n    // @dev Receives native currency, wraps it into WETH-like token and sends cross-chain\n    function sendNativeDeposit(\n        bytes32 salt,\n        address refundAddress,\n        string calldata destinationChain,\n        string calldata destinationAddress\n    ) external {\n        // NOTE: `DepositReceiver` is destroyed in the same runtime context that it is deployed.\n        new DepositReceiver{ salt: salt }(\n            abi.encodeWithSelector(\n                ReceiverImplementation.receiveAndSendNative.selector,\n                refundAddress,\n                destinationChain,\n                destinationAddress\n            )\n        );\n    }\n\n    // @dev Refunds ERC20 tokens from the deposit address after the native deposit was sent\n    // Only refundAddress can refund the native currency intended to go cross-chain (if not sent yet)\n    function refundNativeDeposit(\n        bytes32 salt,\n        address refundAddress,\n        string calldata destinationChain,\n        string calldata destinationAddress,\n        address[] calldata refundTokens\n    ) external {\n        // Allowing only the refundAddress to refund the native currency\n        if (addressForNativeDeposit(salt, refundAddress, destinationChain, destinationAddress).balance > 0 && msg.sender != refundAddress)\n            return;\n\n        for (uint256 i; i < refundTokens.length; i++) {\n            refundToken = refundTokens[i];\n            // NOTE: `DepositReceiver` is destroyed in the same runtime context that it is deployed.\n            new DepositReceiver{ salt: salt }(\n                abi.encodeWithSelector(\n                    ReceiverImplementation.receiveAndSendNative.selector,\n                    refundAddress,\n                    destinationChain,\n                    destinationAddress\n                )\n            );\n        }\n\n        refundToken = address(0);\n    }\n\n    // @dev Receives WETH-like token, unwraps and send native currency to the recipient\n    function nativeUnwrap(\n        bytes32 salt,\n        address refundAddress,\n        address payable recipient\n    ) external {\n        // NOTE: `DepositReceiver` is destroyed in the same runtime context that it is deployed.\n        new DepositReceiver{ salt: salt }(\n            abi.encodeWithSelector(ReceiverImplementation.receiveAndUnwrapNative.selector, refundAddress, recipient)\n        );\n    }\n\n    // @dev Refunds ERC20 tokens from the deposit address except WETH-like token\n    // Only refundAddress can refund the WETH-like token intended to be unwrapped (if not yet)\n    function refundNativeUnwrap(\n        bytes32 salt,\n        address refundAddress,\n        address payable recipient,\n        address[] calldata refundTokens\n    ) external {\n        for (uint256 i; i < refundTokens.length; i++) {\n            address wrappedTokenAddress = wrappedToken();\n\n            // Allowing only the refundAddress to refund the WETH-like token\n            if (refundTokens[i] == wrappedTokenAddress && msg.sender != refundAddress) continue;\n\n            refundToken = refundTokens[i];\n            // NOTE: `DepositReceiver` is destroyed in the same runtime context that it is deployed.\n            new DepositReceiver{ salt: salt }(\n                abi.encodeWithSelector(ReceiverImplementation.receiveAndUnwrapNative.selector, refundAddress, recipient)\n            );\n        }\n\n        refundToken = address(0);\n    }\n\n    function _depositAddress(bytes32 create2Salt, bytes memory delegateData) internal view returns (address) {\n        /* Convert a hash which is bytes32 to an address which is 20-byte long\n        according to https://docs.soliditylang.org/en/v0.8.1/control-structures.html?highlight=create2#salted-contract-creations-create2 */\n        return\n            address(\n                uint160(\n                    uint256(\n                        keccak256(\n                            abi.encodePacked(\n                                bytes1(0xff),\n                                address(this),\n                                create2Salt,\n                                // Encoding delegateData as a constructor param\n                                keccak256(abi.encodePacked(type(DepositReceiver).creationCode, abi.encode(delegateData)))\n                            )\n                        )\n                    )\n                )\n            );\n    }\n\n    function contractId() public pure returns (bytes32) {\n        return keccak256('axelar-deposit-service');\n    }\n}"
}