<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Soroswap.Finance</title>
    <description>The latest articles on DEV Community by Soroswap.Finance (@soroswap).</description>
    <link>https://dev.to/soroswap</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F7797%2Fd4df7436-2595-4ab9-9c26-506069f4fbe3.jpg</url>
      <title>DEV Community: Soroswap.Finance</title>
      <link>https://dev.to/soroswap</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/soroswap"/>
    <language>en</language>
    <item>
      <title>Step-by-Step Guide to Perform a Token Swap on Soroswap.Finance</title>
      <dc:creator>Jenny T.</dc:creator>
      <pubDate>Tue, 17 Sep 2024 12:48:25 +0000</pubDate>
      <link>https://dev.to/soroswap/step-by-step-guide-to-perform-a-token-swap-on-soroswapfinance-39gk</link>
      <guid>https://dev.to/soroswap/step-by-step-guide-to-perform-a-token-swap-on-soroswapfinance-39gk</guid>
      <description>&lt;p&gt;Here's a detailed, step-by-step guide on how to perform a token swap on Soroswap.Finance, tailored for new users. This guide will walk you through the process, from setting up your wallet to completing the token swap, with helpful tips and essential precautions to ensure a smooth experience.&lt;/p&gt;

&lt;p&gt;Follow the steps below to perform a swap:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1:  Access Soroswap:
&lt;/h3&gt;

&lt;p&gt;Go to the official &lt;a href="https://soroswap.finance" rel="noopener noreferrer"&gt;soroswap.finance&lt;/a&gt; website.&lt;/p&gt;

&lt;p&gt;Click the “Launch App” button on the homepage to start interacting with Soroswap’s decentralized platform. This will take you to the swap interface.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu9ho3e40b1y74vo9wqk7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu9ho3e40b1y74vo9wqk7.png" alt=" " width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 2: Connect your wallet with Soroswap.Finance&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Choose a Stellar Wallet:&lt;/strong&gt; Select a wallet compatible with the Stellar network. For further guidance, you can check out this helpful article: &lt;a href="https://dev.to/soroswap/guide-to-choosing-wallet-for-the-stellar-network-53k1"&gt;Guide to Choosing a Stellar Wallet&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwocvcmiqoc06r4jd6zsl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwocvcmiqoc06r4jd6zsl.png" alt=" " width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;Acquire Stellar (XLM):&lt;/strong&gt; Purchase XLM from a reputable exchange or transfer it from another wallet if you already own some.&lt;/p&gt;

&lt;p&gt;3.&lt;strong&gt;Deposit XLM into Your Wallet:&lt;/strong&gt; Transfer the XLM to your new Stellar wallet address&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If this is your first time, you will need to acquire Stellar (XLM) and transfer it to your wallet.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 3: Navigate the Soroswap Finance Interface&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Once your Stellar wallet is connected, familiarize yourself with the Soroswap dashboard. It displays your account details, token balances, and options for swapping tokens and managing your assets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbdy7yrg07gsbo3jyy6q2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbdy7yrg07gsbo3jyy6q2.png" alt=" " width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 4: Executing a Token Swap&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;1.&lt;strong&gt;Select Tokens:&lt;/strong&gt; Choose the tokens you want to swap from and to.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1epj9kq73ei4apir8px7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1epj9kq73ei4apir8px7.png" alt=" " width="800" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;Enter Amount:&lt;/strong&gt; Specify the amount of tokens you want to exchange.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fun4owqk4q93cohmo6ggz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fun4owqk4q93cohmo6ggz.png" alt=" " width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Trustlines&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When swapping a new token for the first time on Soroswap.Finance, you’ll need to sign a "trustline" transaction. Trustlines authorize your account to hold and exchange a specific asset.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6dlobvgg10jz45hgt64b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6dlobvgg10jz45hgt64b.png" alt=" " width="800" height="361"&gt;&lt;/a&gt;&lt;br&gt;
1.&lt;strong&gt;Transaction Request:&lt;/strong&gt; A transaction request is sent to authorize your wallet to hold and trade the new token.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd6jq4hr5kgdp55qbxod3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd6jq4hr5kgdp55qbxod3.png" alt=" " width="800" height="351"&gt;&lt;/a&gt;&lt;br&gt;
2.&lt;strong&gt;Sign the Trustline Transaction:&lt;/strong&gt; Once the transaction is signed, the trustline is successfully authorized, enabling your wallet to hold and manage the new asset.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjo2jz9xcrzmii6wl2se.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjo2jz9xcrzmii6wl2se.png" alt=" " width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For more information, refer to the official documentation on &lt;a href="https://docs.soroswap.finance/01-concepts/trustlines" rel="noopener noreferrer"&gt;trustlines&lt;/a&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 6: Confirming  the Transaction&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Sign the Transaction:&lt;/strong&gt; Approve the transaction to finalize the swap.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff2smtbtfc87i8f3s8fv1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff2smtbtfc87i8f3s8fv1.png" alt=" " width="714" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congratulations! You have successfully completed a swap on Soroswap.Finance Now.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4i5xbld74hh31i2fi9ei.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4i5xbld74hh31i2fi9ei.png" alt=" " width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step Step 7: Check That Your Transaction Went Through
&lt;/h3&gt;

&lt;p&gt;After signing the transaction, it's important to confirm that everything went smoothly. To do this, check the details in your wallet or by using one of the blockchain explorers. This step ensures that the token swap has been completed and that the new tokens are now visible in your balance.&lt;/p&gt;

&lt;p&gt;Once the transaction is confirmed, you’ll see a success message indicating the swap is complete. At this point, you can review the transaction details by selecting one of these options:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5n5vdd4kcpkyscocvdez.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5n5vdd4kcpkyscocvdez.png" alt=" " width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://stellar.expert/explorer" rel="noopener noreferrer"&gt;View in Stellar.Expert&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://stellarchain.io" rel="noopener noreferrer"&gt;View in StellarChain&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By following this step, you can be sure the swap has successfully processed and that your wallet reflects the correct balance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Best Practices
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Sufficient XLM for Fees:&lt;/strong&gt; Ensure you have enough XLM in your wallet to cover transaction fees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review Trustlines:&lt;/strong&gt; Confirm that all necessary trustlines are set up before performing a swap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check Transaction History:&lt;/strong&gt; Verify in your wallet that the swap has been completed and the new tokens are reflected in your balance.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This guide aims to provide clear and simple instructions to help you successfully complete your first token swap on Soroswap.Finance. Remember, handling digital assets responsibly is crucial for maintaining the security of your investments.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official Website:&lt;/strong&gt; &lt;a href="https://soroswap.finance/" rel="noopener noreferrer"&gt;Soroswap.Finance&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Twitter:&lt;/strong&gt; &lt;a href="https://twitter.com/SoroswapFinance" rel="noopener noreferrer"&gt;@SoroswapFinance&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/soroswap" rel="noopener noreferrer"&gt;Soroswap&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation:&lt;/strong&gt; &lt;a href="https://docs.soroswap.finance/" rel="noopener noreferrer"&gt;docs.soroswap.finance&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>stellarchallenge</category>
      <category>soroban</category>
    </item>
    <item>
      <title>Guide to Choosing Wallet for the Stellar Network</title>
      <dc:creator>Jenny T.</dc:creator>
      <pubDate>Wed, 11 Sep 2024 16:46:22 +0000</pubDate>
      <link>https://dev.to/soroswap/guide-to-choosing-wallet-for-the-stellar-network-53k1</link>
      <guid>https://dev.to/soroswap/guide-to-choosing-wallet-for-the-stellar-network-53k1</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Before you can start using &lt;a href="https://soroswap.finance" rel="noopener noreferrer"&gt;Soroswap.Finance 🪐&lt;/a&gt;, the decentralized exchange on the Soroban blockchain, you'll need to set up a wallet for &lt;a href="https://stellar.org/learn/lumens" rel="noopener noreferrer"&gt;Stellar Lumens (XLM)&lt;/a&gt;. A Stellar Lumens wallet is essential for storing and sending XLM. In this article, you'll learn about the importance of a Stellar Lumens wallet, the types available, our recommended choices, and more.&lt;/p&gt;

