From 08038ec0be34f93a6097a8effaf2d93f04101c03 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 17 Dec 2024 19:21:49 +0800 Subject: [PATCH] Change all functions to external --- src/token/SonicBeetsMigrator.sol | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/token/SonicBeetsMigrator.sol b/src/token/SonicBeetsMigrator.sol index 5d99abc..6cff35f 100644 --- a/src/token/SonicBeetsMigrator.sol +++ b/src/token/SonicBeetsMigrator.sol @@ -26,7 +26,7 @@ contract SonicBeetsMigrator { admin = msg.sender; } - function exchangeOperaToSonic(uint256 amount) public { + function exchangeOperaToSonic(uint256 amount) external { require(operaToSonicEnabled, MigrationDisabled()); require(OPERABEETS.balanceOf(msg.sender) >= amount, UserBalanceInsufficient()); require(SONICBEETS.balanceOf(address(this)) >= amount, MigratorBalanceInsufficient()); @@ -34,7 +34,7 @@ contract SonicBeetsMigrator { SONICBEETS.transfer(msg.sender, amount); } - function exchangeSonicToOpera(uint256 amount) public { + function exchangeSonicToOpera(uint256 amount) external { require(sonicToOperaEnabled, MigrationDisabled()); require(SONICBEETS.balanceOf(msg.sender) >= amount, UserBalanceInsufficient()); require(OPERABEETS.balanceOf(address(this)) >= amount, MigratorBalanceInsufficient()); @@ -42,7 +42,7 @@ contract SonicBeetsMigrator { OPERABEETS.transfer(msg.sender, amount); } - function setAdmin(address _admin) public { + function setAdmin(address _admin) external { require(msg.sender == admin, NotAdmin()); admin = _admin; } @@ -57,12 +57,12 @@ contract SonicBeetsMigrator { sonicToOperaEnabled = _toggle; } - function withdrawOperaBeets() public { + function withdrawOperaBeets() external { require(msg.sender == admin, NotAdmin()); OPERABEETS.transfer(TREASURY, OPERABEETS.balanceOf(address(this))); } - function withdrawSonicBeets() public { + function withdrawSonicBeets() external { require(msg.sender == admin, NotAdmin()); SONICBEETS.transfer(TREASURY, SONICBEETS.balanceOf(address(this))); }