web3.unity icon indicating copy to clipboard operation
web3.unity copied to clipboard

Improve Contract Call() & Send() method interfaces

Open oleksandrchainsafe opened this issue 1 year ago • 0 comments

Currently Call() & Send() methods take array of object as arguments. Same happens with a return value. This is very non-convenient and creates a boilerplate of code each time you make a call to a smart-contract.

The interface for Contract class can be reworked to use Type Arguments (<T>). This will improve user interactions with the SDK together with the overall quality of code, the SDK code, and a call site code of the user.

Acceptance Criteria

  • A set of methods with different number of type arguments for both input & output types should be implemented
  • Type incompatibility errors should be handled and rethrown as a Web3Exception if required

oleksandrchainsafe avatar Mar 25 '24 15:03 oleksandrchainsafe