diff --git a/test-foundry/common/uniswap/UniswapV3PoolCreator.sol b/test-foundry/common/uniswap/UniswapV3PoolCreator.sol index e1dc78dbf..e843a98b3 100644 --- a/test-foundry/common/uniswap/UniswapV3PoolCreator.sol +++ b/test-foundry/common/uniswap/UniswapV3PoolCreator.sol @@ -27,7 +27,7 @@ contract UniswapV3PoolCreator is IERC721Receiver { IUniswapV3Factory public uniswapFactory = IUniswapV3Factory(0x1F98431c8aD98523631AE4a59f267346ea31F984); - INonfungiblePositionManager public nonfungiblePositionManager = + INonfungiblePositionManager public nonFungiblePositionManager = INonfungiblePositionManager(0xC36442b4a4522E871399CD717aBDD847Ab11FE88); address public WETH9; // Intermediate token address. uint24 public constant POOL_FEE = 3000; @@ -37,7 +37,7 @@ contract UniswapV3PoolCreator is IERC721Receiver { uint256 public amountToMint = 1000e18; constructor() { - WETH9 = nonfungiblePositionManager.WETH9(); + WETH9 = nonFungiblePositionManager.WETH9(); } function createPoolAndMintPosition(address _token0) external { @@ -49,7 +49,7 @@ contract UniswapV3PoolCreator is IERC721Receiver { // createAndInitializePoolIfNecessary requires that token 0 address < token 1 address (token0, token1) = (token1, token0); } - nonfungiblePositionManager.createAndInitializePoolIfNecessary( + nonFungiblePositionManager.createAndInitializePoolIfNecessary( token0, token1, POOL_FEE, @@ -74,8 +74,8 @@ contract UniswapV3PoolCreator is IERC721Receiver { ) { // Approve the position manager - TransferHelper.safeApprove(_token0, address(nonfungiblePositionManager), amountToMint); - TransferHelper.safeApprove(WETH9, address(nonfungiblePositionManager), amountToMint); + TransferHelper.safeApprove(_token0, address(nonFungiblePositionManager), amountToMint); + TransferHelper.safeApprove(WETH9, address(nonFungiblePositionManager), amountToMint); INonfungiblePositionManager.MintParams memory params = INonfungiblePositionManager .MintParams({ @@ -93,20 +93,20 @@ contract UniswapV3PoolCreator is IERC721Receiver { }); // Note that the pool defined and fee tier 0.3% must already be created and initialized in order to mint - (tokenId, liquidity, amount0, amount1) = nonfungiblePositionManager.mint(params); + (tokenId, liquidity, amount0, amount1) = nonFungiblePositionManager.mint(params); // Create a deposit _createDeposit(msg.sender, tokenId); // Remove allowance and refund in both assets. if (amount0 < amountToMint) { - TransferHelper.safeApprove(_token0, address(nonfungiblePositionManager), 0); + TransferHelper.safeApprove(_token0, address(nonFungiblePositionManager), 0); uint256 refund0 = amountToMint - amount0; TransferHelper.safeTransfer(_token0, msg.sender, refund0); } if (amount1 < amountToMint) { - TransferHelper.safeApprove(WETH9, address(nonfungiblePositionManager), 0); + TransferHelper.safeApprove(WETH9, address(nonFungiblePositionManager), 0); uint256 refund1 = amountToMint - amount1; TransferHelper.safeTransfer(WETH9, msg.sender, refund1); } @@ -137,7 +137,7 @@ contract UniswapV3PoolCreator is IERC721Receiver { , , - ) = nonfungiblePositionManager.positions(tokenId); + ) = nonFungiblePositionManager.positions(tokenId); // set the owner and data for position // operator is msg.sender diff --git a/test-foundry/compound/TestEth.t.sol b/test-foundry/compound/TestEth.t.sol index 46afa8bc7..0a8665719 100644 --- a/test-foundry/compound/TestEth.t.sol +++ b/test-foundry/compound/TestEth.t.sol @@ -184,7 +184,7 @@ contract TestEth is TestSetup { function testShouldLiquidateUserWithEthBorrowed() public { uint256 collateral = to6Decimals(100_000 ether); - // supplier1 supplies excedent of USDC to put Morpho clearly above water. + // supplier1 supplies surplus of USDC to put Morpho clearly above water. supplier1.approve(usdc, address(morpho), collateral); supplier1.supply(cUsdc, collateral); @@ -241,7 +241,7 @@ contract TestEth is TestSetup { uint256 collateral = 1 ether; uint256 toSupplyMore = to6Decimals(100_000 ether); - // supplier1 supplies excedent of USDC to put Morpho clearly above water. + // supplier1 supplies surplus of USDC to put Morpho clearly above water. supplier1.approve(usdc, address(morpho), toSupplyMore); supplier1.supply(cUsdc, toSupplyMore); diff --git a/test-foundry/compound/TestGasConsumption.t.sol b/test-foundry/compound/TestGasConsumption.t.sol index 1390214fb..ebfa4c1c5 100644 --- a/test-foundry/compound/TestGasConsumption.t.sol +++ b/test-foundry/compound/TestGasConsumption.t.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.13; import "./setup/TestSetup.sol"; contract TestGasConsumption is TestSetup { - // Hyperparameters to get the gas estimate for + // Hyper parameters to get the gas estimate for uint256 public maxSortedUsers = 50; uint256 public numberOfMatches = 25; diff --git a/test-foundry/compound/TestGovernance.t.sol b/test-foundry/compound/TestGovernance.t.sol index 488e79344..24d85f592 100644 --- a/test-foundry/compound/TestGovernance.t.sol +++ b/test-foundry/compound/TestGovernance.t.sol @@ -6,7 +6,7 @@ import "./setup/TestSetup.sol"; contract TestGovernance is TestSetup { using CompoundMath for uint256; - function testShoudDeployContractWithTheRightValues() public { + function testShouldDeployContractWithTheRightValues() public { assertEq( morpho.p2pSupplyIndex(cDai), 2 * 10**(16 + ERC20(ICToken(cDai).underlying()).decimals() - 8) @@ -137,7 +137,7 @@ contract TestGovernance is TestSetup { assertTrue(morpho.p2pDisabled(cDai)); } - function testonlyOwnerShouldSetPositionsManager() public { + function testOnlyOwnerShouldSetPositionsManager() public { IPositionsManager positionsManagerV2 = new PositionsManager(); hevm.prank(address(0)); @@ -187,7 +187,7 @@ contract TestGovernance is TestSetup { assertEq(address(morpho.incentivesVault()), address(incentivesVaultV2)); } - function testOnlyOwnerShouldSetTreasuryvault() public { + function testOnlyOwnerShouldSetTreasuryVault() public { address treasuryVaultV2 = address(2); hevm.prank(address(0)); diff --git a/test-foundry/compound/TestIncentivesVault.t.sol b/test-foundry/compound/TestIncentivesVault.t.sol index 5a834efac..06beb1503 100644 --- a/test-foundry/compound/TestIncentivesVault.t.sol +++ b/test-foundry/compound/TestIncentivesVault.t.sol @@ -106,7 +106,7 @@ contract TestIncentivesVault is Config, DSTest, stdCheats { incentivesVault.tradeCompForMorphoTokens(address(1), 0); } - function testOnlymorphoShouldTriggerCompConvertFunction() public { + function testOnlyMorphoShouldTriggerCompConvertFunction() public { incentivesVault.setMorphoDao(address(1)); uint256 amount = 100; tip(COMP, address(morpho), amount); diff --git a/test-foundry/compound/TestInterestRates.t.sol b/test-foundry/compound/TestInterestRates.t.sol index 669ac5a7d..6ea707240 100644 --- a/test-foundry/compound/TestInterestRates.t.sol +++ b/test-foundry/compound/TestInterestRates.t.sol @@ -61,9 +61,9 @@ contract TestInterestRates is InterestRatesManager, DSTest { ); (uint256 newP2PSupplyIndex, uint256 newP2PBorrowIndex) = _computeP2PIndexes(params); // prettier-ignore - (uint256 expectednewP2PSupplyIndex, uint256 expectednewP2PBorrowIndex) = computeP2PIndexes(params); // prettier-ignore - assertApproxEq(newP2PSupplyIndex, expectednewP2PSupplyIndex, 1); - assertApproxEq(newP2PBorrowIndex, expectednewP2PBorrowIndex, 1); + (uint256 expectedNewP2PSupplyIndex, uint256 expectedNewP2PBorrowIndex) = computeP2PIndexes(params); // prettier-ignore + assertApproxEq(newP2PSupplyIndex, expectedNewP2PSupplyIndex, 1); + assertApproxEq(newP2PBorrowIndex, expectedNewP2PBorrowIndex, 1); } function testIndexComputationWithReserveFactor() public { @@ -80,9 +80,9 @@ contract TestInterestRates is InterestRatesManager, DSTest { ); (uint256 newP2PSupplyIndex, uint256 newP2PBorrowIndex) = _computeP2PIndexes(params); // prettier-ignore - (uint256 expectednewP2PSupplyIndex, uint256 expectednewP2PBorrowIndex) = computeP2PIndexes(params); // prettier-ignore - assertApproxEq(newP2PSupplyIndex, expectednewP2PSupplyIndex, 1); - assertApproxEq(newP2PBorrowIndex, expectednewP2PBorrowIndex, 1); + (uint256 expectedNewP2PSupplyIndex, uint256 expectedNewP2PBorrowIndex) = computeP2PIndexes(params); // prettier-ignore + assertApproxEq(newP2PSupplyIndex, expectedNewP2PSupplyIndex, 1); + assertApproxEq(newP2PBorrowIndex, expectedNewP2PBorrowIndex, 1); } function testIndexComputationWithDelta() public { @@ -99,9 +99,9 @@ contract TestInterestRates is InterestRatesManager, DSTest { ); (uint256 newP2PSupplyIndex, uint256 newP2PBorrowIndex) = _computeP2PIndexes(params); // prettier-ignore - (uint256 expectednewP2PSupplyIndex, uint256 expectednewP2PBorrowIndex) = computeP2PIndexes(params); // prettier-ignore - assertApproxEq(newP2PSupplyIndex, expectednewP2PSupplyIndex, 1); - assertApproxEq(newP2PBorrowIndex, expectednewP2PBorrowIndex, 1); + (uint256 expectedNewP2PSupplyIndex, uint256 expectedNewP2PBorrowIndex) = computeP2PIndexes(params); // prettier-ignore + assertApproxEq(newP2PSupplyIndex, expectedNewP2PSupplyIndex, 1); + assertApproxEq(newP2PBorrowIndex, expectedNewP2PBorrowIndex, 1); } function testIndexComputationWithDeltaAndReserveFactor() public { @@ -118,9 +118,9 @@ contract TestInterestRates is InterestRatesManager, DSTest { ); (uint256 newP2PSupplyIndex, uint256 newP2PBorrowIndex) = _computeP2PIndexes(params); // prettier-ignore - (uint256 expectednewP2PSupplyIndex, uint256 expectednewP2PBorrowIndex) = computeP2PIndexes(params); // prettier-ignore - assertApproxEq(newP2PSupplyIndex, expectednewP2PSupplyIndex, 1); - assertApproxEq(newP2PBorrowIndex, expectednewP2PBorrowIndex, 1); + (uint256 expectedNewP2PSupplyIndex, uint256 expectedNewP2PBorrowIndex) = computeP2PIndexes(params); // prettier-ignore + assertApproxEq(newP2PSupplyIndex, expectedNewP2PSupplyIndex, 1); + assertApproxEq(newP2PBorrowIndex, expectedNewP2PBorrowIndex, 1); } // prettier-ignore @@ -160,8 +160,8 @@ contract TestInterestRates is InterestRatesManager, DSTest { InterestRatesManager.Params memory params = InterestRatesManager.Params(_p2pSupplyIndex, _p2pBorrowIndex, _poolSupplyIndex, _poolBorrowIndex, _lastPoolSupplyIndex, _lastPoolBorrowIndex, _reserveFactor, _p2pIndexCursor, Types.Delta(_p2pSupplyDelta, _p2pBorrowDelta, _p2pSupplyAmount, _p2pBorrowAmount)); (uint256 newP2PSupplyIndex, uint256 newP2PBorrowIndex) = _computeP2PIndexes(params); - (uint256 expectednewP2PSupplyIndex, uint256 expectednewP2PBorrowIndex) = computeP2PIndexes(params); - assertApproxEq(newP2PSupplyIndex, expectednewP2PSupplyIndex, 400); - assertApproxEq(newP2PBorrowIndex, expectednewP2PBorrowIndex, 400); + (uint256 expectedNewP2PSupplyIndex, uint256 expectedNewP2PBorrowIndex) = computeP2PIndexes(params); + assertApproxEq(newP2PSupplyIndex, expectedNewP2PSupplyIndex, 400); + assertApproxEq(newP2PBorrowIndex, expectedNewP2PBorrowIndex, 400); } } diff --git a/test-foundry/compound/TestLens.t.sol b/test-foundry/compound/TestLens.t.sol index 736515e6a..2b9f1ed57 100644 --- a/test-foundry/compound/TestLens.t.sol +++ b/test-foundry/compound/TestLens.t.sol @@ -103,7 +103,7 @@ contract TestLens is TestSetup { uint256 collateralValue = total.mul(underlyingPrice); uint256 maxDebtValue = collateralValue.mul(collateralFactor); - // Divide and multiply to take into account rouding errors. + // Divide and multiply to take into account rounding errors. uint256 debtValue = toBorrow.div(p2pBorrowIndex).mul(p2pBorrowIndex).mul(underlyingPrice); assertEq(assetData.underlyingPrice, underlyingPrice, "underlyingPrice"); @@ -120,63 +120,63 @@ contract TestLens is TestSetup { borrower1.supply(cDai, amount); borrower1.borrow(cUsdc, toBorrow); - Types.AssetLiquidityData memory assetDatacDai = lens.getUserLiquidityDataForAsset( + Types.AssetLiquidityData memory assetDataCDai = lens.getUserLiquidityDataForAsset( address(borrower1), cDai, oracle ); - Types.AssetLiquidityData memory assetDatacUsdc = lens.getUserLiquidityDataForAsset( + Types.AssetLiquidityData memory assetDataCUsdc = lens.getUserLiquidityDataForAsset( address(borrower1), cUsdc, oracle ); // Avoid stack too deep error. - Types.AssetLiquidityData memory expectedDatcUsdc; + Types.AssetLiquidityData memory expectedDataCUsdc; (, uint256 collateralFactor, ) = comptroller.markets(cUsdc); - expectedDatcUsdc.underlyingPrice = oracle.getUnderlyingPrice(cUsdc); + expectedDataCUsdc.underlyingPrice = oracle.getUnderlyingPrice(cUsdc); - expectedDatcUsdc.debtValue = getBalanceOnCompound(toBorrow, ICToken(cUsdc).borrowIndex()) - .mul(expectedDatcUsdc.underlyingPrice); + expectedDataCUsdc.debtValue = getBalanceOnCompound(toBorrow, ICToken(cUsdc).borrowIndex()) + .mul(expectedDataCUsdc.underlyingPrice); assertEq( - assetDatacUsdc.underlyingPrice, - expectedDatcUsdc.underlyingPrice, + assetDataCUsdc.underlyingPrice, + expectedDataCUsdc.underlyingPrice, "underlyingPriceUsdc" ); - assertEq(assetDatacUsdc.collateralValue, 0, "collateralValue"); - assertEq(assetDatacUsdc.maxDebtValue, 0, "maxDebtValue"); - assertEq(assetDatacUsdc.debtValue, expectedDatcUsdc.debtValue, "debtValueUsdc"); + assertEq(assetDataCUsdc.collateralValue, 0, "collateralValue"); + assertEq(assetDataCUsdc.maxDebtValue, 0, "maxDebtValue"); + assertEq(assetDataCUsdc.debtValue, expectedDataCUsdc.debtValue, "debtValueUsdc"); // Avoid stack too deep error. - Types.AssetLiquidityData memory expectedDatacDai; + Types.AssetLiquidityData memory expectedDataCDai; - (, expectedDatacDai.collateralFactor, ) = comptroller.markets(cDai); + (, expectedDataCDai.collateralFactor, ) = comptroller.markets(cDai); - expectedDatacDai.underlyingPrice = oracle.getUnderlyingPrice(cDai); - expectedDatacDai.collateralValue = getBalanceOnCompound( + expectedDataCDai.underlyingPrice = oracle.getUnderlyingPrice(cDai); + expectedDataCDai.collateralValue = getBalanceOnCompound( amount, ICToken(cDai).exchangeRateStored() - ).mul(expectedDatacDai.underlyingPrice); - expectedDatacDai.maxDebtValue = expectedDatacDai.collateralValue.mul( - expectedDatacDai.collateralFactor + ).mul(expectedDataCDai.underlyingPrice); + expectedDataCDai.maxDebtValue = expectedDataCDai.collateralValue.mul( + expectedDataCDai.collateralFactor ); - assertEq(assetDatacDai.collateralFactor, collateralFactor, "collateralFactor"); + assertEq(assetDataCDai.collateralFactor, collateralFactor, "collateralFactor"); assertEq( - assetDatacDai.underlyingPrice, - expectedDatacDai.underlyingPrice, + assetDataCDai.underlyingPrice, + expectedDataCDai.underlyingPrice, "underlyingPriceDai" ); assertEq( - assetDatacDai.collateralValue, - expectedDatacDai.collateralValue, + assetDataCDai.collateralValue, + expectedDataCDai.collateralValue, "collateralValueDai" ); - assertEq(assetDatacDai.maxDebtValue, expectedDatacDai.maxDebtValue, "maxDebtValueDai"); - assertEq(assetDatacDai.debtValue, 0, "debtValueDai"); + assertEq(assetDataCDai.maxDebtValue, expectedDataCDai.maxDebtValue, "maxDebtValueDai"); + assertEq(assetDataCDai.debtValue, 0, "debtValueDai"); } function testGetterUserWithNothing() public { @@ -195,23 +195,23 @@ contract TestLens is TestSetup { borrower1.approve(usdc, amount); borrower1.supply(cUsdc, amount); - Types.AssetLiquidityData memory assetDatacUsdc = lens.getUserLiquidityDataForAsset( + Types.AssetLiquidityData memory assetDataCUsdc = lens.getUserLiquidityDataForAsset( address(borrower1), cUsdc, oracle ); - Types.AssetLiquidityData memory assetDatacDai = lens.getUserLiquidityDataForAsset( + Types.AssetLiquidityData memory assetDataCDai = lens.getUserLiquidityDataForAsset( address(borrower1), cDai, oracle ); - uint256 expectedBorrowableUsdc = assetDatacUsdc.maxDebtValue.div( - assetDatacUsdc.underlyingPrice + uint256 expectedBorrowableUsdc = assetDataCUsdc.maxDebtValue.div( + assetDataCUsdc.underlyingPrice ); - uint256 expectedBorrowableDai = assetDatacUsdc.maxDebtValue.div( - assetDatacDai.underlyingPrice + uint256 expectedBorrowableDai = assetDataCUsdc.maxDebtValue.div( + assetDataCDai.underlyingPrice ); (uint256 withdrawable, uint256 borrowable) = lens.getUserMaxCapacitiesForAsset( @@ -390,19 +390,19 @@ contract TestLens is TestSetup { borrower1.approve(dai, amount); borrower1.supply(cDai, amount); - Types.AssetLiquidityData memory assetDatacUsdc = lens.getUserLiquidityDataForAsset( + Types.AssetLiquidityData memory assetDataCUsdc = lens.getUserLiquidityDataForAsset( address(borrower1), cUsdc, oracle ); - Types.AssetLiquidityData memory assetDatacDai = lens.getUserLiquidityDataForAsset( + Types.AssetLiquidityData memory assetDataCDai = lens.getUserLiquidityDataForAsset( address(borrower1), cDai, oracle ); - Types.AssetLiquidityData memory assetDatacUsdt = lens.getUserLiquidityDataForAsset( + Types.AssetLiquidityData memory assetDataCUsdt = lens.getUserLiquidityDataForAsset( address(borrower1), cUsdt, oracle @@ -412,8 +412,8 @@ contract TestLens is TestSetup { (uint256 withdrawableUsdc, ) = lens.getUserMaxCapacitiesForAsset(address(borrower1), cUsdc); (, uint256 borrowableUsdt) = lens.getUserMaxCapacitiesForAsset(address(borrower1), cUsdt); - uint256 expectedBorrowableUsdt = (assetDatacDai.maxDebtValue + assetDatacUsdc.maxDebtValue) - .div(assetDatacUsdt.underlyingPrice); + uint256 expectedBorrowableUsdt = (assetDataCDai.maxDebtValue + assetDataCUsdc.maxDebtValue) + .div(assetDataCUsdt.underlyingPrice); assertEq( withdrawableUsdc, @@ -728,7 +728,7 @@ contract TestLens is TestSetup { } } - function testGetEnteretMarkets() public { + function testGetEnteredMarkets() public { uint256 amount = 1e12; supplier1.approve(dai, amount); supplier1.approve(usdc, amount); @@ -754,12 +754,12 @@ contract TestLens is TestSetup { uint256 poolBorrowRate ) = lens.getRates(cDai); - (uint256 expectedP2PSupplyRate, uint256 excpectedP2PBorrowRate) = getApproxP2PRates(cDai); + (uint256 expectedP2PSupplyRate, uint256 expectedP2PBorrowRate) = getApproxP2PRates(cDai); uint256 expectedPoolSupplyRate = ICToken(cDai).supplyRatePerBlock(); uint256 expectedPoolBorrowRate = ICToken(cDai).borrowRatePerBlock(); assertEq(p2pSupplyRate, expectedP2PSupplyRate); - assertEq(p2pBorrowRate, excpectedP2PBorrowRate); + assertEq(p2pBorrowRate, expectedP2PBorrowRate); assertEq(poolSupplyRate, expectedPoolSupplyRate); assertEq(poolBorrowRate, expectedPoolBorrowRate); } diff --git a/test-foundry/compound/setup/Utils.sol b/test-foundry/compound/setup/Utils.sol index b7b6670f6..dc974584d 100644 --- a/test-foundry/compound/setup/Utils.sol +++ b/test-foundry/compound/setup/Utils.sol @@ -39,10 +39,10 @@ contract Utils is DSTest { assertApproxEq(_firstValue, _secondValue, 20, err); } - /// @dev compounds track balances deposited by divising the amount by a rate to obtain cToken Units. + /// @dev compounds track balances deposited by dividing the amount by a rate to obtain cToken Units. /// When needed, it goes back to underlying by multiplying by the said rate. - /// However, for the same rate, the following computation will slighty under estimate the amount - /// deposited. This function is usefull to determine compound's users balances. + /// However, for the same rate, the following computation will slightly under estimate the amount + /// deposited. This function is useful to determine compound's users balances. function getBalanceOnCompound(uint256 _amountInUnderlying, uint256 _rate) internal pure diff --git a/test/test-rewards-distributor.ts b/test/test-rewards-distributor.ts index e09100864..cb75de826 100644 --- a/test/test-rewards-distributor.ts +++ b/test/test-rewards-distributor.ts @@ -22,7 +22,7 @@ describe('RewardsDistributor Contract', () => { let proofs: any[]; let leaves: any[]; let root: string; - let merkletree: MerkleTree; + let merkleTree: MerkleTree; const amount0 = ethers.utils.parseUnits('1'); const amount1 = ethers.utils.parseUnits('1'); const amount2 = ethers.utils.parseUnits('2'); @@ -52,14 +52,14 @@ describe('RewardsDistributor Contract', () => { leaves = distribution.map((receiver) => ethers.utils.solidityKeccak256(['address', 'address', 'uint256'], [receiver.account, receiver.token, receiver.claimable]) ); - merkletree = new MerkleTree(leaves, ethers.utils.keccak256, { sortPairs: true }); + merkleTree = new MerkleTree(leaves, ethers.utils.keccak256, { sortPairs: true }); proofs = distribution.map((receiver) => ({ address: receiver.account, - proof: merkletree.getHexProof( + proof: merkleTree.getHexProof( ethers.utils.solidityKeccak256(['address', 'address', 'uint256'], [receiver.account, receiver.token, receiver.claimable]) ), })); - root = merkletree.getHexRoot(); + root = merkleTree.getHexRoot(); }; before(initialize); @@ -154,16 +154,16 @@ describe('RewardsDistributor Contract', () => { const newLeaves = newDistribution.map((receiver) => ethers.utils.solidityKeccak256(['address', 'address', 'uint256'], [receiver.account, receiver.token, receiver.claimable]) ); - const newMerkletree = new MerkleTree(newLeaves, ethers.utils.keccak256, { sortPairs: true }); + const newMerkleTree = new MerkleTree(newLeaves, ethers.utils.keccak256, { sortPairs: true }); const newProofs = newDistribution.map((receiver) => { return { address: receiver.account, - proof: newMerkletree.getHexProof( + proof: newMerkleTree.getHexProof( ethers.utils.solidityKeccak256(['address', 'address', 'uint256'], [receiver.account, receiver.token, receiver.claimable]) ), }; }); - const newRoot = newMerkletree.getHexRoot(); + const newRoot = newMerkleTree.getHexRoot(); await rewardsDistributor.connect(governance).updateRoot(newRoot);