Skip to content

Commit

Permalink
zk lint, fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kelemeno committed Feb 16, 2024
1 parent 468ea9c commit b05c529
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions l1-contracts/contracts/bridge/L1SharedBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ contract L1SharedBridge is IL1SharedBridge, ReentrancyGuard, Initializable, Owna
/// @notice Checks that the message sender is the bridgehub or Era
modifier onlyBridgehubOrEra(uint256 _chainId) {
require(
(msg.sender == address(bridgehub)) ||
(_chainId == ERA_CHAIN_ID && msg.sender == ERA_DIAMOND_PROXY),
(msg.sender == address(bridgehub)) || (_chainId == ERA_CHAIN_ID && msg.sender == ERA_DIAMOND_PROXY),
"L1SharedBridge: not bridgehub or era chain"
);
_;
Expand Down
5 changes: 4 additions & 1 deletion l1-contracts/contracts/bridgehub/Bridgehub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,10 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2Step {

address refundRecipient = _actualRefundRecipient(_request.refundRecipient);

require(_request.secondBridgeAddress > BRIDGEHUB_MIN_SECOND_BRIDGE_ADDRESS, "Bridgehub: second bridge address too low"); // to avoid calls to precompiles
require(
_request.secondBridgeAddress > BRIDGEHUB_MIN_SECOND_BRIDGE_ADDRESS,
"Bridgehub: second bridge address too low"
); // to avoid calls to precompiles
canonicalTxHash = IZkSyncStateTransition(stateTransition).bridgehubRequestL2Transaction(
BridgehubL2TransactionRequest({
sender: _request.secondBridgeAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ contract StateTransitionManager is IStateTransitionManager, ReentrancyGuard, Own
_;
}


function getChainAdmin(uint256 _chainId) external view override returns (address) {
return IZkSyncStateTransition(stateTransition[_chainId]).getAdmin();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ contract AdminFacet is ZkSyncStateTransitionBase, IAdmin {
}

/// @inheritdoc IAdmin
function setTokenMultiplier(
uint128 _nominator,
uint128 _denominator
) external onlyAdminOrStateTransitionManager {
function setTokenMultiplier(uint128 _nominator, uint128 _denominator) external onlyAdminOrStateTransitionManager {
uint128 oldNominator = s.baseTokenGasPriceMultiplierNominator;
uint128 oldDenominator = s.baseTokenGasPriceMultiplierDenominator;

Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/test/test_config/constant/hardhat.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@
"decimals": 18,
"address": "0xDbEBD56A3068c71f6F71973171c6880a238Ff742"
}
]
]

0 comments on commit b05c529

Please sign in to comment.