streamingfast / substreams-rs

7 stars 3 forks source link

feat: div_rem for bigint #20

Closed sahra-karakoc closed 1 year ago

sahra-karakoc commented 1 year ago

Description

We needed to calculate the remainder of a BigInt by BigInt in our substreams, hence I implemented the div_rem method under impl BigInt and added some units tests.

Alternative considerations

div_rem is implemented under impl Integer for BigInt for num_bigint::BigInt, see here, but that requires implementing many more methods that I am not sure are useful. Thoughts?

Eduard-Voiculescu commented 1 year ago

LGTM

Eduard-Voiculescu commented 1 year ago

@sahra-karakoc Can you please add the change that you have done in the CHANGELOG.md. Just above the 0.5.10, you can create a section like this:

### Next
- your_changes_here