You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance niljs transaction methods to return both transaction hash and detailed status information without requiring developers to manually loop through nested JSON structures.
Background
Currently, when using methods like smartAccount.sendTransaction or smartAccount.deployContract, developers only receive a transaction hash. To determine transaction status and error information, they must call client.getTransactionReceipt, then manually loop through complex nested JSON structures to check for failure flags and extract error messages.
Feature Requirements
Improve transaction-related methods in niljs to:
Return transaction hash along with parsed status information in a single response
Automatically extract and surface error messages when transactions fail
Eliminate the need for manual JSON traversal to determine transaction outcomes
Technical Implementation Steps
Create a transaction result parser:
Implement logic to traverse transaction receipt JSON
Extract status flags and error messages from nested structures
Transform complex receipt data into developer-friendly format
Enhance transaction method return objects:
Return both transaction hash and parsed status information
Include formatted error messages when transactions fail
Provide boolean success indicator for quick status checks
I’m Ikem, and I’d love to take this on! I’m a Software developer with 3 years of experience and strong programming principles, and I’m also very skilled in typeScript for projects like nil.js.
I can improve the transaction methods to return the hash and clear status info. I’ll build a parser to pull out status and errors, update the methods to return simple, friendly results, and keep old code working.
Overview
Enhance niljs transaction methods to return both transaction hash and detailed status information without requiring developers to manually loop through nested JSON structures.
Background
Currently, when using methods like
smartAccount.sendTransaction
orsmartAccount.deployContract
, developers only receive a transaction hash. To determine transaction status and error information, they must callclient.getTransactionReceipt
, then manually loop through complex nested JSON structures to check for failure flags and extract error messages.Feature Requirements
Improve transaction-related methods in niljs to:
Technical Implementation Steps
Create a transaction result parser:
Enhance transaction method return objects:
Update interfaces:
Implement error categorization:
Technical References
Acceptance Criteria
The text was updated successfully, but these errors were encountered: