Skip to content

Commit

Permalink
fix: use onlyowner
Browse files Browse the repository at this point in the history
  • Loading branch information
web3rover committed Aug 25, 2023
1 parent 1992f80 commit 52f8efd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions contracts/Admin/VBNBAdmin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ contract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminS
/**
* @notice Accept admin for vBNB
*/
function acceptVBNBAdmin() external nonReentrant returns (uint) {
require(msg.sender == owner(), "only owner can accept admin");
function acceptVBNBAdmin() external onlyOwner nonReentrant returns (uint) {
return vBNB._acceptAdmin();
}

Expand All @@ -107,9 +106,7 @@ contract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminS
/**
* @notice Invoked when called function does not exist in the contract
*/
fallback(bytes calldata data) external payable returns (bytes memory) {
require(msg.sender == owner(), "only owner can call vBNB admin functions");

fallback(bytes calldata data) external payable onlyOwner returns (bytes memory) {
(bool ok, bytes memory res) = address(vBNB).call{ value: msg.value }(data);
require(ok, "call failed");
return res;
Expand Down

0 comments on commit 52f8efd

Please sign in to comment.