Your contract can move every balance correctly and still tell the world the wrong story. Wallets, explorers and indexers mostly learn what happened from the events a contract emits, so one wrong field there breaks every app that listens. I planted exactly that bug in the tip jar contract for our Stellar 14 bug hunt. Ama tips Kofi 30, the balances update perfectly, and the Tipped event sets to: from.clone(). The event says Ama tipped Ama. A wallet that filters events on the to topic never shows Kofi his tip, and the balance tests stay green the whole time. The fix is one word. The habit is what I teach: write a test that asserts https://t.co/Es5nnrpeZT().all() equals the exact event you expect, with sender, receiver and amount. Most RPC providers keep less than a week of event history, so an indexer that stored the wrong receiver usually keeps it. What do you check in your contract events before you ship? https://t.co/uiX9IXrv9a
Kaleel | Graph EngineerShare

Source:Show original
Disclaimer: The information on this page may have been obtained from third parties and does not necessarily reflect the views or opinions of KuCoin. This content is provided for general informational purposes only, without any representation or warranty of any kind, nor shall it be construed as financial or investment advice. KuCoin shall not be liable for any errors or omissions, or for any outcomes resulting from the use of this information.
Investments in digital assets can be risky. Please carefully evaluate the risks of a product and your risk tolerance based on your own financial circumstances. For more information, please refer to our Terms of Use and Risk Disclosure.