&lt;h3&gt;
  
  
  User Interface
&lt;/h3&gt;

&lt;p&gt;Wallets on the Stellar network come in several forms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mobile Wallets:&lt;/strong&gt;&lt;br&gt;
Offer convenience and accessibility. Ideal for users who need access on the go.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Browser Extensions:&lt;/strong&gt;&lt;br&gt;
Facilitate quick transactions and are easy to integrate with web services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Desktop Wallets:&lt;/strong&gt;&lt;br&gt;
Provide robust security features and are suitable for handling larger amounts or for more frequent trading.&lt;br&gt;
Security&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Security
&lt;/h3&gt;

&lt;p&gt;Key security features to consider include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Private Key Management&lt;/strong&gt;: Ensuring that the wallet gives you full control over your private keys.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Encryption&lt;/strong&gt;: Strong encryption standards to protect your data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backup &amp;amp; Recovery&lt;/strong&gt;: Options available for backing up and recovering your wallet.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Popular Wallet Options for Stellar
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.freighter.app" rel="noopener noreferrer"&gt;Freighter Wallet&lt;/a&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Description&lt;/strong&gt;: A browser extension wallet designed specifically for the Stellar network.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key Features&lt;/strong&gt;: Integrates seamlessly with web applications, supports multiple Stellar accounts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recommended Use Cases&lt;/strong&gt;: Best for users who frequently interact with Stellar-based web applications.
Installation Guide: For a &lt;a href="https://docs.soroswap.finance/05-tutorial/02-installing-freighter" rel="noopener noreferrer"&gt;step-by-step tutorial on how to install and set up Freighter Wallet.&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3zk65jnqkhwse19akmha.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3zk65jnqkhwse19akmha.png" alt=" " width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://xbull.app" rel="noopener noreferrer"&gt;XBull Wallet&lt;/a&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Description&lt;/strong&gt;: A comprehensive wallet offering both mobile and desktop versions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key Features&lt;/strong&gt;: Support for multiple assets, built-in exchange features, and high-level security measures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recommended Use Cases&lt;/strong&gt;: Suitable for users looking for a versatile wallet that supports frequent trading and investment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9dr9tj92qqvs5m6y9krd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9dr9tj92qqvs5m6y9krd.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://lobstr.co" rel="noopener noreferrer"&gt;Lobstr Wallet&lt;/a&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Description&lt;/strong&gt;: Popular among Stellar users for its user-friendly mobile app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key Features&lt;/strong&gt;: Social features for sending and receiving payments, strong security protocols.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recommended Use Cases&lt;/strong&gt;: Ideal for everyday users needing a simple and secure way to manage and transact with Stellar Lumens and other tokens.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn0mzpcq912id67oaw1vs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn0mzpcq912id67oaw1vs.png" alt=" " width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.hanawallet.io" rel="noopener noreferrer"&gt;Hana Wallet&lt;/a&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Description&lt;/strong&gt;: Is a mobile wallet known for its simplicity and effectiveness, designed specifically for managing Stellar assets on the go.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key Features&lt;/strong&gt;: Minimalistic design, ease of use, focus on user privacy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recommended Use Cases&lt;/strong&gt;: Great for new users of the Stellar network who prefer a straightforward and secure wallet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6tq0k6fi0dey7fmdfqp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6tq0k6fi0dey7fmdfqp.png" alt=" " width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Factors to Consider
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Security and Privacy&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Assess the wallet’s security track record and read reviews about its reliability and privacy protections.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Ease of Use&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The wallet interface should be intuitive, making it easy for you to manage your assets and transactions without confusion.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Compatibility
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Consider how well the wallet integrates with other platforms and applications, including exchanges and other blockchain services.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Further Research
&lt;/h2&gt;

&lt;p&gt;Before making a final decision, visit official wallet websites, read user reviews, and check out community feedback on forums like &lt;a href="https://discord.com/invite/wVkaxxJtFm" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; or &lt;a href="https://discord.com/invite/stellardev" rel="noopener noreferrer"&gt;Stellar community channels&lt;/a&gt;. Understanding the experiences of other users can provide valuable insights into the reliability and efficiency of a wallet.&lt;/p&gt;

&lt;p&gt;Choosing the right Stellar wallet will enhance your experience and ensure that your assets are secure and easily manageable. Take the time to evaluate each option based on these criteria to find the best fit for your needs.&lt;/p&gt;

</description>
      <category>stellarnetwork</category>
      <category>soroban</category>
      <category>soroswapfinance</category>
    </item>
    <item>
      <title>Bridging Stellar with Allbridge Core on Soroswap: New Possibilities Unveiled</title>
      <dc:creator>coderipper</dc:creator>
      <pubDate>Wed, 15 May 2024 14:38:10 +0000</pubDate>
      <link>https://dev.to/soroswap/bridging-stellar-with-allbridge-core-on-soroswap-new-possibilities-unveiled-1j78</link>
      <guid>https://dev.to/soroswap/bridging-stellar-with-allbridge-core-on-soroswap-new-possibilities-unveiled-1j78</guid>
      <description>&lt;h4&gt;
  
  
  Introduction
&lt;/h4&gt;

&lt;p&gt;Our journey into blockchain interoperability has reached an exciting milestone. We've successfully created a proof-of-concept script that utilizes Allbridge Core to bridge assets between Stellar's Soroban and other blockchains like Binance Smart Chain (BSC). This development not only enhances Soroswap's capabilities but also aligns with future advancements in the blockchain ecosystem, paving the way for seamless asset transfers and improved user experience.&lt;/p&gt;

&lt;h4&gt;
  
  
  Advancing with Allbridge Core
&lt;/h4&gt;

&lt;p&gt;Previously, we explored Allbridge Classic to bridge Stellar with other blockchains. However, with the advent of Allbridge Core, featuring full support for Soroban, our approach has evolved. Allbridge Core offers advanced bridging capabilities, enabling seamless asset transfers across multiple networks. This upgrade is crucial for maintaining the efficiency and reliability of our platform as we continue to innovate and grow.&lt;/p&gt;

&lt;h4&gt;
  
  
  Our New Integration
&lt;/h4&gt;

&lt;p&gt;The latest script showcases how to bridge USDT and USDC between Soroban and BSC. This integration demonstrates our capability to leverage Allbridge Core's features effectively. Key components of this integration include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SDK Initialization&lt;/strong&gt;: Setting up Allbridge Core SDK with custom RPC URLs for supported blockchains.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chain and Token Details&lt;/strong&gt;: Retrieving information about supported chains and tokens, focusing on BSC and Soroban.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transaction Execution&lt;/strong&gt;: Bridging assets between BSC and Soroban, with robust error handling and transaction confirmations.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Proof of Concept
&lt;/h4&gt;

&lt;p&gt;This proof-of-concept script successfully demonstrates the bridging of 1 USDC from Soroban to 1 USDT on BSC, and vice versa. Here’s an overview of the process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Bridging from Soroban to BSC&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initializes the transaction parameters.&lt;/li&gt;
&lt;li&gt;Executes the transaction, handles potential errors, and confirms the transaction on the blockchain.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Bridging from BSC to Soroban&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sets up the necessary permissions and allowances.&lt;/li&gt;
&lt;li&gt;Executes the bridge, confirms the transaction, and ensures trust lines on Soroban.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The script also includes error handling and transaction confirmations to ensure reliability and consistency, which are critical for maintaining user trust and platform stability.&lt;/p&gt;

