-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,38 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.24; | ||
|
||
contract Nebula {} | ||
import {WorldIDVerifier} from "./WorldIDVerifier.sol"; | ||
|
||
contract Nebula { | ||
/// @dev Universal Nebula world id verifier | ||
WorldIDVerifier verifier; | ||
|
||
struct WorldIDProof { | ||
address signal; | ||
uint256 root; | ||
uint256 nullifierHash; | ||
uint256[8] proof; | ||
} | ||
|
||
/// @param _verifier Universal verifier for worldid | ||
constructor(address _verifier) { | ||
verifier = WorldIDVerifier(_verifier); | ||
} | ||
|
||
/// @notice Verifies a given proof | ||
/// @param proof WorldID Proof | ||
/// @param identity WorldID Proof | ||
function verifyIdentity( | ||
WorldIDProof calldata proof, | ||
bytes8 identity | ||
) external { | ||
verifier.verifyAndExecute( | ||
proof.signal, | ||
proof.root, | ||
proof.nullifierHash, | ||
proof.proof | ||
); | ||
|
||
// Resolve Identity, Verify and Issue | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters