Skip to content

Commit

Permalink
add IIdentifiable inteface (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-korotya authored Mar 11, 2024
1 parent 450a16f commit a59b9b5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
12 changes: 12 additions & 0 deletions contracts/interfaces/IIdentifiable.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.20;

/**
* @dev IIdentifiable. Interface for identifiable entities.
*/
interface IIdentifiable {
/**
* @dev getId. Get id of the identity
*/
function getId() external view returns (uint256);
}
3 changes: 2 additions & 1 deletion contracts/lib/IdentityBase.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.20;

import {IIdentifiable} from "../interfaces/IIdentifiable.sol";
import {IOnchainCredentialStatusResolver} from "../interfaces/IOnchainCredentialStatusResolver.sol";
import {IState} from "../interfaces/IState.sol";
import {IdentityLib} from "../lib/IdentityLib.sol";
Expand All @@ -9,7 +10,7 @@ import {SmtLib} from "../lib/SmtLib.sol";
// /**
// * @dev Contract managing onchain identity
// */
abstract contract IdentityBase is IOnchainCredentialStatusResolver {
abstract contract IdentityBase is IIdentifiable, IOnchainCredentialStatusResolver {
using IdentityLib for IdentityLib.Data;

/// @dev Main storage structure for the contract
Expand Down
4 changes: 2 additions & 2 deletions contracts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@iden3/contracts",
"description": "Smart Contract library for Solidity",
"version": "2.0.0",
"version": "2.0.1",
"files": [
"**/*.sol",
"/build/contracts/*.json",
Expand Down

0 comments on commit a59b9b5

Please sign in to comment.