Skip to content

Commit

Permalink
change verifier contract inside SBT.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
motemotech committed Oct 7, 2024
1 parent 8c9b302 commit 5f5269a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions contracts/contracts/SBT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ pragma solidity ^0.8.18;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import {Verifier_disclose} from "./verifiers/disclose/Verifier_disclose.sol";
import {Verifier_vc_and_disclose} from "./verifiers/disclose/Verifier_vc_and_disclose.sol";
import {Base64} from "./libraries/Base64.sol";
import {Formatter} from "./Formatter.sol";
import {Registry} from "./Registry.sol";
import {IRegister} from "./interfaces/IRegister.sol";
import "hardhat/console.sol";

contract SBT is ERC721Enumerable, Ownable {
using Strings for uint256;
using Base64 for *;

Verifier_disclose public immutable verifier;
Verifier_vc_and_disclose public immutable verifier;
Formatter public formatter;
IRegister public register;

Expand All @@ -26,6 +25,7 @@ contract SBT is ERC721Enumerable, Ownable {
struct SBTProof {
uint nullifier;
uint[3] revealedData_packed;
uint[2] older_than;
uint attestation_id;
uint merkle_root;
uint scope;
Expand All @@ -52,7 +52,7 @@ contract SBT is ERC721Enumerable, Ownable {
mapping(uint256 => Attributes) private tokenAttributes;

constructor(
Verifier_disclose v,
Verifier_vc_and_disclose v,
Formatter f,
IRegister r
) ERC721("OpenPassport", "OpenPassport") {
Expand Down Expand Up @@ -108,6 +108,8 @@ contract SBT is ERC721Enumerable, Ownable {
uint(proof.revealedData_packed[0]),
uint(proof.revealedData_packed[1]),
uint(proof.revealedData_packed[2]),
uint(proof.older_than[0]),
uint(proof.older_than[1]),
uint(proof.attestation_id),
uint(proof.merkle_root),
uint(proof.scope),
Expand Down Expand Up @@ -394,4 +396,4 @@ contract SBT is ERC721Enumerable, Ownable {
)
);
}
}
}

0 comments on commit 5f5269a

Please sign in to comment.