-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Events :: Return typed decoded event data #1325
Comments
Hey @Valazan just FYI in this period of time we have replaced Some additional work might need to be done for "custom" types (maybe that could be the scope of this ticket) but the new methods return objects, just FYI. Have a look at:
Reach out to me if you have any questions ofc, or if we need to work on something else to improve it. Thanks! |
Currently, the Software Development Kit (SDK) is returning data as a generic Result object provided by the Ethers.js library. While this Result object contains the necessary decoded data from smart contract interactions, it lacks a structured format that aligns with the smart contract's Application Binary Interface (ABI).
The ABI defines the methods and variables available in a smart contract, essentially acting as a blueprint for how data should be organized and accessed. When the SDK returns data as an unstructured Result, developers may face challenges in interpreting and utilizing this data effectively. They might need to manually parse the Result object to extract the relevant information, which can be error-prone and time-consuming.
To enhance usability and developer experience, the SDK should return the decoded data structured according to the ABI specifications. This means organizing the data into objects or formats that directly reflect the expected inputs and outputs defined in the smart contract's ABI. By doing so, developers can interact with the data more intuitively, reducing the overhead of manual data manipulation and minimizing the risk of errors.
In summary, modifying the SDK to output data structured per the ABI will streamline the development process by providing clear, well-organized data that aligns with the smart contract's defined interface
The text was updated successfully, but these errors were encountered: