{
    "Function": "refundNativeDeposit",
    "File": "contracts/cgp/test/AxelarDepositService.sol",
    "Parent Contracts": [
        "contracts/cgp/interfaces/IAxelarDepositService.sol",
        "contracts/cgp/test/DepositServiceBase.sol",
        "contracts/cgp/interfaces/IDepositServiceBase.sol",
        "contracts/cgp/util/Upgradable.sol",
        "contracts/cgp/interfaces/IUpgradable.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "addressForNativeDeposit",
        "balance(address)",
        "abi.encodeWithSelector()"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "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        uint256 tokensLength = refundTokens.length;\n        for (uint256 i; i < tokensLength; ++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                refundAddress\n            );\n        }\n\n        refundToken = address(0);\n    }"
}