Skip to content

Commit

Permalink
IERC1404 - add enumCode interface
Browse files Browse the repository at this point in the history
  • Loading branch information
rya-sge committed Apr 10, 2024
1 parent 3944650 commit 4774b7e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion contracts/interfaces/draft-IERC1404/draft-IERC1404.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pragma solidity ^0.8.0;

/*
@dev Contrary to the ERC-1404, this interface does not inherit from the ERC20 interface
* @dev Contrary to the ERC-1404, this interface does not inherit from the ERC20 interface
*/
interface IERC1404 {
/**
Expand Down
15 changes: 15 additions & 0 deletions contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//SPDX-License-Identifier: MPL-2.0

pragma solidity ^0.8.0;

interface IERC1404EnumCode {
/*
* @dev leave the code 4-9 free/unused for further additions in your ruleEngine implementation
*/
enum REJECTED_CODE_BASE {
TRANSFER_OK,
TRANSFER_REJECTED_PAUSED,
TRANSFER_REJECTED_FROM_FROZEN,
TRANSFER_REJECTED_TO_FROZEN
}
}
12 changes: 2 additions & 10 deletions contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,9 @@
pragma solidity ^0.8.0;

import "./draft-IERC1404.sol";
import "./draft-IERC1404EnumCode.sol";

interface IERC1404Wrapper is IERC1404 {
/*
@dev leave the code 4-9 free/unused for further additions in your ruleEngine implementation
*/
enum REJECTED_CODE_BASE {
TRANSFER_OK,
TRANSFER_REJECTED_PAUSED,
TRANSFER_REJECTED_FROM_FROZEN,
TRANSFER_REJECTED_TO_FROZEN
}
interface IERC1404Wrapper is IERC1404, IERC1404EnumCode {

/**
* @dev Returns true if the transfer is valid, and false otherwise.
Expand Down

0 comments on commit 4774b7e

Please sign in to comment.