Snoppy
60697cb09a
Fix typo in `Math.ternary` ( #5026 )
...
Signed-off-by: snoppy <michaleli@foxmail.com>
9 months ago
Lohann Paterno Coutinho Ferreira
4032b42694
Branchless ternary, min and max methods ( #4976 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>
9 months ago
cuinix
8cc7f2dcbf
Remove repetitive words in the docs ( #4944 )
...
Signed-off-by: cuinix <915115094@qq.com>
11 months ago
Hadrien Croubois
3def8f9d15
Rewrite comments using superscript for avoid confusion with xor operator ( #4903 )
12 months ago
Chris Gorman
140d66fad8
Improved integer square root ( #4403 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>
12 months ago
Ernesto García
4e7e6e54da
Add `bytes memory` version of `Math.modExp` ( #4893 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
12 months ago
Igor Żuk
17a8955cd8
Optimize Math operations using branchless bool to uint translation. ( #4878 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: ernestognw <ernestognw@gmail.com>
1 year ago
Mihir Wadekar
192e873fcb
Add `Math.modExp` and a `Panic` library ( #3298 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: ernestognw <ernestognw@gmail.com>
1 year ago
Hadrien Croubois
e86bb45477
Add a Math.inv function that inverse a number in Z/nZ ( #4839 )
...
Co-authored-by: ernestognw <ernestognw@gmail.com>
1 year ago
Vladislav Volosnikov
dfae50fa5b
Refactor abs without logical branching ( #4497 )
...
Co-authored-by: Francisco Giordano <fg@frang.io>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: ernestognw <ernestognw@gmail.com>
1 year ago
Ernesto García
ef699fa6a2
Update Math `try*` operations return reference ( #4775 )
1 year ago
carter-ya
e5fb718d40
Optimized gas costs in `ceilDiv` ( #4553 )
1 year ago
github-actions[bot]
3e6c86392c
Merge release-v5.0 branch ( #4665 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Francisco Giordano <fg@frang.io>
Co-authored-by: Ernesto García <ernestognw@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Eric Lau <ericglau@outlook.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
1 year ago
Francisco
a714fe6dbd
Wrap docstrings to 120 chars ( #4600 )
1 year ago
Vladislav
48cc8a92f5
Optimize muldiv ( #4494 )
...
Co-authored-by: Francisco <fg@frang.io>
2 years ago
Hadrien Croubois
00cbf5a236
Update pragma to 0.8.20 ( #4489 )
...
Co-authored-by: Francisco Giordano <fg@frang.io>
Co-authored-by: ernestognw <ernestognw@gmail.com>
2 years ago
Francisco
84db204a41
Rename rounding modes and complete with fourth ( #4455 )
...
Co-authored-by: ernestognw <ernestognw@gmail.com>
2 years ago
Francisco
6bf68a41d1
Remove "available since" comments ( #4424 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
2 years ago
Ernesto García
2477534260
Change behavior of ceilDiv(0, 0) and improve test coverage ( #4348 )
2 years ago
Ernesto García
b425a72240
Replace revert strings with custom errors ( #4261 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Francisco <fg@frang.io>
2 years ago
Ernesto García
7bb5592ad5
Bump minimum pragma version to `0.8.19` ( #4288 )
2 years ago
github-actions[bot]
09329f8a18
Merge release-v4.9 branch ( #4274 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Francisco Giordano <fg@frang.io>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
2 years ago
Hadrien Croubois
0f10efe232
Remove code in preparation for v5.0 ( #4258 )
...
Co-authored-by: Ernesto García <ernestognw@gmail.com>
Co-authored-by: Francisco <fg@frang.io>
2 years ago
Pascal Marco Caversaccio
eb38c059d8
Add comment on unchecked arithmetic (division by zero) in `Math.sol` ( #4050 )
...
Co-authored-by: Francisco <fg@frang.io>
2 years ago
Saint Rat Wrongtail
3a3c87b1a6
Fix docs for Math.log256 ( #3916 )
2 years ago
Francisco Giordano
4147005b0c
Update Prettier Solidity ( #3898 )
2 years ago
Francisco
b709eae01d
Update Prettier Solidity ( #3898 )
2 years ago
Francisco
8f8fd84f1e
Improve some NatSpec and revert reasons ( #3809 )
...
Co-authored-by: JulissaDantes <julissadcj@gmail.com>
2 years ago
Francisco Giordano
49c0e4370d
4.8.0
2 years ago
Hadrien Croubois
1f18fea1de
4.8.0-rc.2
2 years ago
Tom French
34e5863cd5
Reduce gas in `log256` ( #3745 )
2 years ago
Hadrien Croubois
16791134c1
4.8.0-rc.1
2 years ago
Francisco Giordano
5e6fd491f3
4.8.0-rc.0
2 years ago
Hadrien Croubois
c1d6e39aab
Add log2, log10 and log256 functions ( #3670 )
2 years ago
Daniel Liu
005a35b02a
Optimize Math.max and SignedMath.max ( #3679 )
...
Co-authored-by: Daniel Liu <liudaniel@qq.com>
2 years ago
Hadrien Croubois
71aaca2d9d
Extend Checkpoints with new sizes and lookup mechanisms ( #3589 )
2 years ago
Igor Żuk
580b7ab816
Optimize safe casting of signed numbers ( #3565 )
3 years ago
Siloé Garcez
597654db00
Fixed typos in `Math`: `sqrt` function. ( #3522 )
3 years ago
Hadrien Croubois
3dac7bbed7
Merge v4.7 back into master ( #3516 )
3 years ago
jjz
3ac4add548
Add sqrt for math ( #3242 )
3 years ago
Hadrien Croubois
5e00787199
ERC4626 ( #3171 )
3 years ago
Hadrien Croubois
b61faf8368
Procedural SafeCast.sol generation ( #3245 )
3 years ago
Hadrien Croubois
a035b235b4
Release v4.6 ( #3358 )
...
* 4.6.0-rc.0
* Fix release script to only release @openzeppelin/contracts
(cherry picked from commit 2bd75a44bb
)
* make ERC2981:royaltyInfo public (#3305 )
(cherry picked from commit d2832ca7a9
)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
* add transpilation guards to the crosschain mocks (#3306 )
(cherry picked from commit 9af5af8fff
)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
* Fix tests on upgradeable contracts after transpilation
(cherry picked from commit 0762479dd5
)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
* Remove unused constructor argument
(cherry picked from commit 69c3781043
)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
* Bump minimum Solidity version for Initializable.sol to 0.8.2 (#3328 )
(cherry picked from commit cb14ea3c5c
)
* Fix update-comment script to ignore invalid tags
(cherry picked from commit 848fef5b6c
)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
* 4.6.0
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Pandapip1
faf5820f03
Fix many spelling errors ( #3274 )
3 years ago
Francisco Giordano
afb20119b3
Release v4.5
3 years ago
Hadrien Croubois
3eb2d43b06
Move abs(int256) from Math to SafeMath ( #3110 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
rotcivegaf
3458c1e854
Add SignedMath with math utilities for signed integers ( #2686 )
...
* add contract and tests
* avoid implicit cast
* add test cases
* fix test names
* modify avarage and add tests
* improve signed average formula
* fix lint
* better average formula
* refactor signed average testing
* add doc and changelog entry
* Update contracts/utils/math/SignedMath.sol
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
* remove ceilDiv
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Francisco Giordano
6bd6b76d11
4.4.1
3 years ago
Francisco Giordano
4961a51cc7
4.4.0
3 years ago
barakman
f6db5c1f30
A function which returns the absolute value of a signed value ( #2984 )
...
* Add a function which returns the absolute (and obviously unsigned) value of a signed value.
* add changelog entry and fix lint
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
3 years ago