starknet-io / starknet.js

JavaScript library for StarkNet
https://www.starknetjs.com
MIT License
1.22k stars 742 forks source link

Add test and support for negative Signed integers smaller than 252 bits #1177

Open fmmesen opened 3 months ago

fmmesen commented 3 months ago

feat: added new data types test: added new tests for data types

1014

Motivation and Resolution

Created new Cairo Data Types integer classes and their unit tests for every range of bits below 252, similar to the uint256.ts file.

Development related changes

Checklist:

fmmesen commented 3 months ago

Hello @tabaktoni @ivpavici ! New feature is done and ready to be reviewed.

fmmesen commented 2 months ago

Hello @penovicp, I have a doubt about where exactly I should use those classes for request/response handling. Could you provide some guidance?

penovicp commented 2 months ago

This comment describes what the required behaviour should be.

The existing data type utility classes such as CairoUint256 and CairoUint512 can be checked to see how and where the signed integer classes should be used.