Improve ERC4626 fees example (#4476)

Co-authored-by: Francisco <fg@frang.io>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
Ernesto García
2023-07-28 19:16:14 -06:00
committed by GitHub
parent aed5720a01
commit f631d8a5f0
3 changed files with 50 additions and 37 deletions

View File

@ -737,9 +737,9 @@ contract('ERC4626', function (accounts) {
}
describe('ERC4626Fees', function () {
const feeBasePoint = web3.utils.toBN(5e3);
const feeBasisPoints = web3.utils.toBN(5e3);
const valueWithoutFees = web3.utils.toBN(10000);
const fees = valueWithoutFees.mul(feeBasePoint).divn(1e5);
const fees = valueWithoutFees.mul(feeBasisPoints).divn(1e4);
const valueWithFees = valueWithoutFees.add(fees);
describe('input fees', function () {
@ -749,7 +749,7 @@ contract('ERC4626', function (accounts) {
name + ' Vault',
symbol + 'V',
this.token.address,
feeBasePoint,
feeBasisPoints,
other,
0,
constants.ZERO_ADDRESS,