Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
leosayous21 committed Jul 17, 2023
0 parents commit ed6768a
Show file tree
Hide file tree
Showing 25 changed files with 3,296 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .gitignore
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
3 changes: 3 additions & 0 deletions .gitmodules
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
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib
14 changes: 14 additions & 0 deletions .prettierrc
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
}
}
]
}
77 changes: 77 additions & 0 deletions README.md
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%" >
17 changes: 17 additions & 0 deletions foundry.toml
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}"
1 change: 1 addition & 0 deletions lib/forge-std
Submodule forge-std added at 74cfb7
16 changes: 16 additions & 0 deletions package.json
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"
}
}
1 change: 1 addition & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
forge-std/=lib/forge-std/src/
Loading

0 comments on commit ed6768a

Please sign in to comment.