Skip to content
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

feat: Add Wad_Ray_Math #211

Closed
1 of 2 tasks
FabienCoutant opened this issue Nov 6, 2023 · 2 comments
Closed
1 of 2 tasks

feat: Add Wad_Ray_Math #211

FabienCoutant opened this issue Nov 6, 2023 · 2 comments
Assignees
Labels
enhancement Enhancement of the code, not introducing new features.

Comments

@FabienCoutant
Copy link
Contributor

FabienCoutant commented Nov 6, 2023

Feature Request

Describe the Feature Request

With more and more DeFi projects coming in starknet, the need of handling high decimals maths are required. I propose to start the implementation for the 27 decimals (following WadRayMath standard).

Describe Preferred Solution

Add under Maths or a specific folder: wad_ray_math.cairo (wad means for 18 decimals and ray for 27)

Describe Alternatives

Related Code

Additional Context

We could be inspired by PRB-Math UD60x18

If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)

  • Yes
  • No

Edit: rename UD27x18 by wad_ray_math to follow solidity feature

@FabienCoutant FabienCoutant added the enhancement Enhancement of the code, not introducing new features. label Nov 6, 2023
@0xLucqs
Copy link
Collaborator

0xLucqs commented Nov 7, 2023

I hereby approve the feature. You're now officially allowed to work on it
cc @gaetbout

@FabienCoutant FabienCoutant changed the title feat: Add Unsigned/Signed 27 decimals feat: Add Wad_Ray_Math Nov 13, 2023
0xLucqs pushed a commit that referenced this issue Nov 15, 2023
<!--- Please provide a general summary of your changes in the title
above -->

## Pull Request type

<!-- Please try to limit your pull request to one type; submit multiple
pull requests if needed. -->

Please check the type of change your PR introduces:

- [ ] Bugfix
- [X] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no API changes)
- [ ] Build-related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

## What is the current behavior?

Handle Wad & Ray mul/div 
<!-- Please describe the current behavior that you are modifying, or
link to a relevant issue. -->

Issue Number: #211 

## What is the new behavior?

<!-- Please describe the behavior or changes that are being added by
this PR. -->

Add new functions to handle 18 & 27 decimals base maths

## Does this introduce a breaking change?

- [ ] Yes
- [X] No

<!-- If this does introduce a breaking change, please describe the
impact and migration path for existing applications below. -->

## Other information

<!-- Any other information that is important to this PR, such as
screenshots of how the component looks before and after the change. -->
@gaetbout
Copy link
Collaborator

@LucasLvy This can be closed

@0xLucqs 0xLucqs closed this as completed Nov 20, 2023
sveamarcus pushed a commit to sveamarcus/alexandria that referenced this issue Dec 7, 2023
<!--- Please provide a general summary of your changes in the title
above -->

## Pull Request type

<!-- Please try to limit your pull request to one type; submit multiple
pull requests if needed. -->

Please check the type of change your PR introduces:

- [ ] Bugfix
- [X] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no API changes)
- [ ] Build-related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

## What is the current behavior?

Handle Wad & Ray mul/div 
<!-- Please describe the current behavior that you are modifying, or
link to a relevant issue. -->

Issue Number: keep-starknet-strange#211 

## What is the new behavior?

<!-- Please describe the behavior or changes that are being added by
this PR. -->

Add new functions to handle 18 & 27 decimals base maths

## Does this introduce a breaking change?

- [ ] Yes
- [X] No

<!-- If this does introduce a breaking change, please describe the
impact and migration path for existing applications below. -->

## Other information

<!-- Any other information that is important to this PR, such as
screenshots of how the component looks before and after the change. -->
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Enhancement of the code, not introducing new features.
Projects
None yet
Development

No branches or pull requests

3 participants