Added atomic SUI-to-USDC swap to our validator reward claim script, powered by @AftermathFi SDK! The trickiest part was getting the value of the claimed Sui coin to pass to the AF router API request. Ended up using devInspectTransactionBlock and parsing the 0x2::coin::value BCS as u64. Not sure if this is the best or right way, but it works!

Sector:
From Twitter
Disclaimer: The content above is only the author's opinion which does not represent any position of Followin, and is not intended as, and shall not be understood or construed as, investment advice from Followin.
Like
Add to Favorites
Comments
Share




