Skip to content

Commit

Permalink
Merge pull request #106 from nation3/84-get-owner-address
Browse files Browse the repository at this point in the history
Get owner address (#84)
  • Loading branch information
aahna-ashina authored Feb 12, 2024
2 parents ad3c843 + 440ba35 commit 1c5985d
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ https://github.com/nation3/foundations/blob/main/deployments/sepolia.json

- `utils/`

- `PassportUtils.sol`: [`0x4C72e8f37a2652BA6eEE956Ab30Ff21C3514cb5a`](https://sepolia.etherscan.io/address/0x4C72e8f37a2652BA6eEE956Ab30Ff21C3514cb5a)
- `PassportUtils.sol`: [`0x7Ef8C512D39547873A681242EA87881CD2b8B7B7`](https://sepolia.etherscan.io/address/0x7Ef8C512D39547873A681242EA87881CD2b8B7B7)

- `NationCred.sol`: [`0x0EF98EaE3021B91Cc84E0dd59BAA35cB59981E42`](https://sepolia.etherscan.io/address/0x0EF98EaE3021B91Cc84E0dd59BAA35cB59981E42)

Expand Down
28 changes: 27 additions & 1 deletion contracts/utils/IPassportUtils.sol
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
//SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.19;

/**
* ---------::::
* ---------:---::::::
* -----------::---:::::::
* ------------:.:--::::::::
* -------------: .:--::::::::
* -------------: .:::::::::
* -------------:.......::::::
* -----:.. .:-------::::::
* --------:.. .:-------::::::
* ----------:..:--------:::::
* -----------.:--------::::
* ----------::--------:::
* -------------------
* -------------
*
* Nation3 DAO
* https://nation3.org
*/
interface IPassportUtils {
/**
* Returns `true` if an account is the owner of a passport.
*/
function isOwner(address account) external view returns (bool);

/**
* Returns the owner of a passport.
*
* @param passportID The identifier of an NFT passport
*/
function getOwnerAddress(uint16 passportID) external view returns (address);

/**
* Returns `true` if a citizen's passport has become revocable.
*
Expand Down
28 changes: 27 additions & 1 deletion contracts/utils/PassportUtils.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
//SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.19;

import "./IPassportUtils.sol";
import "../passport/IPassportIssuer.sol";
import "../governance/IVotingEscrow.sol";

/**
* ---------::::
* ---------:---::::::
* -----------::---:::::::
* ------------:.:--::::::::
* -------------: .:--::::::::
* -------------: .:::::::::
* -------------:.......::::::
* -----:.. .:-------::::::
* --------:.. .:-------::::::
* ----------:..:--------:::::
* -----------.:--------::::
* ----------::--------:::
* -------------------
* -------------
*
* Nation3 DAO
* https://nation3.org
*/
contract PassportUtils is IPassportUtils {
string public constant VERSION = "0.6.7";
IPassportIssuer public passportIssuer;
Expand All @@ -23,6 +42,13 @@ contract PassportUtils is IPassportUtils {
return passportStatus == 1;
}

/**
* @inheritdoc IPassportUtils
*/
function getOwnerAddress(uint16 passportID) public view returns (address) {
// TO DO
}

/**
* @inheritdoc IPassportUtils
*/
Expand Down

0 comments on commit 1c5985d

Please sign in to comment.