411 lines
103 KiB
JSON
Raw Normal View History

{
"address": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "membershipDeposit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "depth",
"type": "uint256"
},
{
"internalType": "address",
"name": "_poseidonHasher",
"type": "address"
},
{
"internalType": "address",
"name": "_validGroupStorage",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "pubkey",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "MemberRegistered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "pubkey",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "index",
"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": "interep",
"outputs": [
{
"internalType": "contract IInterep",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "members",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "poseidonHasher",
"outputs": [
{
"internalType": "contract IPoseidonHasher",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "pubkeyIndex",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "groupId",
"type": "uint256"
},
{
2022-11-25 12:07:06 +05:30
"internalType": "bytes32",
"name": "signal",
2022-11-25 12:07:06 +05:30
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "nullifierHash",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "externalNullifier",
"type": "uint256"
},
{
"internalType": "uint256[8]",
"name": "proof",
"type": "uint256[8]"
},
{
"internalType": "uint256",
"name": "pubkey",
"type": "uint256"
}
],
"name": "register",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "pubkey",
"type": "uint256"
}
],
"name": "register",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256[]",
"name": "pubkeys",
"type": "uint256[]"
}
],
"name": "registerBatch",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "validGroupStorage",
"outputs": [
{
"internalType": "contract IValidGroupStorage",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "secret",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_pubkeyIndex",
"type": "uint256"
},
{
"internalType": "address payable",
"name": "receiver",
"type": "address"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256[]",
"name": "secrets",
"type": "uint256[]"
},
{
"internalType": "uint256[]",
"name": "pubkeyIndexes",
"type": "uint256[]"
},
{
"internalType": "address payable[]",
"name": "receivers",
"type": "address[]"
}
],
"name": "withdrawBatch",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
2022-11-25 12:07:06 +05:30
"transactionHash": "0xe33c88ccdf92f52f876387a36331e7dba7d59a669bd7348a1078211292661883",
"receipt": {
"to": null,
"from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"contractAddress": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
"transactionIndex": 0,
2022-11-25 12:07:06 +05:30
"gasUsed": "1680598",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
2022-11-25 12:07:06 +05:30
"blockHash": "0x84ebfaeb7ba4166c293ffe42d9a77353d889b66e99076f8a3858f5be38ada6fc",
"transactionHash": "0xe33c88ccdf92f52f876387a36331e7dba7d59a669bd7348a1078211292661883",
"logs": [],
"blockNumber": 5,
2022-11-25 12:07:06 +05:30
"cumulativeGasUsed": "1680598",
"status": 1,
"byzantium": true
},
"args": [
1000000000000000,
20,
"0x5FbDB2315678afecb367f032d93F642f64180aa3",
"0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"
],
"numDeployments": 1,
2022-11-25 12:07:06 +05:30
"solcInputHash": "772faab6f90f985c3c5f77daa2db6940",
"metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"membershipDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depth\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_poseidonHasher\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_validGroupStorage\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pubkey\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"MemberRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pubkey\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"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\":\"interep\",\"outputs\":[{\"internalType\":\"contract IInterep\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"members\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poseidonHasher\",\"outputs\":[{\"internalType\":\"contract IPoseidonHasher\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pubkeyIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"signal\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"nullifierHash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"externalNullifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256[8]\",\"name\":\"proof\",\"type\":\"uint256[8]\"},{\"internalType\":\"uint256\",\"name\":\"pubkey\",\"type\":\"uint256\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pubkey\",\"type\":\"uint256\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"pubkeys\",\"type\":\"uint256[]\"}],\"name\":\"registerBatch\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"validGroupStorage\",\"outputs\":[{\"internalType\":\"contract IValidGroupStorage\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"secret\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_pubkeyIndex\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"secrets\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"pubkeyIndexes\",\"type\":\"uint256[]\"},{\"internalType\":\"address payable[]\",\"name\":\"receivers\",\"type\":\"address[]\"}],\"name\":\"withdrawBatch\",\"outputs\":
"bytecode": "0x60e0604052600080553480156200001557600080fd5b5060405162001f6c38038062001f6c83398181016040528101906200003b91906200025c565b83608081815250508260a08181525050826001901b60c0818152505081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d0a8dc26040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000147573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200016d9190620002ce565b600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000300565b600080fd5b6000819050919050565b620001d181620001bc565b8114620001dd57600080fd5b50565b600081519050620001f181620001c6565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200022482620001f7565b9050919050565b620002368162000217565b81146200024257600080fd5b50565b60008151905062000256816200022b565b92915050565b60008060008060808587031215620002795762000278620001b7565b5b60006200028987828801620001e0565b94505060206200029c87828801620001e0565b9350506040620002af8782880162000245565b9250506060620002c28782880162000245565b91505092959194509250565b600060208284031215620002e757620002e6620001b7565b5b6000620002f78482850162000245565b91505092915050565b60805160a05160c051611c0b6200036160003960008181610368015281816107110152818161081b0152818161083f01526109350152600061048b0152600081816103d9015281816108a3015281816109110152610af10152611c0b6000f3fe6080604052600436106100c25760003560e01c806398366e351161007f578063baa8d18911610059578063baa8d18914610249578063d0383d6814610272578063f207564e1461029d578063f220b9ec146102b9576100c2565b806398366e35146101ca578063a19aaee8146101f5578063a9d85eba14610220576100c2565b80630ad58d2f146100c7578063331b6ab3146100f05780635d0a8dc21461011b5780635daf08ca1461014657806361579a931461018357806369e4863f146101ae575b600080fd5b3480156100d357600080fd5b506100ee60048036038101906100e99190610d97565b6102e4565b005b3480156100fc57600080fd5b506101056102f4565b6040516101129190610e49565b60405180910390f35b34801561012757600080fd5b5061013061031a565b60405161013d9190610e85565b60405180910390f35b34801561015257600080fd5b5061016d60048036038101906101689190610ea0565b610340565b60405161017a9190610edc565b60405180910390f35b34801561018f57600080fd5b50610198610358565b6040516101a59190610edc565b60405180910390f35b6101c860048036038101906101c39190610f5c565b61035e565b005b3480156101d657600080fd5b506101df610489565b6040516101ec9190610edc565b60405180910390f35b34801561020157600080fd5b5061020a6104ad565b6040516102179190610fca565b60405180910390f35b34801561022c57600080fd5b506102476004803603810190610242919061103b565b6104d3565b005b34801561025557600080fd5b50610270600480360381019061026b9190611147565b610634565b005b34801561027e57600080fd5b50610287610819565b6040516102949190610edc565b60405180910390f35b6102b760048036038101906102b29190610ea0565b61083d565b005b3480156102c557600080fd5b506102ce61090f565b6040516102db9190610edc565b60405180910390f35b6102ef838383610933565b505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915090505481565b60005481565b60008282905090507f0000000000000000000000000000000000000000000000000000000000000000816000546103959190611205565b11156103d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103cd906112b8565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000061040291906112d8565b3414610443576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043a906113a4565b60405180910390fd5b60005b8181101561048357610470848483818110610464576104636113c4565b5b90506020020135610be4565b808061047b906113f3565b915050610446565b50505050565b7f0000000000000000000000
"deployedBytecode": "0x6080604052600436106100c25760003560e01c806398366e351161007f578063baa8d18911610059578063baa8d18914610249578063d0383d6814610272578063f207564e1461029d578063f220b9ec146102b9576100c2565b806398366e35146101ca578063a19aaee8146101f5578063a9d85eba14610220576100c2565b80630ad58d2f146100c7578063331b6ab3146100f05780635d0a8dc21461011b5780635daf08ca1461014657806361579a931461018357806369e4863f146101ae575b600080fd5b3480156100d357600080fd5b506100ee60048036038101906100e99190610d97565b6102e4565b005b3480156100fc57600080fd5b506101056102f4565b6040516101129190610e49565b60405180910390f35b34801561012757600080fd5b5061013061031a565b60405161013d9190610e85565b60405180910390f35b34801561015257600080fd5b5061016d60048036038101906101689190610ea0565b610340565b60405161017a9190610edc565b60405180910390f35b34801561018f57600080fd5b50610198610358565b6040516101a59190610edc565b60405180910390f35b6101c860048036038101906101c39190610f5c565b61035e565b005b3480156101d657600080fd5b506101df610489565b6040516101ec9190610edc565b60405180910390f35b34801561020157600080fd5b5061020a6104ad565b6040516102179190610fca565b60405180910390f35b34801561022c57600080fd5b506102476004803603810190610242919061103b565b6104d3565b005b34801561025557600080fd5b50610270600480360381019061026b9190611147565b610634565b005b34801561027e57600080fd5b50610287610819565b6040516102949190610edc565b60405180910390f35b6102b760048036038101906102b29190610ea0565b61083d565b005b3480156102c557600080fd5b506102ce61090f565b6040516102db9190610edc565b60405180910390f35b6102ef838383610933565b505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915090505481565b60005481565b60008282905090507f0000000000000000000000000000000000000000000000000000000000000000816000546103959190611205565b11156103d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103cd906112b8565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000061040291906112d8565b3414610443576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043a906113a4565b60405180910390fd5b60005b8181101561048357610470848483818110610464576104636113c4565b5b90506020020135610be4565b808061047b906113f3565b915050610446565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008686905090506000810361051e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610515906114ad565b60405180910390fd5b848490508114610563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055a9061153f565b60405180910390fd5b8282905081146105a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059f906115d1565b60405180910390fd5b60005b8181101561062a576106178888838181106105c9576105c86113c4565b5b905060200201358787848181106105e3576105e26113c4565b5b905060200201358686858181106105fd576105fc6113c4565b5b905060200201602081019061061291906115f1565b610933565b8080610622906113f3565b9150506105ab565b5050505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b655ee34876040518263ffffffff1660e01b815260040161068f9190610edc565b602060405180830381865afa1580156106ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d09190611656565b61070f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610706906116f5565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000060005410610773576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076a90611761565b60405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636673e84987878787876040518663ffffffff1660e01b81526004016107d69594939291906117b0565b600060405180830381600087803b1580156107f057600080fd5b505a
"devdoc": {
"kind": "dev",
2022-11-25 12:07:06 +05:30
"methods": {
"register(uint256,bytes32,uint256,uint256,uint256[8],uint256)": {
"details": "Registers a member via a valid Interep Semaphore group.",
"params": {
"externalNullifier": ": External nullifier.",
"groupId": ": Id of the group.",
"nullifierHash": ": Nullifier hash.",
"proof": ": Zero-knowledge proof.",
"pubkey": ": Public key of the member.",
"signal": ": Semaphore signal."
}
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 1107,
"contract": "contracts/Rln.sol:RLN",
"label": "pubkeyIndex",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 1111,
"contract": "contracts/Rln.sol:RLN",
"label": "members",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_uint256)"
},
{
"astId": 1114,
"contract": "contracts/Rln.sol:RLN",
"label": "poseidonHasher",
"offset": 0,
"slot": "2",
"type": "t_contract(IPoseidonHasher)648"
},
{
"astId": 1117,
"contract": "contracts/Rln.sol:RLN",
"label": "validGroupStorage",
"offset": 0,
"slot": "3",
2022-11-25 12:07:06 +05:30
"type": "t_contract(IValidGroupStorage)1510"
},
{
"astId": 1120,
"contract": "contracts/Rln.sol:RLN",
"label": "interep",
"offset": 0,
"slot": "4",
"type": "t_contract(IInterep)236"
}
],
"types": {
"t_contract(IInterep)236": {
"encoding": "inplace",
"label": "contract IInterep",
"numberOfBytes": "20"
},
"t_contract(IPoseidonHasher)648": {
"encoding": "inplace",
"label": "contract IPoseidonHasher",
"numberOfBytes": "20"
},
2022-11-25 12:07:06 +05:30
"t_contract(IValidGroupStorage)1510": {
"encoding": "inplace",
"label": "contract IValidGroupStorage",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_uint256)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => uint256)",
"numberOfBytes": "32",
"value": "t_uint256"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}