Merge pull request #20 from vacp2p/redeploy-to-sepolia

feat: sepolia deployment
This commit is contained in:
Aaryamann Challani 2023-03-30 18:31:09 +05:30 committed by GitHub
commit 2c4ddb0312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 447 additions and 104 deletions

View File

@ -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
@ -20,29 +19,38 @@ 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

View File

@ -5,7 +5,7 @@
"chainId": "11155111",
"contracts": {
"PoseidonHasher": {
"address": "0xfa72Ce89D60d085B8FdB445fF6edC47475D58d1E",
"address": "0xa1554EAF0DF18C05956249aac375e212edeD2CcF",
"abi": [
{
"inputs": [
@ -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": [
@ -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": [
@ -244,19 +311,6 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "secret",
"type": "uint256"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long