Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get owner address (#84) #106

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading