diff --git a/packages/protocol/contracts/L1/TaikoL1.sol b/packages/protocol/contracts/L1/TaikoL1.sol index ef7441bd6ab..2e199096adb 100644 --- a/packages/protocol/contracts/L1/TaikoL1.sol +++ b/packages/protocol/contracts/L1/TaikoL1.sol @@ -198,7 +198,7 @@ contract TaikoL1 is } function getBlockFee() public view returns (uint256) { - (, uint fee, uint deposit) = LibProposing.getBlockFee( + (, uint256 fee, uint256 deposit) = LibProposing.getBlockFee( state, getConfig() ); diff --git a/packages/protocol/contracts/L1/libs/LibProposing.sol b/packages/protocol/contracts/L1/libs/LibProposing.sol index 48d382c2495..eb4a475af32 100644 --- a/packages/protocol/contracts/L1/libs/LibProposing.sol +++ b/packages/protocol/contracts/L1/libs/LibProposing.sol @@ -222,7 +222,7 @@ library LibProposing { TaikoData.State storage state, uint256 commitConfirmations, TaikoData.BlockMetadata memory meta - ) private { + ) private view { if (commitConfirmations == 0) { return; } diff --git a/packages/protocol/contracts/L1/libs/LibVerifying.sol b/packages/protocol/contracts/L1/libs/LibVerifying.sol index 31b9be8f2b1..631278a6e0a 100644 --- a/packages/protocol/contracts/L1/libs/LibVerifying.sol +++ b/packages/protocol/contracts/L1/libs/LibVerifying.sol @@ -153,7 +153,7 @@ library LibVerifying { uint256 tRelBp, TkoToken tkoToken ) private { - uint refund = (target.deposit * (10000 - tRelBp)) / 10000; + uint256 refund = (target.deposit * (10000 - tRelBp)) / 10000; if (refund > 0 && tkoToken.balanceOf(target.proposer) > 0) { // Do not refund proposer with 0 TKO balance. tkoToken.mint(target.proposer, refund); @@ -166,18 +166,18 @@ library LibVerifying { uint256 reward, TkoToken tkoToken ) private { - uint start; - uint count = fc.provers.length; + uint256 start; + uint256 count = fc.provers.length; if (config.enableOracleProver) { start = 1; count -= 1; } - uint sum = (1 << count) - 1; - uint weight = 1 << (count - 1); + uint256 sum = (1 << count) - 1; + uint256 weight = 1 << (count - 1); for (uint i = 0; i < count; ++i) { - uint proverReward = (reward * weight) / sum; + uint256 proverReward = (reward * weight) / sum; if (proverReward == 0) { break; }