draft-IERC7802.sol 1.4 KB

123456789101112131415161718192021222324252627282930
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity >=0.6.2;
  3. import {IERC165} from "./IERC165.sol";
  4. /// @title IERC7802
  5. /// @notice Defines the interface for crosschain ERC20 transfers.
  6. interface IERC7802 is IERC165 {
  7. /// @notice Emitted when a crosschain transfer mints tokens.
  8. /// @param to Address of the account tokens are being minted for.
  9. /// @param amount Amount of tokens minted.
  10. /// @param sender Address of the caller (msg.sender) who invoked crosschainMint.
  11. event CrosschainMint(address indexed to, uint256 amount, address indexed sender);
  12. /// @notice Emitted when a crosschain transfer burns tokens.
  13. /// @param from Address of the account tokens are being burned from.
  14. /// @param amount Amount of tokens burned.
  15. /// @param sender Address of the caller (msg.sender) who invoked crosschainBurn.
  16. event CrosschainBurn(address indexed from, uint256 amount, address indexed sender);
  17. /// @notice Mint tokens through a crosschain transfer.
  18. /// @param _to Address to mint tokens to.
  19. /// @param _amount Amount of tokens to mint.
  20. function crosschainMint(address _to, uint256 _amount) external;
  21. /// @notice Burn tokens through a crosschain transfer.
  22. /// @param _from Address to burn tokens from.
  23. /// @param _amount Amount of tokens to burn.
  24. function crosschainBurn(address _from, uint256 _amount) external;
  25. }