Skip to content

feat: implementation of safeMath library#95

Merged
Thykof merged 3 commits into
massalabs:mainfrom
jimmylies:main
Mar 3, 2023
Merged

feat: implementation of safeMath library#95
Thykof merged 3 commits into
massalabs:mainfrom
jimmylies:main

Conversation

@jimmylies

Copy link
Copy Markdown
Contributor

safeMath library added to the repo - inspired by OpenZeppelin SafeMath library before Solidity v0.8 https://github.com/OpenZeppelin/openzeppelin-contracts/blob/90ed1af972299070f51bf4665a85da56ac4d355e/contracts/math/SafeMath.sol

@Thykof

Thykof commented Feb 6, 2023

Copy link
Copy Markdown
Contributor

related to #98

@Thykof Thykof left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, appreciated! Did you have a look at some existing libraries like https://github.com/koinos/koinos-sdk-as/blob/master/assembly/util/safeMath.ts?

please add unit tests and npm run fmt

@Thykof

Thykof commented Feb 6, 2023

Copy link
Copy Markdown
Contributor

We will take the lead on the PR

@Thykof Thykof linked an issue Feb 7, 2023 that may be closed by this pull request
5 tasks
Comment thread packages/as-types/assembly/safeMath.ts Outdated
@Thykof Thykof merged commit e62e191 into massalabs:main Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a SafeMath Library ( Addition & Substraction)

2 participants