&lt;h4&gt;
  
  
  Detailed Script Overview
&lt;/h4&gt;

&lt;p&gt;For those interested in the technical specifics, here is a brief overview of the script components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SDK Initialization&lt;/strong&gt;: The Allbridge Core SDK is initialized with custom RPC URLs for supported blockchains, including BSC and Soroban.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token Details Retrieval&lt;/strong&gt;: Detailed information about the supported chains and tokens is retrieved, with a focus on BSC and Soroban.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bridging Operations&lt;/strong&gt;: The script handles the bridging of tokens, including setting up trust lines on Soroban when needed. It manages errors and confirms transactions across chains to ensure reliability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitoring and Testing&lt;/strong&gt;: The script includes functionality for monitoring transaction statuses and testing the bridging process, ensuring that each step is executed correctly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The full implementation is available in our &lt;a href="https://github.com/soroswap/allbridge-implementation" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;, inviting the community to explore, collaborate, and contribute to our ongoing efforts.&lt;/p&gt;

&lt;h4&gt;
  
  
  Future Prospects
&lt;/h4&gt;

&lt;p&gt;While immediate implementation of Allbridge Core in Soroswap is not planned, this proof-of-concept lays the groundwork for future integration. As the blockchain landscape continues to evolve, we are committed to exploring and adopting cutting-edge technologies to enhance our platform's capabilities. This strategic patience allows us to align with the most advanced and supported technologies, ensuring our initiatives are future-proof.&lt;/p&gt;

&lt;p&gt;Our exploration of Allbridge Core with Soroban marks a significant step forward in our interoperability efforts. As we continue to refine and expand our capabilities, we remain excited about the future possibilities this technology brings to Soroswap and the broader blockchain ecosystem.&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;The integration of Allbridge Core with Soroban represents a significant advancement in our quest for blockchain interoperability. By leveraging the latest features of Allbridge Core, we can now bridge assets between Soroban and other blockchains like BSC more efficiently and reliably. This development not only enhances Soroswap's capabilities but also sets the stage for future innovations in the blockchain space. We invite the community to join us in this exciting journey, exploring the vast potential of blockchain technology together.&lt;/p&gt;

&lt;p&gt;For more details, check out our &lt;a href="https://github.com/soroswap/allbridge-implementation" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;, and stay tuned for future updates as we continue to push the boundaries of what's possible in blockchain interoperability.&lt;/p&gt;

</description>
      <category>soroswap</category>
      <category>soroban</category>
      <category>stellar</category>
      <category>allbridge</category>
    </item>
    <item>
      <title>Costs, DoS Risks, and Instance vs Persistent Data Types in Soroban</title>
      <dc:creator>esteblock</dc:creator>
      <pubDate>Fri, 19 Jan 2024 19:45:30 +0000</pubDate>
      <link>https://dev.to/soroswap/-costs-dos-risks-and-instance-vs-persistent-data-types-in-soroban-421o</link>
      <guid>https://dev.to/soroswap/-costs-dos-risks-and-instance-vs-persistent-data-types-in-soroban-421o</guid>
      <description>&lt;p&gt;In the development journey of the &lt;a href="https://soroswap.finance"&gt;Soroswap.Finance&lt;/a&gt; protocol, critical decisions regarding data types for Smart Contracts were made. The choice of storage impacts the risk of Denial of Service (DoS), increases contract interaction costs, or introduces both risks simultaneously.&lt;/p&gt;

&lt;p&gt;This article explores the advantages and drawbacks of four design patterns for storing an increasing amount of information on the Soroban blockchain. Additionally, it delves into the associated costs for each scenario.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context:&lt;/strong&gt; &lt;a href="https://soroswap.finance"&gt;Soroswap.Finance&lt;/a&gt; is an Automated Market Maker in the Soroban Smart Contract Platform within the Stellar Blockchain, developed by the &lt;a href="https://paltalabs.io"&gt;PaltaLabs 🥑&lt;/a&gt; team.&lt;/p&gt;

&lt;p&gt;Follow the code here: &lt;a href="https://github.com/paltalabs/instance-persistent-dos-soroban/"&gt;Instance-Persistent-Dos-Soroban&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TLDR;
&lt;/h2&gt;

&lt;p&gt;This article demonstrates that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instance data types share a common Ledger Entry, leading to contract failure if the total stored information reaches 64kb.&lt;/li&gt;
&lt;li&gt;Instance storage Ledger Entry is independent of contract size, with a fixed 64kb reserved regardless of contract dimensions.&lt;/li&gt;
&lt;li&gt;Instance data types are read on every interaction, making any contract interaction more costly.&lt;/li&gt;
&lt;li&gt;Unbounded data storage in Vectors or Mappings risks reaching 64kb and becoming vulnerable to DoS attacks.&lt;/li&gt;
&lt;li&gt;The variable DataKey technique is the recommended approach for storing unbounded data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Instance and Persistent Data Types.
&lt;/h2&gt;

