Skip to content

Commit

Permalink
feat: sepolia deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed Mar 30, 2023
1 parent 75ba356 commit f99eb2a
Show file tree
Hide file tree
Showing 6 changed files with 447 additions and 104 deletions.
30 changes: 19 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@

The following will need to be installed in order to use this repo. Please follow the links and instructions.

- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- You'll know you've done it right if you can run `git --version`
- [Foundry / Foundryup](https://github.com/gakonst/foundry)
- This will install `forge`, `cast`, and `anvil`
- You can test you've installed them right by running `forge --version` and get an output like: `forge 0.2.0 (92f8951 2022-08-06T00:09:32.96582Z)`
- To get the latest of each, just run `foundryup`
- [Yarn](https://classic.yarnpkg.com/lang/en/docs/install)

- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- You'll know you've done it right if you can run `git --version`
- [Foundry / Foundryup](https://github.com/gakonst/foundry)
- This will install `forge`, `cast`, and `anvil`
- You can test you've installed them right by running `forge --version` and get an output like: `forge 0.2.0 (92f8951 2022-08-06T00:09:32.96582Z)`
- To get the latest of each, just run `foundryup`
- [Yarn](https://classic.yarnpkg.com/lang/en/docs/install)

## Compilation

Expand All @@ -20,33 +19,42 @@ yarn compile
```

## Testing with Hardhat

```shell
yarn test:hardhat
```

## Testing with Foundry

```shell
yarn test:foundry
```

## Deploying

- To deploy on local node, first start the local node and then run the deploy script
### Locally

- To deploy on a local node, first start the local node and then run the deploy script

```shell
yarn node
npx deploy:localhost
yarn deploy:localhost
```

### Sepolia

- To deploy to an target network (like Sepolia), use the name as mentioned in the Hardhat config file.

```shell
yarn deploy:sepolia
# You may verify the contract using
yarn verify:sepolia # Ensure you have set ETHERSCAN_API_KEY in your env
```

## References

For more information, see https://hardhat.org/hardhat-runner/docs/guides/project-setup

## License

Dual-licensed under MIT or Apache 2.0, refer to [LICENSE-MIT](LICENSE-MIT) or [LICENSE-APACHE](LICENSE-APACHE) for more information.
Dual-licensed under MIT or Apache 2.0, refer to [LICENSE-MIT](LICENSE-MIT) or [LICENSE-APACHE](LICENSE-APACHE) for more information.
110 changes: 82 additions & 28 deletions deployments/allDeployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"chainId": "11155111",
"contracts": {
"PoseidonHasher": {
"address": "0xfa72Ce89D60d085B8FdB445fF6edC47475D58d1E",
"address": "0xa1554EAF0DF18C05956249aac375e212edeD2CcF",
"abi": [
{
"inputs": [
Expand All @@ -25,24 +25,11 @@
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "identity",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
}
]
},
"RLN": {
"address": "0x4B11778822690DefA80934B3203C170ed6B5d317",
"address": "0x9C09146844C1326c2dBC41c451766C7138F88155",
"abi": [
{
"inputs": [
Expand All @@ -65,6 +52,86 @@
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "DuplicateIdCommitment",
"type": "error"
},
{
"inputs": [],
"name": "EmptyBatch",
"type": "error"
},
{
"inputs": [],
"name": "FullBatch",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "required",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "provided",
"type": "uint256"
}
],
"name": "InsufficientDeposit",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
}
],
"name": "InvalidWithdrawalAddress",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idCommitment",
"type": "uint256"
}
],
"name": "MemberHasNoStake",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idCommitment",
"type": "uint256"
}
],
"name": "MemberNotRegistered",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "givenSecretsLen",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "givenReceiversLen",
"type": "uint256"
}
],
"name": "MismatchedBatchSize",
"type": "error"
},
{
"anonymous": false,
"inputs": [
Expand Down Expand Up @@ -244,19 +311,6 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "secret",
"type": "uint256"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
Expand Down
55 changes: 26 additions & 29 deletions deployments/sepolia/PoseidonHasher.json

Large diffs are not rendered by default.

276 changes: 240 additions & 36 deletions deployments/sepolia/RLN.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit f99eb2a

Please sign in to comment.