Skip to content

Commit

Permalink
chore: update superchain erc20 events
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDiscotech committed Oct 1, 2024
1 parent 841101d commit ba100f8
Show file tree
Hide file tree
Showing 5 changed files with 275 additions and 270 deletions.
4 changes: 2 additions & 2 deletions packages/contracts-bedrock/src/L2/SuperchainERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ abstract contract SuperchainERC20 is ERC20, ISuperchainERC20Extension, ISemver {

_mint(_to, _amount);

emit Mint(_to, _amount);
emit SuperchainMint(_to, _amount);
}

/// @notice Allows the SuperchainERC20Bridge to burn tokens.
Expand All @@ -45,6 +45,6 @@ abstract contract SuperchainERC20 is ERC20, ISuperchainERC20Extension, ISemver {

_burn(_from, _amount);

emit Burn(_from, _amount);
emit SuperchainBurn(_from, _amount);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ interface IOptimismSuperchainERC20Errors {
/// @title ISuperchainERC20Extension
/// @notice This interface is available on the SuperchainERC20 contract.
interface IOptimismSuperchainERC20Extension is ISuperchainERC20Extension, IOptimismSuperchainERC20Errors {
/// @notice Emitted whenever tokens are minted for an account.
/// @param account Address of the account tokens are being minted for.
/// @param amount Amount of tokens minted.
event Mint(address indexed account, uint256 amount);

/// @notice Emitted whenever tokens are burned from an account.
/// @param account Address of the account tokens are being burned from.
/// @param amount Amount of tokens burned.
event Burn(address indexed account, uint256 amount);

/// @notice Allows the L2StandardBridge and SuperchainERC20Bridge to mint tokens.
/// @param _to Address to mint tokens to.
/// @param _amount Amount of tokens to mint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ interface ISuperchainERC20Errors {
/// @title ISuperchainERC20Extension
/// @notice This interface is available on the SuperchainERC20 contract.
interface ISuperchainERC20Extension is ISuperchainERC20Errors {
/// @notice Emitted whenever tokens are minted for an account.
/// @notice Emitted whenever tokens are minted for by the SuperchainERC20Bridge.
/// @param account Address of the account tokens are being minted for.
/// @param amount Amount of tokens minted.
event Mint(address indexed account, uint256 amount);
event SuperchainMint(address indexed account, uint256 amount);

/// @notice Emitted whenever tokens are burned from an account.
/// @notice Emitted whenever tokens are burned by the SuperchainERC20Bridge.
/// @param account Address of the account tokens are being burned from.
/// @param amount Amount of tokens burned.
event Burn(address indexed account, uint256 amount);
event SuperchainBurn(address indexed account, uint256 amount);

/// @notice Allows the SuperchainERC20Bridge to mint tokens.
/// @param _to Address to mint tokens to.
Expand Down
Loading

0 comments on commit ba100f8

Please sign in to comment.