sarvalabs / js-moi-sdk

JavaScript library to interact with MOI Protocol via RPC API
https://js-moi-sdk.docs.moi.technology/
Apache License 2.0
24 stars 2 forks source link

Refactor logic processing to handle optional calldata #103

Open sarvalabs-gokul opened 3 days ago

sarvalabs-gokul commented 3 days ago

Description

In the current implementation of logic processing, there are cases where calldata may not be present for certain routines. The existing validation unnecessarily enforces a check for calldata, which is optional.

This issue proposes the following changes:

  1. Remove the redundant validation for calldata where it's not required.
  2. Ensure calldata is serialized only when it exists; otherwise, it should be ignored.

This will streamline the logic processing and avoid unnecessary errors related to missing calldata.