Skip to content

Commit 7a6fbcc

Browse files
Krishang NadgaudaKrishang Nadgauda
authored andcommitted
Add ERC165 and Multicall interfaces locally
1 parent 611cc4f commit 7a6fbcc

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

contracts/eip/interface/IERC165.sol

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// SPDX-License-Identifier: MIT
2+
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
3+
4+
pragma solidity ^0.8.0;
5+
6+
/**
7+
* @dev Interface of the ERC165 standard, as defined in the
8+
* https://eips.ethereum.org/EIPS/eip-165[EIP].
9+
*
10+
* Implementers can declare support of contract interfaces, which can then be
11+
* queried by others ({ERC165Checker}).
12+
*
13+
* For an implementation, see {ERC165}.
14+
*/
15+
interface IERC165 {
16+
/**
17+
* @dev Returns true if this contract implements the interface defined by
18+
* `interfaceId`. See the corresponding
19+
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
20+
* to learn more about how these ids are created.
21+
*
22+
* This function call must use less than 30 000 gas.
23+
*/
24+
function supportsInterface(bytes4 interfaceId) external view returns (bool);
25+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// SPDX-License-Identifier: MIT
2+
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Multicall.sol)
3+
4+
pragma solidity ^0.8.0;
5+
6+
/**
7+
* @dev Provides a function to batch together multiple calls in a single external call.
8+
*
9+
* _Available since v4.1._
10+
*/
11+
interface IMulticall {
12+
/**
13+
* @dev Receives and executes a batch of function calls on this contract.
14+
*/
15+
function multicall(bytes[] calldata data) external returns (bytes[] memory results);
16+
}

0 commit comments

Comments
 (0)