-
Notifications
You must be signed in to change notification settings - Fork 77
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
43 changed files
with
3,769 additions
and
2,253 deletions.
There are no files selected for viewing
File renamed without changes.
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
File renamed without changes
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
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,5 +1,6 @@ | ||
{ | ||
"version": "2.0.0", | ||
"version": "4.0.0", | ||
"license": "MIT", | ||
"private": true, | ||
"scripts": { | ||
"test": "jest" | ||
|
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 |
---|---|---|
|
@@ -289,3 +289,4 @@ EmailNullifier: Calculates the email nullifier using Poseidon hash. | |
</details> | ||
|
||
|
||
|
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
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
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
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
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,3 +1,4 @@ | ||
# @zk-email/contracts | ||
|
||
## DKIMRegistry.sol | ||
|
||
|
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
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,12 +1,21 @@ | ||
{ | ||
"name": "@zk-email/contracts", | ||
"version": "5.0.2", | ||
"version": "6.0.0", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "forge build", | ||
"publish": "yarn npm publish --access=public" | ||
}, | ||
"dependencies": { | ||
"@openzeppelin/contracts": "^4.9.3", | ||
"@openzeppelin/contracts": "^5.0.0", | ||
"dotenv": "^16.3.1" | ||
}, | ||
"files": [ | ||
"DKIMRegistry.sol", | ||
"/utils", | ||
"/interfaces" | ||
], | ||
"devDependencies": { | ||
"forge-std": "https://github.com/foundry-rs/forge-std" | ||
} | ||
} |
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,3 +1,4 @@ | ||
@openzeppelin=../../node_modules/@openzeppelin/contracts | ||
@openzeppelin/contracts=../../node_modules/@openzeppelin/contracts | ||
@openzeppelin/contracts-upgradeable=../../node_modules/@openzeppelin/contracts-upgradeable | ||
@openzeppelin=../../node_modules/@openzeppelin/contracts | ||
forge-std=../../node_modules/forge-std | ||
|
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.12; | ||
|
||
import "@openzeppelin/contracts/utils/Strings.sol"; | ||
import "forge-std/src/Test.sol"; | ||
import "forge-std/src/console.sol"; | ||
import "../interfaces/IDKIMRegistry.sol"; | ||
import "../DKIMRegistry.sol"; | ||
|
||
/// @title ECDSAOwnedDKIMRegistry | ||
/// @notice A DKIM Registry that could be updated by predefined ECDSA signer | ||
contract TestDKIMRegistry is Test { | ||
DKIMRegistry public dkimRegistry; | ||
address public signer; | ||
|
||
constructor() { | ||
dkimRegistry = new DKIMRegistry(msg.sender); | ||
signer = msg.sender; | ||
} | ||
|
||
function test_setDKIM() public { | ||
vm.prank(signer); | ||
dkimRegistry.setDKIMPublicKeyHash("test.com", "a81273981273bce922"); | ||
vm.stopPrank(); | ||
} | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"airbnb-base", | ||
"airbnb-typescript/base" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module", | ||
"project": "./tsconfig.json" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"max-len": ["error", { "code": 150 }], | ||
"import/prefer-default-export": "off", | ||
"no-await-in-loop": "off", | ||
"no-restricted-syntax": "off", | ||
"no-plusplus": "off", | ||
"no-bitwise": "off", | ||
"no-console": "off", | ||
"no-continue": "off", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"prefer-destructuring": "off" | ||
} | ||
} |
Oops, something went wrong.