-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit ed6768a
Showing
25 changed files
with
3,296 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Compiler files | ||
cache/ | ||
out/ | ||
node_modules | ||
broadcast/ | ||
|
||
# Dotenv file | ||
.env | ||
.env.* | ||
|
||
.vscode | ||
lib | ||
|
||
.hardhat/contracts | ||
|
||
# Deployment files | ||
**deployments/test.json | ||
**/tmp/* | ||
!**/tmp/example.json |
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,3 @@ | ||
[submodule "lib/forge-std"] | ||
path = lib/forge-std | ||
url = 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
lib |
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,14 @@ | ||
{ | ||
"tabWidth": 2, | ||
"printWidth": 100, | ||
|
||
"overrides": [ | ||
{ | ||
"files": "*.sol", | ||
"options": { | ||
"tabWidth": 2, | ||
"printWidth": 100 | ||
} | ||
} | ||
] | ||
} |
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,77 @@ | ||
<br /> | ||
<div align="center"> | ||
<img src="https://static.sismo.io/readme/top-main.png" alt="Logo" width="150" height="150" style="borderRadius: 20px"> | ||
|
||
<h3 align="center"> | ||
Sismo Connect Solidity | ||
</h3> | ||
|
||
<p align="center"> | ||
Made by <a href="https://docs.sismo.io/" target="_blank">Sismo</a> | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://twitter.com/sismo_eth" target="_blank"> | ||
<img src="https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white"/> | ||
</a> | ||
<a href="https://discord.gg/sismo" target="_blank"> | ||
<img src="https://img.shields.io/badge/Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white"/> | ||
</a> | ||
<a href="https://builders.sismo.io" target="_blank"> | ||
<img src="https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white"/> | ||
</a> | ||
</p> | ||
</div> | ||
|
||
|
||
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](https://docs.sismo.io/discover-sismo-connect/empower-your-app). | ||
|
||
### Prerequisites | ||
|
||
- [Node.js](https://nodejs.org/en/download/) >= 18.15.0 (Latest LTS version) | ||
- [Yarn](https://classic.yarnpkg.com/en/docs/install) | ||
- [Foundry](https://book.getfoundry.sh/) | ||
|
||
## Usage | ||
|
||
### Installation | ||
|
||
```bash | ||
# update foundry | ||
foundryup | ||
|
||
# install the package | ||
forge install sismo-core/sismo-connect-solidity --no-commit | ||
|
||
# add the remapping in remappings.txt | ||
echo $'sismo-connect-solidity/=lib/sismo-connect-packages/src/' >> remappings.txt | ||
``` | ||
|
||
### Import the library | ||
In your solidity file: | ||
|
||
```solidity | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.17; | ||
import "sismo-connect-solidity/SismoLib.sol"; // import the library | ||
``` | ||
|
||
## 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) | ||
|
||
<br/> | ||
<img src="https://static.sismo.io/readme/bottom-main.png" alt="bottom" width="100%" > |
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,17 @@ | ||
[profile.default] | ||
optimizer_runs = 1000000 | ||
verbosity = 1 | ||
libs = ["lib"] | ||
fs_permissions = [{ access = "read-write", path = "./"}] | ||
|
||
bytecode_hash="none" | ||
|
||
[fmt] | ||
ignore = ["test/libs/SimoConnectLib.t.sol"] | ||
|
||
[rpc_endpoints] | ||
polygon = "${RPC_URL}" | ||
gnosis = "${RPC_URL}" | ||
goerli = "${RPC_URL}" | ||
mumbai = "${RPC_URL}" | ||
mainnet = "${RPC_URL}" |
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,16 @@ | ||
{ | ||
"name": "sismo-connect-onchain-verifier", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"repository": "[email protected]:sismo-core/sismo-connect-onchain-verifier.git", | ||
"author": "Hadrien Charlanes <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"prettier": "^2.3.1", | ||
"prettier-plugin-solidity": "^1.0.0-beta.13" | ||
}, | ||
"scripts": { | ||
"lint": "prettier --write **.sol", | ||
"setup-fork": "./script/bash/setup-fork.sh" | ||
} | ||
} |
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 @@ | ||
forge-std/=lib/forge-std/src/ |
Oops, something went wrong.