Skip to content

Commit

Permalink
[R4R]-fix: N-04 public Functions Can Be Declared as external (#130)
Browse files Browse the repository at this point in the history
Co-authored-by: Ivan Wang <ivan.wang@mantle.xyz>
  • Loading branch information
asdv23 and Ivan Wang committed Mar 6, 2024
1 parent 8fa40a6 commit c923b01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/contracts-bedrock/contracts/L2/GasPriceOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ contract GasPriceOracle is Semver {
* @param _operator New operator
*/
// slither-disable-next-line external-function
function setOperator(address _operator) public onlyOwner {
function setOperator(address _operator) external onlyOwner {
address previousOperator = operator;
operator = _operator;
emit OperatorUpdated(previousOperator, operator);
Expand All @@ -69,7 +69,7 @@ contract GasPriceOracle is Semver {
* @dev Transfers ownership of the contract to a new account (`_owner`).
* Can only be called by the current owner.
*/
function transferOwnership(address _owner) public onlyOwner {
function transferOwnership(address _owner) external onlyOwner {
require(_owner != address(0), "new owner is the zero address");
address previousOwner = owner;
owner = _owner;
Expand All @@ -81,7 +81,7 @@ contract GasPriceOracle is Semver {
* @param _tokenRatio New tokenRatio
*/
// slither-disable-next-line external-function
function setTokenRatio(uint256 _tokenRatio) public onlyOperator {
function setTokenRatio(uint256 _tokenRatio) external onlyOperator {
uint256 previousTokenRatio = _tokenRatio;
tokenRatio = _tokenRatio;
emit TokenRatioUpdated(previousTokenRatio, tokenRatio);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ contract PortalSender {
* @notice Sends balance of this contract to the OptimismPortal.
on the Mantle Mainnet, this function will donate ETH and MNT
*/
function donate() public {
function donate() external {
uint256 totalAmount = IERC20(PORTAL.L1_MNT_ADDRESS()).balanceOf(address(this));
bool succ = IERC20(PORTAL.L1_MNT_ADDRESS()).transfer(address(PORTAL),totalAmount);
require(succ,"donate mnt failed");
Expand Down

0 comments on commit c923b01

Please sign in to comment.