Skip to main content
Version: 2.1.x

Error codes

This section contains a list of all possible errors that might occur while using

import { Unirep } from '@unirep/contracts/Unirep.sol';
info

When developing with hardhat environment, these custom errors can be seen in the _selector:

Error: cannot estimate gas; transaction may fail or may require manual gas limit
...,
{"type":18,"address":{"type":"Buffer","data":[183,248,188,99,187,202,209,129,85,32,19,8,200,243,84,11,7,248,79,94]},"message":{"value":{"type":"Buffer","data":[103,103,221,161,0,0,0,0,0,0,0,0,0,0,0,0,165,28,31,194,240,209,161,184,73,78,209,254,49,45,124,58,120,237,145,192]},"_selector":"6767dda1"},"isInvalidOpcodeError":false}],"data":"0x6767dda1000000000000000000000000a51c1fc2f0d1a1b8494ed1fe312d7c3a78ed91c0"}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.7.2)

0x6767dda1

  • AttesterAlreadySignUp(uint160 attester)
    The attester has already signed up in the current Unirep contract.
    An attester cannot double sign-up in the Unirep protocol.

0xedc650d7

  • AttesterIdNotMatch(uint160 attesterId)
    The msg.sender does not match the claimed attester ID.
    Please send the transaction through the attester.

0xd7aa5847

  • AttesterInvalid()
    The given attester address is not a valid uint160 type data.
    Please check if the attester address is correctly assigned while generating proofs.

0xd724105a

  • AttesterNotSignUp(uint160 attester)
    The attester has not signed up in the current Unirep contract.
    Please call attesterSignUp()

0x4c4783a8

  • ChainIdNotMatch(uint48 chainId)
    The chain id in the proof does not match the current unirep contract.
    Check if chainid() matches your circuit inputs.

0xb4802d1d

  • EpochKeyNotProcessed()
    The user state transition proof is not valid since one of the epoch key is not included in the proof.
    Please check all epoch keys with attestation/data are included in the user state transition proof.

0x53d3ff53

  • EpochNotMatch()
    Current epoch does not match the epoch in the proof or the target epoch.
    Please check the current epoch and generate a corresponding proof.

0xa225656d

  • InvalidEpoch(uint256 epoch)
    The epoch in the proof is greater than the current epoch.
    Please check the current epoch and generate a corresponding proof.

0x2217bbbc

  • InvalidEpochKey()
    If The epoch key is greater than SNARK_SCALAR_FIELD is recognized invalid.

0x7fa0b337

  • InvalidField()
    An attestation was made to a field that was either out of range, or not capable of receiving attestations.
    Please check if the data of the attestation is within SNARK_SCALAR_FIELD and field index is within FIELD_COUNT.

0xd542f669

  • InvalidHistoryTreeRoot(uint256 historyTreeRoot)
    The epoch tree root of given epoch does not match the current Unirep contract.
    Please check if all attestations are processed correctly and successfully.

0x09bde339

  • InvalidProof()
    The proof is verified invalid through on-chain verifiers.
    Please verify it with the off-chain prover.
    If it is valid off-chain but invalid through on-chain verifiers, please check the if the proving keys match the ones on-chain.

0x8baa579f

  • InvalidSignature()
    The signature does not match the attester ID.
    Please make sure the signature is signed through the correct attester.
info

0xdc215c0a

  • NullifierAlreadyUsed(uint256 nullilier)
    The nullifier is already used in Unirep contract.
    A nullifier cannot be submitted twice in the Unirep protocol.

0x7db3aba7

  • OutOfRange()
    A replacement field data cannot be out of SNARK_SCALAR_FIELD.
    Please use a value which is less than SNARK_SCALAR_FIELD.

0x099cfcff

  • UserAlreadySignedUp(uint256 identityCommitment)
    The given identity commitment has already signed up in the current Unirep contract.
    A user cannot double sign-up in an application.

0xa78d09b9

  • CallerInvalid()
    The caller address is not the same as the attester address in a verifier helper contract.
    Please verify the caller address.

0xd5b25b63

  • InvalidEpoch()
    The epoch in the proof is not within valid epoch (should be less than current epoch).
    Please generate a proof with epoch less than current epoch.

0xf1b8a45e

  • InvalidStateTreeRoot(uint256 stateTreeRoot)
    The state tree root is not found in Unirep.sol.
    Please check if state merkle tree proof is correctly computed.