From 42ac1cb6832a63e4421cb58ef86ad8f4dd6c95ec Mon Sep 17 00:00:00 2001 From: syntrust Date: Tue, 20 Aug 2024 18:02:00 +0800 Subject: [PATCH] minor --- contracts/EthStorageContractL2.sol | 9 ++++++--- contracts/StorageContract.sol | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/contracts/EthStorageContractL2.sol b/contracts/EthStorageContractL2.sol index 4f9439a..a3017b8 100644 --- a/contracts/EthStorageContractL2.sol +++ b/contracts/EthStorageContractL2.sol @@ -28,9 +28,12 @@ contract EthStorageContractL2 is EthStorageContract2 { IL1Block internal constant L1_BLOCK = IL1Block(0x4200000000000000000000000000000000000015); /// @notice Constructs the EthStorageContractL2 contract. - constructor(Config memory _config, uint256 _startTime, uint256 _storageCost, uint256 _dcfFactor) - EthStorageContract2(_config, _startTime, _storageCost, _dcfFactor) - {} + constructor( + Config memory _config, + uint256 _startTime, + uint256 _storageCost, + uint256 _dcfFactor + ) EthStorageContract2(_config, _startTime, _storageCost, _dcfFactor) {} /// @notice Get the randao value from the L1 blockhash. function _getRandao(uint256 _l1BlockNumber, bytes calldata _headerRlpBytes) internal view returns (bytes32) { diff --git a/contracts/StorageContract.sol b/contracts/StorageContract.sol index 96af797..8ab0eef 100644 --- a/contracts/StorageContract.sol +++ b/contracts/StorageContract.sol @@ -276,7 +276,7 @@ abstract contract StorageContract is DecentralizedKV { // Additional prepaid for the last shard if (prepaidLastMineTime < _minedTs) { uint256 prepaidAmountCap = - STORAGE_COST * ((1 << SHARD_ENTRY_BITS) - (kvEntryCount % (1 << SHARD_ENTRY_BITS))); + STORAGE_COST * ((1 << SHARD_ENTRY_BITS) - kvEntryCount % (1 << SHARD_ENTRY_BITS)); if (prepaidAmountCap > prepaidAmount) { prepaidAmountCap = prepaidAmount; }