Skip to content

Commit

Permalink
pragma fix, formatting, and remove unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
jhweintraub committed Oct 15, 2024
1 parent 7ce7ea7 commit a8e6726
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 34 deletions.
5 changes: 3 additions & 2 deletions contracts/src/v0.8/ccip/FeeQuoter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,8 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver,
uint64 destChainSelector = destChainConfigArgs[i].destChainSelector;
DestChainConfig memory destChainConfig = destChainConfigArg.destChainConfig;

// NOTE: when supporting non-EVM chains, update chainFamilySelector validations
// Do not allow chain selector of zero or an invalid default gas limit.
// Note: Only EVM chains are supported at the moment, and more validation may be needed for other chain types.
if (
destChainSelector == 0 || destChainConfig.defaultTxGasLimit == 0
|| destChainConfig.chainFamilySelector != Internal.CHAIN_FAMILY_SELECTOR_EVM
Expand All @@ -993,7 +994,7 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver,
revert InvalidDestChainConfig(destChainSelector);
}

// The chain family selector cannot be zero - indicates that it is a new chain
// Chain family selector of zero indicates that the chain has not been added yet, so emit different event
if (s_destChainConfigs[destChainSelector].chainFamilySelector == 0) {
emit DestChainAdded(destChainSelector, destChainConfig);
} else {
Expand Down
14 changes: 0 additions & 14 deletions contracts/src/v0.8/ccip/interfaces/IRegistryModuleOwnerCustom.sol

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma solidity 0.8.24;

import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol";

Expand All @@ -10,11 +10,6 @@ import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/tok
import {IERC165} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol";

contract BurnMintERC20Setup is BaseTest {
event Transfer(address indexed from, address indexed to, uint256 value);
event MintAccessGranted(address indexed minter);
event BurnAccessGranted(address indexed burner);
event MintAccessRevoked(address indexed minter);
event BurnAccessRevoked(address indexed burner);

FactoryBurnMintERC20 internal s_burnMintERC20;

Expand Down Expand Up @@ -106,7 +101,7 @@ contract FactoryBurnMintERC20mint is BurnMintERC20Setup {
s_burnMintERC20.grantMintAndBurnRoles(OWNER);

vm.expectEmit();
emit Transfer(address(0), OWNER, s_amount);
emit IERC20.Transfer(address(0), OWNER, s_amount);

s_burnMintERC20.mint(OWNER, s_amount);

Expand Down Expand Up @@ -141,7 +136,7 @@ contract FactoryBurnMintERC20burn is BurnMintERC20Setup {
deal(address(s_burnMintERC20), OWNER, s_amount);

vm.expectEmit();
emit Transfer(OWNER, address(0), s_amount);
emit IERC20.Transfer(OWNER, address(0), s_amount);

s_burnMintERC20.burn(s_amount);

Expand Down Expand Up @@ -263,14 +258,14 @@ contract FactoryBurnMintERC20grantRole is BurnMintERC20Setup {
assertFalse(s_burnMintERC20.isMinter(STRANGER));

vm.expectEmit();
emit MintAccessGranted(STRANGER);
emit FactoryBurnMintERC20.MintAccessGranted(STRANGER);

s_burnMintERC20.grantMintAndBurnRoles(STRANGER);

assertTrue(s_burnMintERC20.isMinter(STRANGER));

vm.expectEmit();
emit MintAccessRevoked(STRANGER);
emit FactoryBurnMintERC20.MintAccessRevoked(STRANGER);

s_burnMintERC20.revokeMintRole(STRANGER);

Expand All @@ -281,14 +276,14 @@ contract FactoryBurnMintERC20grantRole is BurnMintERC20Setup {
assertFalse(s_burnMintERC20.isBurner(STRANGER));

vm.expectEmit();
emit BurnAccessGranted(STRANGER);
emit FactoryBurnMintERC20.BurnAccessGranted(STRANGER);

s_burnMintERC20.grantBurnRole(STRANGER);

assertTrue(s_burnMintERC20.isBurner(STRANGER));

vm.expectEmit();
emit BurnAccessRevoked(STRANGER);
emit FactoryBurnMintERC20.BurnAccessRevoked(STRANGER);

s_burnMintERC20.revokeBurnRole(STRANGER);

Expand Down Expand Up @@ -321,9 +316,9 @@ contract FactoryBurnMintERC20grantMintAndBurnRoles is BurnMintERC20Setup {
assertFalse(s_burnMintERC20.isBurner(STRANGER));

vm.expectEmit();
emit MintAccessGranted(STRANGER);
emit FactoryBurnMintERC20.MintAccessGranted(STRANGER);
vm.expectEmit();
emit BurnAccessGranted(STRANGER);
emit FactoryBurnMintERC20.BurnAccessGranted(STRANGER);

s_burnMintERC20.grantMintAndBurnRoles(STRANGER);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.24;
pragma solidity 0.8.24;

import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol";
import {IOwner} from "../../interfaces/IOwner.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IOptimismMintableERC20Minimal, IOptimismMintableERC20} from "../ERC20/IOptimismMintableERC20.sol";
import {IOptimismMintableERC20Minimal} from "../ERC20/IOptimismMintableERC20.sol";
import {IOptimismMintableERC20} from "../ERC20/IOptimismMintableERC20.sol";
import {IERC165} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol";

import {BurnMintERC677} from "./BurnMintERC677.sol";

import {IERC165} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol";

/// @notice A basic ERC677 compatible token contract with burn and minting roles that supports
/// the native L2 bridging requirements of the Optimism Stack.
/// @dev Note: the L2 bridge contract needs to be given burn and mint privileges manually,
Expand Down

0 comments on commit a8e6726

Please sign in to comment.