From 4774b7e7aadae29994872c7a4a0445ed819bd570 Mon Sep 17 00:00:00 2001 From: Ryan Sauge Date: Wed, 10 Apr 2024 10:42:30 +0200 Subject: [PATCH] IERC1404 - add enumCode interface --- .../interfaces/draft-IERC1404/draft-IERC1404.sol | 2 +- .../draft-IERC1404/draft-IERC1404EnumCode.sol | 15 +++++++++++++++ .../draft-IERC1404/draft-IERC1404Wrapper.sol | 12 ++---------- 3 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol diff --git a/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol b/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol index 28313c82..4b3a2175 100644 --- a/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol +++ b/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol @@ -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 { /** diff --git a/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol b/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol new file mode 100644 index 00000000..3d4b4914 --- /dev/null +++ b/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol @@ -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 + } +} diff --git a/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol b/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol index 30ce9d78..b5b8af1e 100644 --- a/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol +++ b/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol @@ -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.