ERC20Bridgable (ERC-7802) (#5735)
Co-authored-by: ernestognw <ernestognw@gmail.com> Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>
This commit is contained in:
@ -45,6 +45,7 @@ are useful to interact with third party contracts that implement them.
|
||||
- {IERC6909Metadata}
|
||||
- {IERC6909TokenSupply}
|
||||
- {IERC7674}
|
||||
- {IERC7802}
|
||||
|
||||
== Detailed ABI
|
||||
|
||||
@ -97,3 +98,5 @@ are useful to interact with third party contracts that implement them.
|
||||
{{IERC6909TokenSupply}}
|
||||
|
||||
{{IERC7674}}
|
||||
|
||||
{{IERC7802}}
|
||||
|
||||
30
contracts/interfaces/draft-IERC7802.sol
Normal file
30
contracts/interfaces/draft-IERC7802.sol
Normal file
@ -0,0 +1,30 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity >=0.6.2;
|
||||
|
||||
import {IERC165} from "./IERC165.sol";
|
||||
|
||||
/// @title IERC7802
|
||||
/// @notice Defines the interface for crosschain ERC20 transfers.
|
||||
interface IERC7802 is IERC165 {
|
||||
/// @notice Emitted when a crosschain transfer mints tokens.
|
||||
/// @param to Address of the account tokens are being minted for.
|
||||
/// @param amount Amount of tokens minted.
|
||||
/// @param sender Address of the caller (msg.sender) who invoked crosschainMint.
|
||||
event CrosschainMint(address indexed to, uint256 amount, address indexed sender);
|
||||
|
||||
/// @notice Emitted when a crosschain transfer burns tokens.
|
||||
/// @param from Address of the account tokens are being burned from.
|
||||
/// @param amount Amount of tokens burned.
|
||||
/// @param sender Address of the caller (msg.sender) who invoked crosschainBurn.
|
||||
event CrosschainBurn(address indexed from, uint256 amount, address indexed sender);
|
||||
|
||||
/// @notice Mint tokens through a crosschain transfer.
|
||||
/// @param _to Address to mint tokens to.
|
||||
/// @param _amount Amount of tokens to mint.
|
||||
function crosschainMint(address _to, uint256 _amount) external;
|
||||
|
||||
/// @notice Burn tokens through a crosschain transfer.
|
||||
/// @param _from Address to burn tokens from.
|
||||
/// @param _amount Amount of tokens to burn.
|
||||
function crosschainBurn(address _from, uint256 _amount) external;
|
||||
}
|
||||
Reference in New Issue
Block a user