Skip to content

Commit

Permalink
set tx gas price
Browse files Browse the repository at this point in the history
  • Loading branch information
zkbenny committed Feb 2, 2024
1 parent df4f0be commit 2066768
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions contracts/ZkLink.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ contract ZkLink is IZkLink, IMailbox, IAdmin, OwnableUpgradeable, UUPSUpgradeabl
event InitGateway(IL2Gateway gateway);
/// @notice Contract's permit status changed
event ContractAllowStatusUpdate(address contractAddress, bool isPermit);
/// @notice Tx gas price changed
event TxGasPriceUpdate(uint256 oldTxGasPrice, uint256 newTxGasPrice);
/// @notice Validator's status changed
event ValidatorStatusUpdate(address validatorAddress, bool isActive);
/// @notice Fee params for L1->L2 transactions changed
Expand Down Expand Up @@ -107,6 +109,13 @@ contract ZkLink is IZkLink, IMailbox, IAdmin, OwnableUpgradeable, UUPSUpgradeabl
emit ContractAllowStatusUpdate(_contractAddress, _permitted);
}

/// @dev Update the tx gas price
function setTxGasPrice(uint256 _newTxGasPrice) external onlyOwner {
uint256 oldTxGasPrice = txGasPrice;
txGasPrice = _newTxGasPrice;
emit TxGasPriceUpdate(oldTxGasPrice, _newTxGasPrice);
}

function setValidator(address _validator, bool _active) external onlyGateway {
validators[_validator] = _active;
emit ValidatorStatusUpdate(_validator, _active);
Expand Down

0 comments on commit 2066768

Please sign in to comment.