Skip to content

Commit

Permalink
feat: add ERC-1271 interface to the package
Browse files Browse the repository at this point in the history
  • Loading branch information
amarinkovic committed May 22, 2024
1 parent b6685e9 commit 05ce0c4
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 33 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"src/generated/abi.json",
"src/generated/naymsDiamond.json",
"forge-artifacts/LibConstants.sol/LibConstants.json",
"forge-artifacts/IERC20.sol/IERC20.json"
"forge-artifacts/IERC20.sol/IERC20.json",
"forge-artifacts/IERC1271.sol/IERC1271.json"
],
"scripts": {
"prettier": "yarn prettier:test && yarn prettier:src && yarn prettier:script",
Expand Down
4 changes: 2 additions & 2 deletions src/init/InitDiamond.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { LibAdmin } from "../libs/LibAdmin.sol";
import { LibACL } from "../libs/LibACL.sol";
import { LibInitDiamond } from "../libs/LibInitDiamond.sol";
import { LibEIP712 } from "../libs/LibEIP712.sol";
import { IERC165 } from "../interfaces/IERC165.sol";
import { IERC173 } from "../interfaces/IERC173.sol";
import { IERC165 } from "lib/diamond-2-hardhat/contracts/interfaces/IERC165.sol";
import { IERC173 } from "lib/diamond-2-hardhat/contracts/interfaces/IERC173.sol";
import { IERC20 } from "../interfaces/IERC20.sol";
import { FeeSchedule } from "../shared/FreeStructs.sol";

Expand Down
17 changes: 17 additions & 0 deletions src/interfaces/IERC1271.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1271.sol)

pragma solidity ^0.8.20;

/**
* @dev Interface of the ERC1271 standard signature validation method for
* contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].
*/
interface IERC1271 {
/**
* @dev Should return whether the signature provided is valid for the provided data
* @param hash Hash of the data to be signed
* @param signature Signature byte array associated with _data
*/
function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
}
12 changes: 0 additions & 12 deletions src/interfaces/IERC165.sol

This file was deleted.

18 changes: 0 additions & 18 deletions src/interfaces/IERC173.sol

This file was deleted.

0 comments on commit 05ce0c4

Please sign in to comment.