Update docs

This commit is contained in:
github-actions
2023-09-19 19:19:10 +00:00
commit dbe796d542
624 changed files with 107720 additions and 0 deletions

11
test/helpers/math.js Normal file
View File

@ -0,0 +1,11 @@
module.exports = {
// sum of integer / bignumber
sum: (...args) => args.reduce((acc, n) => acc + n, 0),
BNsum: (...args) => args.reduce((acc, n) => acc.add(n), web3.utils.toBN(0)),
// min of integer / bignumber
min: (...args) => args.slice(1).reduce((x, y) => (x < y ? x : y), args[0]),
BNmin: (...args) => args.slice(1).reduce((x, y) => (x.lt(y) ? x : y), args[0]),
// max of integer / bignumber
max: (...args) => args.slice(1).reduce((x, y) => (x > y ? x : y), args[0]),
BNmax: (...args) => args.slice(1).reduce((x, y) => (x.gt(y) ? x : y), args[0]),
};