feat: deployed to sepolia

This commit is contained in:
rymnc 2023-03-29 12:43:14 +05:30
parent 469d298fb8
commit a14fce896d
No known key found for this signature in database
GPG Key ID: C740033EE3F41EBD
7 changed files with 736 additions and 3 deletions

View File

@ -0,0 +1,283 @@
{
"11155111": [
{
"name": "sepolia",
"chainId": "11155111",
"contracts": {
"PoseidonHasher": {
"address": "0xfa72Ce89D60d085B8FdB445fF6edC47475D58d1E",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "input",
"type": "uint256"
}
],
"name": "hash",
"outputs": [
{
"internalType": "uint256",
"name": "result",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "identity",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
}
]
},
"RLN": {
"address": "0x4B11778822690DefA80934B3203C170ed6B5d317",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "membershipDeposit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "depth",
"type": "uint256"
},
{
"internalType": "address",
"name": "_poseidonHasher",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "idCommitment",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "MemberRegistered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "idCommitment",
"type": "uint256"
}
],
"name": "MemberWithdrawn",
"type": "event"
},
{
"inputs": [],
"name": "DEPTH",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MEMBERSHIP_DEPOSIT",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "SET_SIZE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "idCommitmentIndex",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "members",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "poseidonHasher",
"outputs": [
{
"internalType": "contract IPoseidonHasher",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idCommitment",
"type": "uint256"
}
],
"name": "register",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256[]",
"name": "idCommitments",
"type": "uint256[]"
}
],
"name": "registerBatch",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "stakedAmounts",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "secret",
"type": "uint256"
},
{
"internalType": "address payable",
"name": "receiver",
"type": "address"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "secret",
"type": "uint256"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256[]",
"name": "secrets",
"type": "uint256[]"
},
{
"internalType": "address payable[]",
"name": "receivers",
"type": "address[]"
}
],
"name": "withdrawBatch",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
}
}
]
}

View File

@ -0,0 +1 @@
11155111

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

View File

@ -26,6 +26,7 @@ const getNetworkConfig = (): NetworksUserConfig | undefined => {
verify: { verify: {
etherscan: { etherscan: {
apiKey: ETHERSCAN_API_KEY, apiKey: ETHERSCAN_API_KEY,
apiUrl: "https://api-sepolia.etherscan.io",
}, },
}, },
}, },

View File

@ -2,14 +2,14 @@
"name": "rln-contract", "name": "rln-contract",
"license": "(MIT OR Apache-2.0)", "license": "(MIT OR Apache-2.0)",
"scripts": { "scripts": {
"start": "hardhat node --export-all=deployments/allDeployments.json", "start": "hardhat node --export-all deployments/allDeployments.json",
"compile": "hardhat compile", "compile": "hardhat compile",
"test": "yarn test:foundry && yarn test:hardhat", "test": "yarn test:foundry && yarn test:hardhat",
"test:hardhat": "hardhat test", "test:hardhat": "hardhat test",
"test:hardhat:localhost": "yarn test:hardhat --network localhost", "test:hardhat:localhost": "yarn test:hardhat --network localhost",
"test:hardhat:sepolia": "yarn test:hardhat --network sepolia", "test:hardhat:sepolia": "yarn test:hardhat --network sepolia",
"test:foundry": "forge test", "test:foundry": "forge test",
"deploy": "hardhat deploy --export-all=deployments/allDeployments.json --network", "deploy": "hardhat deploy --export-all deployments/allDeployments.json --network",
"deploy:sepolia": "yarn deploy sepolia", "deploy:sepolia": "yarn deploy sepolia",
"deploy:localhost": "yarn deploy localhost", "deploy:localhost": "yarn deploy localhost",
"verify:sepolia": "hardhat --network sepolia etherscan-verify", "verify:sepolia": "hardhat --network sepolia etherscan-verify",