-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add crosschain erc20 interface #80
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,26 @@ | ||||||
// SPDX-License-Identifier: MIT | ||||||
pragma solidity ^0.8.0; | ||||||
|
||||||
/// @title ICrosschainERC20 | ||||||
/// @notice This interface is a standard for crosschain ERC20 transfers. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
interface ICrosschainERC20 { | ||||||
/// @notice Emitted whenever tokens are minted by a crosschain transfer. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you prefer active voice:
Suggested change
same for the burn event |
||||||
/// @param account Address of the account tokens are being minted for. | ||||||
/// @param amount Amount of tokens minted. | ||||||
event CrosschainMinted(address indexed account, uint256 amount); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is account pattern matching a previous pattern from them? does it make sense to call it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. they have them like this in |
||||||
|
||||||
/// @notice Emitted whenever tokens are burned by a crosschain transfer. | ||||||
/// @param account Address of the account tokens are being burned from. | ||||||
/// @param amount Amount of tokens burned. | ||||||
event CrosschainBurnt(address indexed account, uint256 amount); | ||||||
|
||||||
/// @notice Allows to mint tokens through a crosschain transfer. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternatives:
|
||||||
/// @param _to Address to mint tokens to. | ||||||
/// @param _amount Amount of tokens to mint. | ||||||
function __crosschainMint(address _to, uint256 _amount) external; | ||||||
|
||||||
/// @notice Allows to burn tokens through a crosschain transfer. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternatives:
|
||||||
/// @param _from Address to burn tokens from. | ||||||
/// @param _amount Amount of tokens to burn. | ||||||
function __crosschainBurn(address _from, uint256 _amount) external; | ||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this the same as inheriting from
ISuperchainERC20Exension
directly?