<?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: levithefirst</title>
    <description>The latest articles on DEV Community by levithefirst (@levithefirst).</description>
    <link>https://dev.to/levithefirst</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4232395%2Fff1c53e0-21f2-4d42-aef4-d80699a3e1a5.jpg</url>
      <title>DEV Community: levithefirst</title>
      <link>https://dev.to/levithefirst</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/levithefirst"/>
    <language>en</language>
    <item>
      <title>Clew : Remembering the retry that worked</title>
      <dc:creator>levithefirst</dc:creator>
      <pubDate>Sat, 07 Nov 2026 16:05:41 +0000</pubDate>
      <link>https://dev.to/levithefirst/clew-remembering-the-retry-that-worked-9gj</link>
      <guid>https://dev.to/levithefirst/clew-remembering-the-retry-that-worked-9gj</guid>
      <description>&lt;p&gt;&lt;em&gt;Tatum × Walrus Memory “Total Recall” hackathon. Live at &lt;a href="https://clew-eight.vercel.app" rel="noopener noreferrer"&gt;clew-eight.vercel.app&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A transaction reverts. The wallet says “execution reverted”, maybe with a reason string. Someone tweaks a number, resubmits, and it goes through. A week later the same wallet hits the same contract with the same error and starts from zero, because nothing kept the fix.&lt;/p&gt;

&lt;p&gt;If you build agents that send transactions, that loop burns retries and leaves you guessing which change actually landed. Wallet users hit the same wall: they pay gas twice and still walk away without knowing whether a slippage limit or a deadline was the thing that moved. Hackathon judges can check a concrete claim on real Mainnet data: a stored memory changes what you do on the next failure.&lt;/p&gt;

&lt;p&gt;Clew watches that loop and stores it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Clew does
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;A transaction fails. Clew reads the receipt and decodes why.&lt;/li&gt;
&lt;li&gt;The same wallet retries the same contract and succeeds. Clew diffs the two attempts and writes what changed to Walrus Memory on Mainnet.&lt;/li&gt;
&lt;li&gt;The next time that wallet fails on that contract with a similar error, Clew recalls the memory and returns the prior successful transaction plus a concrete next action.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With an empty memory it can only say the transaction reverted. Once a memory exists, it can name which words in the call changed, and point at the retry that landed.&lt;/p&gt;

&lt;p&gt;The public website never writes. Both the Try it box and the agent endpoint only read.&lt;/p&gt;

&lt;p&gt;If you run an agent that retries failed swaps, send the failed hash to &lt;code&gt;/v1/recall&lt;/code&gt; and you get the last path that worked for that wallet and contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Tatum is used
&lt;/h2&gt;

&lt;p&gt;Every chain read goes through Tatum, so a pasted failure is decoded from a live receipt.&lt;/p&gt;

&lt;p&gt;On Base, Ethereum and Polygon that means the JSON-RPC gateways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;eth_getTransactionReceipt&lt;/code&gt; for status. Clew treats &lt;code&gt;0x0&lt;/code&gt; as a failure and only accepts a later &lt;code&gt;0x1&lt;/code&gt; transaction as the retry.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;eth_getTransactionByHash&lt;/code&gt; for calldata, gas limit, gas price, value and nonce. &lt;code&gt;eth_getBlockByNumber&lt;/code&gt; for the timestamp.&lt;/li&gt;
&lt;li&gt;Revert decoding via &lt;code&gt;debug_traceTransaction&lt;/code&gt; with &lt;code&gt;callTracer&lt;/code&gt;, falling back to an &lt;code&gt;eth_call&lt;/code&gt; replay at &lt;code&gt;block - 1&lt;/code&gt;. Clew decodes &lt;code&gt;Error(string)&lt;/code&gt; (&lt;code&gt;0x08c379a0&lt;/code&gt;), &lt;code&gt;Panic(uint256)&lt;/code&gt; (&lt;code&gt;0x4e487b71&lt;/code&gt;) and custom error selectors, then normalizes them into a signature such as &lt;code&gt;revert:too_little_received&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;eth_getBlockReceipts&lt;/code&gt; to find the successful retry from the same wallet to the same contract after the failure.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The free plan allows 3 requests a second. Clew spaces its calls about 360 ms apart and backs off on HTTP 429.&lt;/p&gt;

&lt;p&gt;Sui uses a different door on the same provider. Tatum’s Sui gateway serves GraphQL only (&lt;code&gt;POST https://sui-mainnet.gateway.tatum.io/graphql&lt;/code&gt;). A first attempt at &lt;code&gt;sui_*&lt;/code&gt; JSON-RPC came back HTTP 404, so the adapter was rewritten against GraphQL. One transaction query returns the sender, gas budget and price, status, checkpoint, Move calls, Pure inputs, and &lt;code&gt;executionError&lt;/code&gt; (the module, function and abort code where it died). That becomes a signature like &lt;code&gt;moveabort:errors::err_amount_out_slippage_check_failed:1&lt;/code&gt;. Finding the retry is supposed to take one filtered query: same sender, same &lt;code&gt;package::module&lt;/code&gt;, after the failure’s checkpoint.&lt;/p&gt;

&lt;p&gt;That GraphQL path was verified on Sui Mainnet on 31 October 2026: the gateway answered at checkpoint 340173364, recent programmable transactions decoded, and two real fail → success pairs were written to Walrus. On 7 November 2026, single-transaction reads still worked and the live &lt;code&gt;/v1/recall&lt;/code&gt; endpoint answered two digests with the same structured shape as Base. The list query (&lt;code&gt;transactions&lt;/code&gt;) returned “Failed to list transactions” that day, so a &lt;em&gt;new&lt;/em&gt; pair could not be discovered then.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Walrus Memory is used
&lt;/h2&gt;

&lt;p&gt;Memories go to the Walrus Memory Mainnet relayer (&lt;code&gt;https://relayer.memory.walrus.xyz&lt;/code&gt;) in namespace &lt;code&gt;clew&lt;/code&gt;, through &lt;code&gt;@mysten-incubation/memwal&lt;/code&gt;. Later failures from the same wallet can pick up the retry that already worked because that write lives there.&lt;/p&gt;

&lt;p&gt;A write is &lt;code&gt;remember(text, { idempotencyKey: "chain:failedTx:successTx" })&lt;/code&gt;, then &lt;code&gt;waitForRememberJob&lt;/code&gt; until a &lt;code&gt;blob_id&lt;/code&gt; comes back. If that confirmation never arrives, the pair is not treated as stored. A read is &lt;code&gt;recall&lt;/code&gt; with a query built from the new failure’s chain, contract, wallet, error and selector. Recall is semantic, so Clew then applies a strict filter: exact chain, exact contract, exact wallet, and a similar error. Another wallet’s path is never reused.&lt;/p&gt;

&lt;p&gt;The memory text is plain and factual, tags first so both recall and the filter have something to hold on to:&lt;/p&gt;

</description>
      <category>agents</category>
      <category>hackathon</category>
      <category>software</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
