From bbb77fffe0cf5d31d6e4f086b27be7e971aa649a Mon Sep 17 00:00:00 2001 From: ericlee Date: Tue, 5 Mar 2024 10:47:39 +0800 Subject: [PATCH] feat: add named parameters to public mappings --- contracts/SequencerInfo.sol | 2 +- contracts/SequencerSet.sol | 4 ++-- contracts/test/TestBridge.sol | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/SequencerInfo.sol b/contracts/SequencerInfo.sol index 0f30ee4..64dff6a 100644 --- a/contracts/SequencerInfo.sol +++ b/contracts/SequencerInfo.sol @@ -8,7 +8,7 @@ contract SequencerInfo is OwnableUpgradeable, ISequencerInfo { uint256 public totalSequencers; // whitelist - mapping(address => bool) public whitelist; + mapping(address owner => bool yes) public whitelist; // sequencerId => sequencer mapping(uint256 seqId => Sequencer _seq) public sequencers; diff --git a/contracts/SequencerSet.sol b/contracts/SequencerSet.sol index 043095a..362ca84 100644 --- a/contracts/SequencerSet.sol +++ b/contracts/SequencerSet.sol @@ -16,9 +16,9 @@ contract MetisSequencerSet is OwnableUpgradeable { uint256 endBlock; } - mapping(uint256 => Epoch) public epochs; // epoch number => epoch + mapping(uint256 number => Epoch epoch) public epochs; // epoch number => epoch - // current epoch id, starts from 0 + // current epoch number, starts from 0 uint256 internal currentEpochId; // event diff --git a/contracts/test/TestBridge.sol b/contracts/test/TestBridge.sol index dd82dc6..52fcee2 100644 --- a/contracts/test/TestBridge.sol +++ b/contracts/test/TestBridge.sol @@ -15,7 +15,7 @@ contract TestBridge is IL1ERC20Bridge { bytes _data ); - mapping(address => uint256) public l2Balances; + mapping(address addr => uint256 balance) public l2Balances; function depositERC20ToByChainId( uint256,