&lt;p&gt;From Soroban documentation, we know that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instance storage has its data limit determined by the ledger entry size (&lt;a href="https://docs.rs/soroban-sdk/latest/soroban_sdk/storage/struct.Storage.html#method.instance"&gt;Source&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;All instance storage is kept in a single contract instance LedgerEntry with a 64kb size (&lt;a href="https://soroban.stellar.org/docs/soroban-internals/state-archival"&gt;Source&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;The Ledger Entry Size is capped at 64kb (&lt;a href="https://soroban.stellar.org/docs/soroban-internals/fees-and-metering#resource-limits"&gt;Source&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  The Challenge: Store Unbounded Information
&lt;/h1&gt;

&lt;p&gt;The example challenge involves creating a Smart Contract that stores two collections of an increasing amount of 32-byte addresses, representing buyers and sellers. Two separate collections are used, as the choice of data type can impact one collection when the other grows.&lt;/p&gt;

&lt;p&gt;Externally, interactions with this contract are intended to follow this pattern for each collection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Call a function to store a new address (number n).&lt;/li&gt;
&lt;li&gt;Retrieve the address for a given number n.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Indeed, tests for each design are the same, and they all pass! So be aware dev, passing your test does not means that your code is safe!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the following sections, four design patterns will be explained, with only one proving to be DoS-free and not increasing the cost of interacting with the contract.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design 1: Store a Vector in an Instance Data Type. The Case of a Light Smart Contract.
&lt;/h3&gt;

&lt;p&gt;With this technique, a vector is stored in an instance storage slot. Each time a new element is pushed, the current vector value is read, the new element is added, and the updated vector is written back to the same instance storage slot. The code looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Vec&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Address&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.storage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.instance&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="nf"&gt;.get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;VECTOR_A&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.unwrap_or&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;Vec&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// If no value set, assume an empty vector.&lt;/span&gt;

&lt;span class="c1"&gt;// Push the current contract address in the vector&lt;/span&gt;
&lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="nf"&gt;.push_back&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.current_contract_address&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.clone&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

&lt;span class="c1"&gt;// Save the updated vector to instance storage&lt;/span&gt;
&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.storage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.instance&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;VECTOR_A&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A DoS attack simulation reveals that this design causes the contract to fail with a &lt;code&gt;ResourceLimitExceeded&lt;/code&gt; error after the sum of the collections reaches 64kb, equivalent to 818 pushes of addresses on each collection. Further details, including code, simulation, and results, can be found in the &lt;a href="https://github.com/paltalabs/instance-persistent-dos-soroban/"&gt;repository&lt;/a&gt;. Additionally, this design increases the cost of every call to the smart contract, even for unrelated functions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design 2: Store a Vector in an Instance Data Type.. The Case of a Heavy Smart Contract.
&lt;/h3&gt;

&lt;p&gt;Similar to Design 1, this approach demonstrates that instance storage is stored in an independent LedgerEntry from the Smart Contract itself. With this design, the cost of reading the contract increases with every push operation, even for unrelated functions. This design also results in a &lt;code&gt;ResourceLimitExceeded&lt;/code&gt; error.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design 3: Store a Vector in a Persistent Data Type..
&lt;/h3&gt;

&lt;p&gt;This design involves storing a vector in a persistent data type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Vec&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Address&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.storage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.persistent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="nf"&gt;.get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;VECTOR_A&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.unwrap_or&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;Vec&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// If no value set, assume an empty vector.&lt;/span&gt;
&lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="nf"&gt;.push_back&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.current_contract_address&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.clone&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.storage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.persistent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;VECTOR_A&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While it avoids sharing storage size with other variables, it is still limited to 64kb of information. Details of an &lt;a href="https://github.com/paltalabs/instance-persistent-dos-soroban/#situation-3-persistent-vector-heavy"&gt;attack simulation&lt;/a&gt; show that it allows reaching twice the number of entries compared to the previous examples. However, the cost of reading the contract does not increase for unrelated functions, as persistent data type is not retrieved every time the contract is called.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design 4: Use Variable DataKeys with Persistent Data Type..
&lt;/h3&gt;

&lt;p&gt;This design introduces the &lt;strong&gt;Variable DataKey&lt;/strong&gt; technique, where the name of the storage slot depends on a parameter. The DataKey is defined as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nd"&gt;#[contracttype]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;enum&lt;/span&gt; &lt;span class="n"&gt;DataKey&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;StoredAddressesA&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;u32&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This technique is commonly used to store an increasing amount of data, as seen in the &lt;a href="https://github.com/stellar/soroban-examples/blob/9ae2d834059e8898291b5cf41a8d04dd33251640/token/src/balance.rs#L6"&gt;token contract for storing user balances&lt;/a&gt;. The information is stored as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.storage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.instance&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;COUNTER_A&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.unwrap_or&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.storage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.persistent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nn"&gt;DataKey&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;StoredAddressesA&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.current_contract_address&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.clone&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.storage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.persistent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;COUNTER_A&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This design, including the storage of a &lt;strong&gt;COUNTER&lt;/strong&gt; to track the number of stored addresses, is considered the best option. It successfully avoids DoS attacks and minimizes the cost of reading the contract.&lt;/p&gt;

&lt;p&gt;Using u32 provides 2^32 different storage slots for StoredAddressA, which is more than sufficient. Even if an attacker were to call the push function 2^32 times, the associated cost is calculated to be around 439,289 stroops (0.044 XLM). This cost limitation makes it practically infeasible for an attacker, even with the entire Total Supply of XLM (50,001,787,051), to add more than 2,196,523,503 entries (2^21).&lt;/p&gt;

&lt;h3&gt;
  
  
  Design 5: Use Variable DataKeys with Instance Data Type.
&lt;/h3&gt;

&lt;p&gt;Lastly, using Variable DataKeys as a solution with instance data type is a &lt;strong&gt;mistake&lt;/strong&gt;. This design is as inefficient as using a vector because storing in different slots shared in a single Ledger Entry is almost equivalent to storing everything in one slot, similar to a vector. This situation can lead to a DoS attack and result in a &lt;code&gt;ResourceLimitExceeded&lt;/code&gt; error.&lt;/p&gt;

&lt;h1&gt;
  
  
  Contact us:
&lt;/h1&gt;

&lt;p&gt;Did you like the article? Contact us in our Discord &lt;a href="https://discord.gg/HFkBquZNNg"&gt;https://discord.gg/HFkBquZNNg&lt;/a&gt; or reach us in &lt;a href="https://paltalabs.io"&gt;https://paltalabs.io&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>7 common transactions on Stellar and Soroban to explore using Mercury and how to retrieve them</title>
      <dc:creator>DevMonster</dc:creator>
      <pubDate>Thu, 28 Dec 2023 22:23:25 +0000</pubDate>
      <link>https://dev.to/soroswap/7-common-transactions-on-stellar-and-soroban-to-explore-using-mercury-and-how-to-retrieve-them-51ab</link>
      <guid>https://dev.to/soroswap/7-common-transactions-on-stellar-and-soroban-to-explore-using-mercury-and-how-to-retrieve-them-51ab</guid>
      <description>&lt;p&gt;In the following article we will be describing the transactions that we will be exploring using Mercury. We will be using the following transactions:&lt;br&gt;
    - Send Payments&lt;br&gt;
    - Receive Payments&lt;br&gt;
    - Liquidity Pool Deposit&lt;br&gt;
    - Liquidity Pool Withdrawal&lt;br&gt;
    - Soroswap Add Liquidity&lt;br&gt;
    - Soroswap Remove Liquidity&lt;br&gt;
    - Soroswap Swap tokens&lt;br&gt;
Some of them are using Stellar Classic, and some of them are in Soroban Network.&lt;/p&gt;

&lt;p&gt;We have developed &lt;a href="https://github.com/paltalabs/mercury-sdk"&gt;mercury-sdk&lt;/a&gt; to facilitate the exploration of the transactions.&lt;/p&gt;

&lt;p&gt;In order to work with mercury-sdk you need to create an instance of the Mercury class. You can do it as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Mercury&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mercury-sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mercuryInstance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Mercury&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;backendEndpoint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MERCURY_BACKEND_ENDPOINT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;graphqlEndpoint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MERCURY_GRAPHQL_ENDPOINT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MERCURY_TESTER_EMAIL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MERCURY_TESTER_PASSWORD&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Payments
&lt;/h2&gt;

&lt;p&gt;Sent and received payments are the most common transactions in Stellar. They are used to send and receive assets between accounts. &lt;br&gt;
You can retrieve the information as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="nx"&gt;getSentPaymentsParser&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="nx"&gt;getReceivedPaymentsParser&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mercury-sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;someFunction&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;//Sent payments&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sentPaymentsResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;mercuryInstance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getSentPayments&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;someStellarAddress&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sentPaymentsResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sentPaymentsParsedData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getSentPaymentsParser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nx"&gt;sentPaymentsResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sentPaymentsParsedData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;//Received payments&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;receivedPaymentsResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;mercuryInstance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getReceivedPayments&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;someStellarAddress&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;receivedPaymentsResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;receivedPaymentsParsedData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getReceivedPaymentsParser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nx"&gt;receivedPaymentsResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;receivedPaymentsParsedData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;example response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
  {
    "from": "GCQF7MWR7QO2QKD7F72WG2H5L3TBE53DN67OYBXQEDEWIYOSYVP5D7CJ",
    "to": "GD3PVP6AYFOVWXYFYTX7JM7WMYPKINCTUXZNXOYKAO5U2AUARARDDM45",
    "amount": "10000000000",
    "assetNative": false,
    "asset": "PALTA:GDA7K7I3XGH5HKUH5NYFYY3JBKUAJ3DSGLVGJHBDLUTKCUYVMUOVR2ZM",
    "ledger": 162443,
    "timestamp": 1703774254
  },
  {
    "from": "GCQF7MWR7QO2QKD7F72WG2H5L3TBE53DN67OYBXQEDEWIYOSYVP5D7CJ",
    "to": "GD3PVP6AYFOVWXYFYTX7JM7WMYPKINCTUXZNXOYKAO5U2AUARARDDM45",
    "amount": "10000000000",
    "assetNative": true,
    "ledger": 162444,
    "timestamp": 1703774259
  }
]

receivedPaymentsParsedData
[
  {
    "from": "GDA7K7I3XGH5HKUH5NYFYY3JBKUAJ3DSGLVGJHBDLUTKCUYVMUOVR2ZM",
    "to": "GCQF7MWR7QO2QKD7F72WG2H5L3TBE53DN67OYBXQEDEWIYOSYVP5D7CJ",
    "amount": "1000000000000",
    "assetNative": false,
    "asset": "PALTA:GDA7K7I3XGH5HKUH5NYFYY3JBKUAJ3DSGLVGJHBDLUTKCUYVMUOVR2ZM",
    "ledger": 162440,
    "timestamp": 1703774238
  }
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Liquidity Pool Operations
&lt;/h2&gt;

&lt;p&gt;Deposit and Withdrawal operations are used to add and remove liquidity from a liquidity pool. These operations are used in the built-in Stellar AMM. &lt;/p&gt;

&lt;p&gt;Example code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="c1"&gt;//Liquidity Pool Withdraw&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;liquidityPoolWithdrawResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;mercuryInstance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getLiquidityPoolWithdraw&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;someStellarAddress&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;liquidityPoolWithdrawResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;liquidityPoolWithdrawParsedData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getLiquidityPoolWithdrawParser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nx"&gt;liquidityPoolWithdrawResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;//Liquidity Pool Deposit&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;liquidityPoolDepositResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;mercuryInstance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getLiquidityPoolDeposit&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;someStellarAddress&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;liquidityPoolDepositResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;liquidityPoolDepositParsedData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getLiquidityPoolDepositParser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nx"&gt;liquidityPoolDepositResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;example response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;liquidityPoolWithdrawParsedData
[
  {
    "source": 402241,
    "poolId": "\\xc7403b2778be92e967f714a6cbff8181a4ec993ff2a3538a4114744150c4a72a",
    "amount": "1000000000",
    "ledger": 162449,
    "timestamp": 1703774286
  }
]

liquidityPoolDepositParsedData
[
  {
    "source": 402238,
    "poolId": "\\xc7403b2778be92e967f714a6cbff8181a4ec993ff2a3538a4114744150c4a72a",
    "maxAmountA": "20000000000",
    "maxAmountB": "10000000000",
    "minPriceN": 9,
    "minPriceD": 5,
    "maxPriceN": 11,
    "maxPriceD": 5,
    "ledger": 162446,
    "timestamp": 1703774270
  }
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Soroswap Operations
&lt;/h2&gt;

&lt;p&gt;Soroswap operations are used to add and remove liquidity from a liquidity pool, and to swap tokens. These operations are used in the Soroswap AMM. Which is different from the built-in Stellar AMM. Because in Soroswap there will be tokens that are not Stellar Assets.&lt;/p&gt;

&lt;p&gt;When doing swaps, instead of the pair of asset we have the path of the swap. The path is the sequence of assets that the swap will go through. &lt;/p&gt;

&lt;p&gt;Example code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getContractEventsRes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;mercuryInstance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContractEvents&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;contractId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;routerContractAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;parsedContractEvents&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getContractEventsParser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;getContractEventsRes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;eventByPublicKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;parsedContractEvents&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;example response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"amount_a"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2000000"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"amount_b"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2000000"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"liquidity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1999000"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pair"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CAMCPA2QDCC2K3DJOSRKRGQXETHQND7KK46VOEW3YLL5OP7BDXNB37YF"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"to"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"GBDJYBFPYUY7XXI5XCT473VJRT7PRGMRA2AJ2TKUKGPLJ5ZGVPJYKEAR"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"token_a"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CBKZMWGE7E3VDJRCHRNLAHKYL2JMCC4METUJA262WXKN2SANJXVQYE3N"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"token_b"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CCFB3TPPJHDLDYRTPJEFYJ37FOVASDCIZEJ3DYKOFUQO4WJHHZ7SML2D"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"topic1"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"SoroswapRouter"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"topic2"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"add"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"amounts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"100000"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"94965"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"CBKZMWGE7E3VDJRCHRNLAHKYL2JMCC4METUJA262WXKN2SANJXVQYE3N"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"CCFB3TPPJHDLDYRTPJEFYJ37FOVASDCIZEJ3DYKOFUQO4WJHHZ7SML2D"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"to"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"GBDJYBFPYUY7XXI5XCT473VJRT7PRGMRA2AJ2TKUKGPLJ5ZGVPJYKEAR"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"topic1"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"SoroswapRouter"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"topic2"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"swap"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"amount_a"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"105"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"amount_b"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"95"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"liquidity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"100"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pair"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CAMCPA2QDCC2K3DJOSRKRGQXETHQND7KK46VOEW3YLL5OP7BDXNB37YF"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"to"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"GBDJYBFPYUY7XXI5XCT473VJRT7PRGMRA2AJ2TKUKGPLJ5ZGVPJYKEAR"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"token_a"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CBKZMWGE7E3VDJRCHRNLAHKYL2JMCC4METUJA262WXKN2SANJXVQYE3N"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"token_b"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CCFB3TPPJHDLDYRTPJEFYJ37FOVASDCIZEJ3DYKOFUQO4WJHHZ7SML2D"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"topic1"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"SoroswapRouter"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"topic2"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"remove"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The complete code can be checked on &lt;a href="https://github.com/paltalabs/mercury-client/blob/main/scripts/mercurySdkTester/retrieve7txs.ts"&gt;https://github.com/paltalabs/mercury-client/blob/main/scripts/mercurySdkTester/retrieve7txs.ts&lt;/a&gt;&lt;/p&gt;

</description>
      <category>soroban</category>
      <category>mercury</category>
      <category>stellar</category>
    </item>
    <item>
      <title>Deploying a Soroban Contract from a .wasm File using js-stellar-sdk</title>
      <dc:creator>DevMonster</dc:creator>
      <pubDate>Thu, 14 Dec 2023 20:06:00 +0000</pubDate>
      <link>https://dev.to/soroswap/deploying-a-soroban-contract-from-a-wasm-file-using-js-stellar-sdk-46hj</link>
      <guid>https://dev.to/soroswap/deploying-a-soroban-contract-from-a-wasm-file-using-js-stellar-sdk-46hj</guid>
      <description>&lt;p&gt;Soroban is a blockchain platform that allows developers to build and deploy smart contracts. In this article, we will explore how to deploy a Soroban contract from a .wasm file using typescript.&lt;/p&gt;

&lt;p&gt;In this example we will deploy a token contract&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we begin, make sure you have the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node.js installed on your machine&lt;/li&gt;
&lt;li&gt;You have installed &lt;code&gt;stellar-sdk&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;You have a .wasm file containing the contract code&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Understanding the Code
&lt;/h2&gt;

&lt;p&gt;The code provided consists of two functions: &lt;code&gt;uploadTokenContractWasm&lt;/code&gt; and &lt;code&gt;createTokenContract&lt;/code&gt;. Because we need to upload the wasm code before we can create the contract, we will first look at the &lt;code&gt;uploadTokenContractWasm&lt;/code&gt; function.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;createTokenContract&lt;/code&gt; function work as follow: It reads the .wasm file, calculates the hash of the wasm code, and creates a custom contract operation. It then builds and submits a transaction to create the contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploying the Soroban Contract
&lt;/h2&gt;

&lt;p&gt;To deploy a Soroban contract from a .wasm file, follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Import the necessary modules and dependencies:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;stellar-sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Define the &lt;code&gt;uploadTokenContractWasm&lt;/code&gt; function:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;uploadTokenContractWasm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;signer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;wasmBuffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/path/to/soroban_token_contract.optimized.wasm&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;xdr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;HostFunction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hostFunctionTypeUploadContractWasm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;wasmBuffer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;op&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uploadContractWasm&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;wasm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;wasmBuffer&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="c1"&gt;// ... continue with the transaction building and submission&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Define the &lt;code&gt;createTokenContract&lt;/code&gt; function:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;createTokenContract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;signer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;wasmBuffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/path/to/soroban_token_contract.optimized.wasm&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;wasmBuffer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;op&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createCustomContract&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Address&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;signer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;wasmHash&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="c1"&gt;// ... continue with the transaction building and submission&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Replace &lt;code&gt;/path/to/soroban_token_contract.optimized.wasm&lt;/code&gt; with the actual path to your .wasm file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Build and submit the transaction:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;sorobanServer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;signer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sourceKeypair&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Keypair&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromSecret&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;signer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;privateKey&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;tx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;TransactionBuilder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;fee&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;BASE_FEE&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setNetworkPassphrase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Networks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;TESTNET&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addOperation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;op&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;preparedTransaction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;sorobanServer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;prepareTransaction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tx&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;preparedTransaction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sourceKeypair&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;submitTransactionResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;sorobanServer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendTransaction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;preparedTransaction&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;submitTransactionResponse&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Handle error cases&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Replace &lt;code&gt;sorobanServer&lt;/code&gt; with the appropriate Soroban server instance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the desired function to deploy the contract:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;signer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;YOUR_PUBLIC_KEY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;privateKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;YOUR_PRIVATE_KEY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;uploadTokenContractWasm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;signer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// or&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;createTokenContract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;signer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Replace &lt;code&gt;'YOUR_PUBLIC_KEY'&lt;/code&gt; and &lt;code&gt;'YOUR_PRIVATE_KEY'&lt;/code&gt; with your Soroban account's public and private keys.&lt;/li&gt;
&lt;li&gt;You will need to initialize it afterwards&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Deploying a Soroban contract from a .wasm file is a straightforward process. By utilizing the provided code and following the steps outlined in this article, you can easily deploy your own Soroban contracts and leverage the power of blockchain technology.&lt;/p&gt;

&lt;p&gt;Remember to handle any potential errors and customize the code according to your specific requirements. Happy coding!&lt;/p&gt;

</description>
      <category>soroban</category>
      <category>contract</category>
      <category>stellar</category>
      <category>stellarsdk</category>
    </item>
    <item>
      <title>Installing Freighter</title>
      <dc:creator>esteblock</dc:creator>
      <pubDate>Wed, 15 Nov 2023 22:16:32 +0000</pubDate>
      <link>https://dev.to/soroswap/installing-freighter-4d1c</link>
      <guid>https://dev.to/soroswap/installing-freighter-4d1c</guid>
      <description>&lt;h1&gt;
  
  
  1. Installing Freighter
&lt;/h1&gt;

&lt;p&gt;In this section, we will guide you through the installation process of Freighter, a non-custodial Stellar wallet extension that will empower you to engage with Soroswap.Finance&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Installing Freighter on your Browser
&lt;/h2&gt;

&lt;p&gt;Freighter works as a Extension in Chrome (Google Chrome, Brave) and Firefox:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Visit the &lt;a href="https://www.freighter.app/"&gt;Freighter Official Website&lt;/a&gt;, to install Freighter into your browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on "Create Account" and choose a secure password.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 2: Safeguarding Your Wallet
&lt;/h2&gt;

&lt;p&gt;Upon creating your account, you will be presented with a secret recovery phrase. This phrase acts as a backup for your wallet's private key, allowing you to restore your wallet in case of loss, theft, or device damage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--I9obpaJa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d422wt6rbd7t2nncjvtd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--I9obpaJa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d422wt6rbd7t2nncjvtd.png" alt="Image description" width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow these important guidelines to protect your funds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Save the Seed Phrase&lt;/strong&gt;: Keep your seed phrase in a safe place. Treat it as a valuable key to your funds and store it confidentially.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Secure Storage&lt;/strong&gt;: Store the seed phrase in a secure location, such as a locked drawer or a password-protected digital storage solution. Ensure it is shielded from unauthorized access and potential loss.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Exercise Caution&lt;/strong&gt;: Remember, anyone with access to your seed phrase can gain control over your wallet and its contents. Take the necessary precautions to safeguard it diligently.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 3: Confirming Your Seed Phrase
&lt;/h2&gt;

&lt;p&gt;To ensure accuracy, you will be asked to confirm your seed phrase in the same order. This step guarantees that you have correctly noted down your recovery phrase.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xk4o3cDW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/urjix82iycg5677h7vay.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xk4o3cDW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/urjix82iycg5677h7vay.png" alt="Image description" width="647" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Accessing Your Wallet
&lt;/h2&gt;

&lt;p&gt;Congratulations! You are now ready to use your Freighter wallet. Follow these final steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the Freighter extension in your browser.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cRxh6iCD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0zj2j4k4lify7g1busr0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cRxh6iCD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0zj2j4k4lify7g1busr0.png" alt="Image description" width="346" height="582"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Your account will be displayed, labeled as "Account 1," along with your unique account address. This address serves as an identifier for receiving funds or transactions from other users or entities on the blockchain network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the "Main Net" button located at the top right corner to explore the networks:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mainnet&lt;/strong&gt;: The live and fully operational blockchain network where real transactions occur.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Testnet&lt;/strong&gt;: A simulated environment for testing and experimentation&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Since Soroswap is currently in the Soroban Testnet environment, we will proceed with the tutorial using the Testnet setting. By utilizing the testnet, we can safely explore and demonstrate the functionalities of Soroswap without any concerns about real-world financial implications.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2GCH7Vfg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a49jnyfsjhbgsx0g5203.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2GCH7Vfg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a49jnyfsjhbgsx0g5203.png" alt="Image description" width="346" height="582"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Let's Dive into the Tutorial
&lt;/h2&gt;

&lt;p&gt;Congratulations! You are now fully equipped to embark on an exciting journey with Soroswap on the testnet. Get ready to explore and make the most of Soroswap's comprehensive range of features within this secure testing environment. Let's dive right into the tutorial and unlock the full potential of your Soroswap experience!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Soroswap 🪐 on Testnet Overview</title>
      <dc:creator>esteblock</dc:creator>
      <pubDate>Wed, 15 Nov 2023 20:53:15 +0000</pubDate>
      <link>https://dev.to/soroswap/soroswap-on-testnet-overview-3eed</link>
      <guid>https://dev.to/soroswap/soroswap-on-testnet-overview-3eed</guid>
      <description>&lt;h1&gt;
  
  
  Soroswap Testnet Overview
&lt;/h1&gt;

&lt;p&gt;Soroswap is an Automated Market Maker (AMM) built on Soroban, designed to facilitate token trading and liquidity provision. With its user-friendly interface, Soroswap offers a seamless and intuitive experience for users to engage with decentralized finance (DeFi) on the Soroban and Stellar&lt;/p&gt;

&lt;p&gt;Check it in &lt;a href="https://soroswap.finance/"&gt;https://soroswap.finance/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  User-Friendly Interface
&lt;/h2&gt;

&lt;p&gt;Soroswap boasts a user-friendly interface that ensures a smooth and enjoyable trading experience. The intuitive design caters to both beginners and experienced traders, making it easy to navigate the platform and interact with its features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features and Benefits
&lt;/h2&gt;

&lt;p&gt;** Currently Soroswap works only on Soroban Testnet**, and provides several key features and benefits for users:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Balance Section:&lt;/strong&gt; Conveniently view your test token balances in the Balance section. This feature allows you to keep track of your assets and monitor their availability for transactions within the app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Swap Section:&lt;/strong&gt; Easily exchange one token for another within the liquidity pool using Soroswap's Swap section. This feature provides a straightforward and efficient solution for diversifying your portfolio or making specific token swaps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Liquidity Section:&lt;/strong&gt; Empowers users to add or remove liquidity from the pools. By participating in liquidity provision, you contribute to the stability and efficiency of the Soroswap ecosystem. Effectively manage your liquidity positions in the Liquidity section for a smooth and rewarding experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Soroswap on the Sorosban Testnet allows users to fully explore and test the platform using test tokens. This enables you to experience the complete functionality of the app without risking real funds. It provides an opportunity to familiarize yourself with the features, understand the process of adding liquidity, performing swaps, and removing liquidity.&lt;/p&gt;

&lt;p&gt;By utilizing Soroswap on the testnet, you can gain hands-on experience with decentralized exchanges and DeFi concepts. It serves as a valuable learning tool and a safe environment to experiment with different trading strategies and liquidity provision.&lt;/p&gt;

&lt;p&gt;In the following sections, we will provide step-by-step instructions on how to use Soroswap on the testnet, including installing the Freighter wallet, adding liquidity, performing swaps, and removing liquidity. These instructions will help you navigate the platform and make the most of the features and benefits offered by Soroswap. Let's dive in!&lt;/p&gt;

&lt;p&gt;Did you like it?&lt;br&gt;
Please give us feedback. Join our Discord channel: &lt;a href="https://discord.gg/wyesAQhP"&gt;https://discord.gg/wyesAQhP&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Soroswap.Finance 🪐 is live on Soroban Testnet ✨!</title>
      <dc:creator>esteblock</dc:creator>
      <pubDate>Wed, 15 Nov 2023 20:50:39 +0000</pubDate>
      <link>https://dev.to/soroswap/soroswapfinance-is-live-on-soroban-testnet--5072</link>
      <guid>https://dev.to/soroswap/soroswapfinance-is-live-on-soroban-testnet--5072</guid>
      <description>&lt;p&gt;Soroswap.Finance 🪐 is now live on Soroban Testnet, and we couldn't be more thrilled to share this exciting news with the Stellar and Soroban communities!&lt;/p&gt;

&lt;p&gt;Ten months have passed since Soroswap proudly clinched the 3rd prize in the inaugural &lt;a href="https://hacka-soroban-athon.devpost.com/"&gt;Hacka-Soroban-athon 🖥&lt;/a&gt;, Soroban's first-ever hackathon. Our journey has been filled with dedication, a evoluting team of over 10 talented collaborators, collaboration with an external design agency, and participation in key events like the sub0 Polkadot 🧬 Conference and the Meridian 2023 conference in Madrid 🇪🇸.&lt;/p&gt;

&lt;p&gt;Soroswap is an &lt;strong&gt;open-source&lt;/strong&gt; AMM protocol designed to enhance liquidity provision and asset trading for Stellar assets within the Soroban ecosystem. It comes equipped with an SDK and a user-friendly frontend to make your experience seamless.&lt;br&gt;
&lt;a href="https://soroban.stellar.org/"&gt;Soroban&lt;/a&gt; is the new Smart Contract platform of the Blockchain Stellar, and we are creating DeFi primitives on it!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Experience Soroswap on Testnet now!: &lt;a href="https://soroswap.finance/"&gt;https://soroswap.finance/&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To get started, simply access it with a &lt;strong&gt;Freighter Wallet version 5.6.4 or higher&lt;/strong&gt;. On our Testnet dapp, you can experiment with our test tokens and get a feel for the platform. Mint test tokens, provide liquidity and do swaps"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your Feedback Matters 💭:&lt;/strong&gt; We welcome your valuable feedback! Your input is crucial to us and the entire ecosystem. If you have questions, find bugs, or just want to share your thoughts, please don't hesitate to reach out. We're eager to incorporate your insights into this incredible project. You can do this by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://discord.gg/C7AtGAgU"&gt;Reaching us into our Discord Channel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/soroswap/frontend/issues"&gt;Open an Issue in our Frontend Repo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What is next? 🥑✨&lt;/strong&gt;&lt;br&gt;
For the final months and 2024 Q1 Soroswap.Finance Rodamap looks like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implement Mercury 🌐 Indexer to become a multi AMM Aggregator&lt;/li&gt;
&lt;li&gt;Implement Mercury 🌐 Indexer for a Enhanced Dashboard&lt;/li&gt;
&lt;li&gt;Implement Mercury 🌐 Indexer for a Optimal Routing&lt;/li&gt;
&lt;li&gt;Implement a Bridge (AllBridge in/to Ethereum or Pendulum in/to Polkadot!)&lt;/li&gt;
&lt;li&gt;Community Building&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We still have a lot of things to build!&lt;br&gt;
We hope you give us your support to let this happen!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Big Thank You 🤗:&lt;/strong&gt; We owe a massive thanks to the &lt;a href="https://communityfund.stellar.org/"&gt;Stellar Community Fund (SCF)&lt;/a&gt; for making this journey possible. You can review all our SCF deliverables in our &lt;a href="https://github.com/soroswap/scf-tracker."&gt;SCF tracker repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meet the Team 🧑‍🤝‍🧑:&lt;/strong&gt;&lt;br&gt;
Soroswap.Finance 🪐 is brought to you by &lt;a href="https://paltalabs.io/"&gt;PaltaLabs&lt;/a&gt;🥑, a dynamic Blockchain Development Laboratory with contributors from Santiago, Valdivia and Rancagua (Chile), Rio de Janeiro (Brazil), Berlin (Germany), and Arras (France). Our team is a blend of dedicated full-timers, part-timers, and past collaborators who may rejoin us in the future. We extend our heartfelt gratitude to everyone who's played a role in Soroswap's journey.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://esteban.paltalabs.io/"&gt;Esteban Iglesias (esteblock)&lt;/a&gt;, CEO &amp;amp; Founder, Fullstack Blockchain Developer&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://francisco.paltalabs.io/"&gt;Francisco Catrileo (devmonsterblock)&lt;/a&gt;, Fullstack Blockchain Developer &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://joaquin.paltalabs.io/"&gt;Joaquín Soza (yripper)&lt;/a&gt;, Fullstack Blockchain Developer &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.linkedin.com/in/diego-correa-t/"&gt;Maximiliano Carrasco (abstract#1547)&lt;/a&gt;, Frontend Developer &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.linkedin.com/in/viviana-manriquez-fuenzalida/"&gt;Viviana Manríquez (vivitapatita)&lt;/a&gt;, Brand Coordinator&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.linkedin.com/in/diego-correa-t/"&gt;Diego Correa Tristain (diegotristain)&lt;/a&gt;, Rust Developer &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://benjaminsalon.fr/"&gt;Benjamin Salon(benjaminsalon)&lt;/a&gt; Computer Science  &amp;amp; @soroban-react Supporter&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/jtschuwirth"&gt;Jose Tomas Schuwirth (ealric)&lt;/a&gt;, Frontend Web3 Developer &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/mauroepce"&gt;Mauricio Patiño (.maur0)&lt;/a&gt;, Full-Stack Developer &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://ricardorodriguezreveco.com/"&gt;Ricardo Rodriguez (ricardor4)&lt;/a&gt;, Computer Science &amp;amp; Mathematics Models &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/JoseFredes"&gt;José Fredes (draken1700)&lt;/a&gt;, Frontend Developer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Join us in exploring Soroswap on Testnet and help us make it even better! Your involvement is key to the success of this innovative project. 🚀🌟&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Collaboration with Mercury and SubQuery</title>
      <dc:creator>DevMonster</dc:creator>
      <pubDate>Tue, 31 Oct 2023 18:41:22 +0000</pubDate>
      <link>https://dev.to/soroswap/collaboration-with-mercury-and-subquery-5bcg</link>
      <guid>https://dev.to/soroswap/collaboration-with-mercury-and-subquery-5bcg</guid>
      <description>&lt;p&gt;This article outlines the outcomes and walkthroughs of our collaborative projects with Mercury and SubQuery indexers. We aim to achieve two primary objectives:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Introduce developers from the Stellar and Soroban ecosystems to the capabilities of indexer services.&lt;/li&gt;
&lt;li&gt;Assist indexers in refining their offerings by reporting bugs and providing documentation feedback we've uncovered through our usage.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Importance of Indexers in Blockchain Ecosystems
&lt;/h2&gt;

&lt;p&gt;Utilizing indexers is crucial for efficient data retrieval, thereby enabling developers to offer a seamless user experience. Although blockchains inherently ensure transactional integrity, extracting an entire history directly from a node is computationally intensive. Therefore, indexers serve as invaluable tools. This article serves two main goals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Demonstrate practical uses of the indexer as an example or initial repository.&lt;/li&gt;
&lt;li&gt;Test various indexer solutions, offering constructive feedback on bugs and documentation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Mercury: Subscription-Based Indexing Solutions
&lt;/h2&gt;

&lt;p&gt;Mercury offers a subscription-based indexing service equipped with numerous features such as alert systems and code execution environments. As a fully managed service, Mercury obviates the need for developers to manage any GraphQL service themselves.&lt;/p&gt;

&lt;p&gt;In our repository, you'll find a Node.js client pre-configured with queries to inspect a specific contract, specified through the repository's environment variables.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting Started with Mercury
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;: Docker installation on your machine&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone the repository: &lt;code&gt;https://github.com/paltalabs/mercury-client.git&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Duplicate &lt;code&gt;.env.example&lt;/code&gt; as &lt;code&gt;.env&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Request Mercury access &lt;a href="https://developers.mercurydata.app/requesting-access"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Populate the &lt;code&gt;MERCURY_ACCESS_TOKEN&lt;/code&gt; in &lt;code&gt;.env&lt;/code&gt;. For usage exceeding 7 days, also complete &lt;code&gt;MERCURY_TESTER_EMAIL&lt;/code&gt; and &lt;code&gt;MERCURY_TESTER_PASSWORD&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Update &lt;code&gt;CONTRACT_ADDRESS&lt;/code&gt; if you are interested in a contract other than the Soroswap's Factory contract.&lt;/li&gt;
&lt;li&gt;Run the container (Node 18.8.2): &lt;code&gt;bash run.sh&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Install dependencies: &lt;code&gt;yarn&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use predefined scripts to interact with the contract:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node scripts/subscribeToEntries.js
node scripts/getAllEntriesForContract.js
node scripts/getEntrySubscriptions.js
node scripts/getEventSubscriptions.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  SubQuery: Versatile Indexing for Multiple Platforms
&lt;/h2&gt;

&lt;p&gt;SubQuery is a comprehensive indexer that interfaces seamlessly with multiple blockchain platforms, including Stellar and Soroban. We've developed a customized SubQuery project capable of IPFS deployment and management through SubQuery's Managed Service.&lt;/p&gt;

&lt;p&gt;However, storing blockchain history requires access to an archive node, which can be a limitation. While several projects are developing Soroban-compatible archive nodes, none are publicly available yet.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting Started with SubQuery
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;: Docker&lt;/p&gt;

&lt;p&gt;Our setup incorporates Docker inside a Node.js image to manage the required Node.js version and to prevent the need for a global &lt;code&gt;subql&lt;/code&gt; package installation. If you prefer to install node, docker and subql locally you can start from step 4.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone repository: &lt;code&gt;https://github.com/paltalabs/subquery-sandbox.git&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run the container: &lt;code&gt;bash run.sh&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install Docker and SubQuery:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash install_docker.sh
bash setup_subquery.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Navigate to &lt;code&gt;subql-starter&lt;/code&gt; directory and execute:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn
dockerd &amp;amp;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In another terminal&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash connect.sh
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;and (if you prefer to install node, docker and subql locally you can start from here)&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd subql-starter
yarn codegen
yarn build
yarn start:docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Begin querying by navigating to &lt;code&gt;http://localhost:3000/graphql&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To publish your project to IPFS, run:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd subql-starter
subql publish
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;We've demonstrated how to leverage both Mercury and SubQuery indexers, reporting bugs and providing documentation feedback along the way. Each service offers unique approaches to solving data availability issues. While SubQuery provides a more mature and UI-rich solution, its requirement for an archive node adds complexity. Mercury, however, simplifies the process by only requiring subscriptions and queries, thereby eliminating the need to manage additional infrastructure.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>stellar</category>
      <category>soroban</category>
      <category>indexer</category>
    </item>
    <item>
      <title>New Partnerships Unveiled: SubQuery and Mercury</title>
      <dc:creator>DevMonster</dc:creator>
      <pubDate>Tue, 31 Oct 2023 18:40:12 +0000</pubDate>
      <link>https://dev.to/soroswap/new-partnerships-unveiled-subquery-and-mercury-2p5h</link>
      <guid>https://dev.to/soroswap/new-partnerships-unveiled-subquery-and-mercury-2p5h</guid>
      <description>&lt;p&gt;In a previous update, we explored the prospect of forming partnerships with ten different entities within the Stellar ecosystem. Today, we're thrilled to announce our collaborations with two standout partners: SubQuery and Mercury. We'll also provide an in-depth look at the specialized code we're crafting for each partnership.&lt;/p&gt;

&lt;p&gt;Among the ten potential partners we considered, the list included indexers, wallets, decentralized protocols, interoperability protocols, and educational content providers. Although each of these options presented a valuable opportunity to enrich the Stellar ecosystem, we have identified SubQuery and Mercury as the partners that most align with Soroswap's immediate objectives.&lt;/p&gt;

&lt;p&gt;While SubQuery and Mercury both serve as indexers, they operate differently, which makes each uniquely valuable to us.&lt;/p&gt;

&lt;h2&gt;
  
  
  First Partnership: SubQuery
&lt;/h2&gt;

&lt;p&gt;Our inaugural partnership is with SubQuery, a multifaceted indexer that works closely with various blockchain platforms, including Stellar and Soroban. SubQuery's user-friendly interface simplifies production deployments.&lt;/p&gt;

&lt;p&gt;SubQuery provides a comprehensive solution for project configuration and its IPFS publishing feature promotes a more decentralized pipeline. However, to access the information we need, we are required to either rent or set up a private RPC, since public RPCs have usage restrictions and a SubQuery project tends to exceed those.&lt;/p&gt;

&lt;p&gt;In specific terms, we're developing software that customizes the SubQuery project to efficiently pull information related to Smart Contracts. This software will be deployable to IPFS, enabling its use on SubQuery's Managed Service.&lt;/p&gt;

&lt;h2&gt;
  
  
  Second Partnership: Mercury
&lt;/h2&gt;

&lt;p&gt;Our second alliance is with Mercury, a subscription-based indexer offering cost-effective and efficient solutions. Mercury comes equipped with various tools, including an alert system and a code execution environment that benefit from direct access to our database.&lt;/p&gt;

&lt;p&gt;Mercury's API is readily available; you simply request an API key and begin querying their endpoints for information. Given its subscription-based model, it's crucial to know upfront what data you need to extract from Soroswap's Smart Contracts since Mercury only stores data once you've subscribed to a specific data type.&lt;/p&gt;

&lt;p&gt;In the coming days, we'll be sharing code for a client built on Node.js, using Axios to both subscribe to contracts and query Mercury's endpoints for state changes in contracts.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>stellar</category>
      <category>soroban</category>
      <category>indexer</category>
    </item>
    <item>
      <title>Welcome to Soroswap.Finance</title>
      <dc:creator>esteblock</dc:creator>
      <pubDate>Tue, 31 Oct 2023 12:29:51 +0000</pubDate>
      <link>https://dev.to/soroswap/welcome-to-soroswapfinance-54kb</link>
      <guid>https://dev.to/soroswap/welcome-to-soroswapfinance-54kb</guid>
      <description>&lt;p&gt;This will be our space to share what we are building in the Soroban / Stellar Blockchain!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroswap.finance/"&gt;https://soroswap.finance/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
