forked from hyperledger/firefly-tokens-erc20-erc721
-
Notifications
You must be signed in to change notification settings - Fork 3
/
IERC20WithData.sol
31 lines (25 loc) · 912 Bytes
/
IERC20WithData.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/utils/introspection/IERC165.sol';
/**
* ERC20 interface with mint, burn, and attached data support.
*
* The inclusion of a "data" argument on each external method allows FireFly to write
* extra data to the chain alongside each token transaction, in order to correlate it with
* other on- and off-chain events.
*/
interface IERC20WithData is IERC165 {
function mintWithData(address to, uint256 amount, bytes calldata data) external;
function transferWithData(
address from,
address to,
uint256 amount,
bytes calldata data
) external;
function burnWithData(address from, uint256 amount, bytes calldata data) external;
function approveWithData(
address spender,
uint256 amount,
bytes calldata data
) external returns (bool);
}