{
    "Function": "swapToken",
    "File": "contracts/gmp-sdk/test/gmp/SourceChainSwapCaller.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "IERC20",
        "IAxelarGateway",
        "IAxelarGateway",
        "IERC20"
    ],
    "Internal Calls": [
        "abi.encode()"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function swapToken(\n        string memory symbolA,\n        string memory symbolB,\n        uint256 amount,\n        string memory recipient\n    ) external payable {\n        address tokenX = gateway.tokenAddresses(symbolA);\n        bytes memory payload = abi.encode(symbolB, recipient);\n\n        IERC20(tokenX).transferFrom(msg.sender, address(this), amount);\n\n        IERC20(tokenX).approve(address(gateway), amount);\n        gateway.callContractWithToken(destinationChain, executableAddress, payload, symbolA, amount);\n    }"
}