Skip to content

Commit

Permalink
Merge pull request #12 from zkLinkProtocol/issue_8
Browse files Browse the repository at this point in the history
set tx gas price
  • Loading branch information
zkbenny authored Feb 2, 2024
2 parents 8b38c0e + 2066768 commit 6bbf6f1
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 6bbf6f1

Please sign in to comment.