Skip to content

Commit 8612257

Browse files
authored
Merge pull request #279 from solidstate-network/erc-5313
Add `ERC5313` interfaces
2 parents a24e6d8 + a82daae commit 8612257

File tree

5 files changed

+29
-9
lines changed

5 files changed

+29
-9
lines changed

contracts/access/ownable/Ownable.sol

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
pragma solidity ^0.8.20;
44

55
import { IERC173 } from '../../interfaces/IERC173.sol';
6+
import { IERC5313 } from '../../interfaces/IERC5313.sol';
67
import { IOwnable } from './IOwnable.sol';
78
import { _Ownable } from './_Ownable.sol';
89

@@ -11,7 +12,7 @@ import { _Ownable } from './_Ownable.sol';
1112
*/
1213
abstract contract Ownable is IOwnable, _Ownable {
1314
/**
14-
* @inheritdoc IERC173
15+
* @inheritdoc IERC5313
1516
*/
1617
function owner() external view returns (address) {
1718
return _owner();

contracts/interfaces/IERC173.sol

+2-7
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,13 @@
33
pragma solidity ^0.8.20;
44

55
import { _IERC173 } from './_IERC173.sol';
6+
import { IERC5313 } from './IERC5313.sol';
67

78
/**
89
* @title Contract ownership standard interface
910
* @dev see https://eips.ethereum.org/EIPS/eip-173
1011
*/
11-
interface IERC173 is _IERC173 {
12-
/**
13-
* @notice get the ERC173 contract owner
14-
* @return contract owner
15-
*/
16-
function owner() external view returns (address);
17-
12+
interface IERC173 is _IERC173, IERC5313 {
1813
/**
1914
* @notice transfer contract ownership to new account
2015
* @param account address of new owner

contracts/interfaces/IERC5313.sol

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// SPDX-License-Identifier: MIT
2+
3+
pragma solidity ^0.8.20;
4+
5+
import { _IERC5313 } from './_IERC5313.sol';
6+
7+
/**
8+
* @title Minimal contract ownership standard interface
9+
* @dev see https://eips.ethereum.org/EIPS/eip-5313
10+
*/
11+
interface IERC5313 is _IERC5313 {
12+
/**
13+
* @notice query the ERC173/ERC5313 contract owner
14+
* @return owner contract owner
15+
*/
16+
function owner() external view returns (address owner);
17+
}

contracts/interfaces/_IERC173.sol

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
pragma solidity ^0.8.20;
44

5+
import { _IERC5313 } from './_IERC5313.sol';
6+
57
/**
68
* @title Partial ERC173 interface needed by internal functions
79
*/
8-
interface _IERC173 {
10+
interface _IERC173 is _IERC5313 {
911
event OwnershipTransferred(
1012
address indexed previousOwner,
1113
address indexed newOwner

contracts/interfaces/_IERC5313.sol

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// SPDX-License-Identifier: MIT
2+
3+
pragma solidity ^0.8.20;
4+
5+
interface _IERC5313 {}

0 commit comments

Comments
 (0)