guys! Right now I am working on web3 project, which has a wallet as it's one parts. Can you give me advices on how to create this Transaction History for user, because I am kind of stuck on it.
First of all, I guess, it is great idea to show user his history updates in real-time while he is in the App. For this purpose I am using Moralis Stream API, which is great: it sends me real-time data about new transactions. Problems begin when I am trying to decode those transactions for user. They do not have so much information, some transactions cant get decoded even with ABI and input data (when decoding transactions from OKX DEX Aggregator, I always get raise ValueError(f"Could not find any function with matching {identifier}") ValueError: Could not find any function with matching selector)
So, I really don't know what to do. There is an idea to maybe use BSC/ETH/Polygon/etc/Scans to retrieve transaction data by it's hash, but idk, would be happy to hear your advices.
In general, my goal is to bring all transactions to types: Swap (when in one transaction we give one token and in the end receive another), Send (we only send), Receive (we only get) and Approve. How it can be done?
const decodedLogs = Moralis.Streams.parsedLogs(webhook_data);