Skip to content

Commit

Permalink
chore: remove override modifier when not required
Browse files Browse the repository at this point in the history
  • Loading branch information
livingrockrises committed Oct 7, 2024
1 parent 336a1ac commit 0dbdea3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions contracts/sponsorship/BiconomySponsorshipPaymaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ contract BiconomySponsorshipPaymaster is
* @notice If _newVerifyingSigner is set to zero address, it will revert with an error.
* After setting the new signer address, it will emit an event VerifyingSignerChanged.
*/
function setSigner(address _newVerifyingSigner) external payable override onlyOwner {
function setSigner(address _newVerifyingSigner) external payable onlyOwner {
if (_isContract(_newVerifyingSigner)) revert VerifyingSignerCanNotBeContract();
if (_newVerifyingSigner == address(0)) {
revert VerifyingSignerCanNotBeZero();
Expand Down Expand Up @@ -124,7 +124,7 @@ contract BiconomySponsorshipPaymaster is
* @param value The new value to be set as the unaccountedEPGasOverhead.
* @notice only to be called by the owner of the contract.
*/
function setUnaccountedGas(uint256 value) external payable override onlyOwner {
function setUnaccountedGas(uint256 value) external payable onlyOwner {
if (value > UNACCOUNTED_GAS_LIMIT) {
revert UnaccountedGasTooHigh();
}
Expand Down
13 changes: 5 additions & 8 deletions contracts/token/BiconomyTokenPaymaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ import "./swaps/Uniswapper.sol";
* applied, and how
* to manage the assets received by the paymaster.
*/

// TODO: Review unnecessary overrides

contract BiconomyTokenPaymaster is
IBiconomyTokenPaymaster,
BasePaymaster,
Expand Down Expand Up @@ -224,7 +221,7 @@ contract BiconomyTokenPaymaster is
* @notice If _newVerifyingSigner is set to zero address, it will revert with an error.
* After setting the new signer address, it will emit an event VerifyingSignerChanged.
*/
function setSigner(address _newVerifyingSigner) external payable override onlyOwner {
function setSigner(address _newVerifyingSigner) external payable onlyOwner {
if (_isContract(_newVerifyingSigner)) revert VerifyingSignerCanNotBeContract();
if (_newVerifyingSigner == address(0)) {
revert VerifyingSignerCanNotBeZero();
Expand All @@ -241,7 +238,7 @@ contract BiconomyTokenPaymaster is
* @param _newUnaccountedGas The new value to be set as the unaccounted gas value
* @notice only to be called by the owner of the contract.
*/
function setUnaccountedGas(uint256 _newUnaccountedGas) external payable override onlyOwner {
function setUnaccountedGas(uint256 _newUnaccountedGas) external payable onlyOwner {
if (_newUnaccountedGas > UNACCOUNTED_GAS_LIMIT) {
revert UnaccountedGasTooHigh();
}
Expand All @@ -257,7 +254,7 @@ contract BiconomyTokenPaymaster is
* @param _newIndependentPriceMarkup The new value to be set as the price markup
* @notice only to be called by the owner of the contract.
*/
function setPriceMarkup(uint256 _newIndependentPriceMarkup) external payable override onlyOwner {
function setPriceMarkup(uint256 _newIndependentPriceMarkup) external payable onlyOwner {
if (_newIndependentPriceMarkup > MAX_PRICE_MARKUP || _newIndependentPriceMarkup < PRICE_DENOMINATOR) {
// Not between 0% and 100% markup
revert InvalidPriceMarkup();
Expand All @@ -274,7 +271,7 @@ contract BiconomyTokenPaymaster is
* @param _newPriceExpiryDuration The new value to be set as the unaccounted gas value
* @notice only to be called by the owner of the contract.
*/
function setPriceExpiryDuration(uint256 _newPriceExpiryDuration) external payable override onlyOwner {
function setPriceExpiryDuration(uint256 _newPriceExpiryDuration) external payable onlyOwner {
uint256 oldPriceExpiryDuration = priceExpiryDuration;
assembly ("memory-safe") {
sstore(priceExpiryDuration.slot, _newPriceExpiryDuration)
Expand Down Expand Up @@ -307,7 +304,7 @@ contract BiconomyTokenPaymaster is
* @param _oracle The oracle to use for the specified token
* @notice only to be called by the owner of the contract.
*/
function updateTokenDirectory(address _tokenAddress, IOracle _oracle) external payable override onlyOwner {
function updateTokenDirectory(address _tokenAddress, IOracle _oracle) external payable onlyOwner {
if (_oracle.decimals() != 8) {
// Token -> USD will always have 8 decimals
revert InvalidOracleDecimals();
Expand Down
1 change: 0 additions & 1 deletion test/unit/concrete/TestTokenPaymaster.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pragma solidity ^0.8.27;

import "../../base/TestBase.sol";
import { console2 } from "forge-std/src/console2.sol";
import {
BiconomyTokenPaymaster,
IBiconomyTokenPaymaster,
Expand Down

0 comments on commit 0dbdea3

Please sign in to comment.