diff --git a/packages/contracts/abi/UnirepApp.json b/packages/contracts/abi/UnirepApp.json index 87f5ac1fd..7b9a47506 100644 --- a/packages/contracts/abi/UnirepApp.json +++ b/packages/contracts/abi/UnirepApp.json @@ -1 +1,317 @@ -[{"inputs":[{"internalType":"contract Unirep","name":"_unirep","type":"address"},{"internalType":"contract EpochKeyVerifierHelper","name":"_epkHelper","type":"address"},{"internalType":"contract IVerifier","name":"_dataVerifier","type":"address"},{"internalType":"uint48","name":"_epochLength","type":"uint48"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint160","name":"attesterId","type":"uint160"}],"name":"AttesterIdNotMatch","type":"error"},{"inputs":[{"internalType":"uint256","name":"hashUserId","type":"uint256"},{"internalType":"enum UnirepApp.RegisterStatus","name":"status","type":"uint8"}],"name":"UserAlreadySignedUp","type":"error"},{"inputs":[{"internalType":"uint256","name":"hashUserId","type":"uint256"}],"name":"UserInitExpiry","type":"error"},{"inputs":[{"internalType":"uint256","name":"hashUserId","type":"uint256"}],"name":"UserInitStatusInvalid","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epochKey","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"postId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"string","name":"content","type":"string"}],"name":"Post","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"hashUserId","type":"uint256"}],"name":"UserInitSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"hashUserId","type":"uint256"}],"name":"UserSignUpSuccess","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"epochKeyPostIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"epochKeyPostVoteMap","outputs":[{"internalType":"uint256","name":"upVote","type":"uint256"},{"internalType":"uint256","name":"downVote","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"hashUserId","type":"uint256"}],"name":"initUserStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"publicSignals","type":"uint256[]"},{"internalType":"uint256[8]","name":"proof","type":"uint256[8]"},{"internalType":"string","name":"content","type":"string"}],"name":"post","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"proofNullifier","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"hashUserId","type":"uint256"}],"name":"queryUserStatus","outputs":[{"internalType":"enum UnirepApp.RegisterStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"epochKey","type":"uint256"},{"internalType":"uint48","name":"targetEpoch","type":"uint48"},{"internalType":"uint256","name":"fieldIndex","type":"uint256"},{"internalType":"uint256","name":"val","type":"uint256"}],"name":"submitAttestation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epochKey","type":"uint256"},{"internalType":"uint48","name":"targetEpoch","type":"uint48"},{"internalType":"uint256[]","name":"fieldIndices","type":"uint256[]"},{"internalType":"uint256[]","name":"vals","type":"uint256[]"}],"name":"submitManyAttestations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unirep","outputs":[{"internalType":"contract Unirep","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"publicSignals","type":"uint256[]"},{"internalType":"uint256[8]","name":"proof","type":"uint256[8]"},{"internalType":"uint256","name":"hashUserId","type":"uint256"},{"internalType":"bool","name":"fromServer","type":"bool"}],"name":"userSignUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[5]","name":"publicSignals","type":"uint256[5]"},{"internalType":"uint256[8]","name":"proof","type":"uint256[8]"}],"name":"verifyDataProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}] \ No newline at end of file +[ + { + "inputs": [ + { + "internalType": "contract Unirep", + "name": "_unirep", + "type": "address" + }, + { + "internalType": "contract EpochKeyVerifierHelper", + "name": "_epkHelper", + "type": "address" + }, + { + "internalType": "contract IVerifier", + "name": "_dataVerifier", + "type": "address" + }, + { + "internalType": "uint48", + "name": "_epochLength", + "type": "uint48" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint160", + "name": "attesterId", + "type": "uint160" + } + ], + "name": "AttesterIdNotMatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "hashUserId", + "type": "uint256" + }, + { + "internalType": "enum UnirepApp.RegisterStatus", + "name": "status", + "type": "uint8" + } + ], + "name": "UserAlreadySignedUp", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "hashUserId", + "type": "uint256" + } + ], + "name": "UserInitExpiry", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "hashUserId", + "type": "uint256" + } + ], + "name": "UserInitStatusInvalid", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochKey", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "postId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "content", + "type": "string" + } + ], + "name": "Post", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hashUserId", + "type": "uint256" + } + ], + "name": "UserInitSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hashUserId", + "type": "uint256" + } + ], + "name": "UserSignUpSuccess", + "type": "event" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "name": "epochKeyPostIndex", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "name": "epochKeyPostVoteMap", + "outputs": [ + { "internalType": "uint256", "name": "upVote", "type": "uint256" }, + { "internalType": "uint256", "name": "downVote", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "hashUserId", + "type": "uint256" + } + ], + "name": "initUserStatus", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "publicSignals", + "type": "uint256[]" + }, + { + "internalType": "uint256[8]", + "name": "proof", + "type": "uint256[8]" + }, + { "internalType": "string", "name": "content", "type": "string" } + ], + "name": "post", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "", "type": "bytes32" } + ], + "name": "proofNullifier", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "hashUserId", + "type": "uint256" + } + ], + "name": "queryUserStatus", + "outputs": [ + { + "internalType": "enum UnirepApp.RegisterStatus", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochKey", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "targetEpoch", + "type": "uint48" + }, + { + "internalType": "uint256", + "name": "fieldIndex", + "type": "uint256" + }, + { "internalType": "uint256", "name": "val", "type": "uint256" } + ], + "name": "submitAttestation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochKey", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "targetEpoch", + "type": "uint48" + }, + { + "internalType": "uint256[]", + "name": "fieldIndices", + "type": "uint256[]" + }, + { "internalType": "uint256[]", "name": "vals", "type": "uint256[]" } + ], + "name": "submitManyAttestations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unirep", + "outputs": [ + { "internalType": "contract Unirep", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "publicSignals", + "type": "uint256[]" + }, + { + "internalType": "uint256[8]", + "name": "proof", + "type": "uint256[8]" + }, + { + "internalType": "uint256", + "name": "hashUserId", + "type": "uint256" + }, + { "internalType": "bool", "name": "fromServer", "type": "bool" } + ], + "name": "userSignUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[5]", + "name": "publicSignals", + "type": "uint256[5]" + }, + { + "internalType": "uint256[8]", + "name": "proof", + "type": "uint256[8]" + } + ], + "name": "verifyDataProof", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + } +]