Soroswap icon

Soroswap

Interact with Soroswap DEX on Stellar network

Overview

This node integrates with the Soroswap decentralized exchange (DEX) on the Stellar network, enabling users to interact programmatically with various Soroswap features. The "Get Contract Address" operation specifically retrieves the blockchain address of a selected Soroswap smart contract for a specified network (Mainnet or Testnet).

Typical use cases include:

  • Dynamically obtaining contract addresses for integration in other workflows or smart contract interactions.
  • Verifying contract deployment addresses before executing transactions.
  • Supporting multi-network deployments by switching between Mainnet and Testnet addresses.

For example, a user might want to fetch the "Factory" contract address on the Mainnet to configure another node that interacts with liquidity pools created by that factory.

Properties

Name Meaning
Network Selects the blockchain network to query: Mainnet or Testnet
Contract Name Specifies which Soroswap contract address to retrieve. Options are: Factory, Router, Aggregator

Output

The node outputs a JSON object containing the requested contract address as a string. The structure is:

{
  "json": "<contract_address_string>"
}

Where <contract_address_string> is the blockchain address of the selected contract on the chosen network.

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for Soroswap's SDK service.
  • Uses the Soroswap SDK library (@soroswap/sdk) to perform API calls.
  • Needs proper configuration of the API base URL and API key within n8n credentials.

Troubleshooting

  • Common issues:

    • Invalid or missing API key credential will cause authentication failures.
    • Selecting an unsupported network or contract name may result in errors or empty responses.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • "Unknown operation: getContractAddress" — indicates a misconfiguration or typo in the operation parameter.
    • API errors related to authorization or rate limits should be resolved by verifying the API key and usage limits.
  • Resolution tips:

    • Ensure the API key credential is correctly set up and linked to the node.
    • Confirm the network and contract name values are valid and supported.
    • Use the "Continue On Fail" option to handle errors gracefully in batch executions.

Links and References

Discussion