From f3a44550c6c353b3840abcb6cc65eb2bf688cd21 Mon Sep 17 00:00:00 2001 From: bigq Date: Thu, 27 Jul 2023 11:28:21 +0200 Subject: [PATCH] feat: hardhat configuration --- .hardhat/README.md | 69 ++++++++++++++++++++++++++++++++ .hardhat/package.json | 25 ++++++++++++ package.json | 3 +- src/interfaces/IBaseVerifier.sol | 15 ------- 4 files changed, 95 insertions(+), 17 deletions(-) create mode 100644 .hardhat/README.md create mode 100644 .hardhat/package.json delete mode 100644 src/interfaces/IBaseVerifier.sol diff --git a/.hardhat/README.md b/.hardhat/README.md new file mode 100644 index 0000000..5dc71c3 --- /dev/null +++ b/.hardhat/README.md @@ -0,0 +1,69 @@ +
+
+ Logo + +

+ Sismo Connect Solidity +

+ +

+ Made by Sismo +

+ +

+ + + + + + + + + +

+
+ + +Sismo Connect Solidity is a Solidity library that allows you to verify the zk-proofs of your Sismo Connect Application onchain and simplify the use of the [sismo-connect-onchain-verifier](https://github.com/sismo-core/sismo-connect-onchain-verifier). + +Here is the link to the full documentation of the library: [Sismo Connect Solidity Library](https://docs.sismo.io/build-with-sismo-connect/technical-documentation/solidity) + +You can learn more on Sismo Connect [here](hhttps://docs.sismo.io/sismo-docs/build-with-sismo-connect/getting-started). + +### Prerequisites + +- [Node.js](https://nodejs.org/en/download/) >= 18.15.0 (Latest LTS version) +- [Yarn](https://classic.yarnpkg.com/en/docs/install) + +## Usage + +### Installation + +```bash +# install the package +yarn add @sismo-core/sismo-connect-solidity +``` + +### Import the library +In your solidity file: + +```solidity +import {SismoConnect} from "@sismo-core/sismo-connect-solidity/contracts/SismoConnectLib.sol"; +``` + +You will find here how to use the library: [Sismo Connect Solidity Library](https://docs.sismo.io/build-with-sismo-connect/technical-documentation/solidity) + +## License + +Distributed under the MIT License. + +## Contribute + +Please, feel free to open issues, PRs or simply provide feedback! + +## Contact + +Send us a message in [Telegram](https://builders.sismo.io/) or [Discord](https://discord.gg/sismo) + +
+bottom diff --git a/.hardhat/package.json b/.hardhat/package.json new file mode 100644 index 0000000..e780729 --- /dev/null +++ b/.hardhat/package.json @@ -0,0 +1,25 @@ +{ + "name": "@sismo-core/sismo-connect-solidity", + "description": "Sismo Connect Library", + "version": "0.0.20", + "scripts": { + "prepare": "mkdir -p contracts; cp -r ../src/* contracts" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sismo-core/sismo-connect-onchain-verifier.git" + }, + "keywords": [ + "solidity", + "ethereum", + "smart", + "contracts" + ], + "author": "Sismo ", + "license": "MIT", + "bugs": { + "url": "https://github.com/sismo-core/sismo-connect-onchain-verifier/issues" + }, + "homepage": "https://github.com/sismo-core/sismo-connect-onchain-verifier#readme", + "main": "index.js" +} diff --git a/package.json b/package.json index 44afc70..fe880b2 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "prettier-plugin-solidity": "^1.0.0-beta.13" }, "scripts": { - "lint": "prettier --write **.sol", - "setup-fork": "./script/bash/setup-fork.sh" + "lint": "prettier --write **.sol" } } diff --git a/src/interfaces/IBaseVerifier.sol b/src/interfaces/IBaseVerifier.sol deleted file mode 100644 index f74a064..0000000 --- a/src/interfaces/IBaseVerifier.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.17; - -import {SismoConnectProof, VerifiedAuth, VerifiedClaim} from "../utils/Structs.sol"; - -interface IBaseVerifier { - function verify( - bytes16 appId, - bytes16 namespace, - bool isImpersonationMode, - bytes memory signedMessage, - SismoConnectProof memory sismoConnectProof - ) external view returns (VerifiedAuth memory, VerifiedClaim memory); -}