Contract 56a18edc93a66415762af20ae4553a480764f33ec0ae6a9dafabdd89d4799969

← Back to Index 📥 Download WASM

Meta

cliver 25.1.0#
rssdkver 25.1.0#86c50a1ea4f87b40add3064ff9df95c7553565c5
rsver 1.93.0

Instances

  • CCTU4U4CU3J36XAT43N36CEUSIKVAGER3BLCQ3DP3JKJCHEXXQ4H2TJA

Interface

Permanently pauses all verification through this wrapper.

Only the guardian (contract owner) can call this. Once activated, all subsequent verify() and verify_integrity() calls will revert.

Authorization

Requires owner.require_auth().

Panics

Panics if the caller is not the owner.

fn estop(env: soroban_sdk::Env)

Pauses verification. Only the owner (guardian) can call this.

Panics

Panics with [EmergencyStopError::Unauthorized] if caller is not the owner.

fn pause(env: soroban_sdk::Env, caller: soroban_sdk::Address)

Returns whether the emergency stop is currently activated.

fn paused(env: soroban_sdk::Env) -> bool

Forwards verification to the underlying verifier.

Reverts if the contract is paused (emergency stop activated).

fn verify(
    env: soroban_sdk::Env,
    seal: soroban_sdk::Bytes,
    image_id: soroban_sdk::BytesN<32>,
    journal: soroban_sdk::BytesN<32>,
) -> Result<(), VerifierError>

Always panics -- unpausing is permanently disallowed.

Panics

Always panics with [EmergencyStopError::UnpauseNotAllowed].

fn unpause(env: soroban_sdk::Env, caller: soroban_sdk::Address)

Returns Some(Address) if ownership is set, or None if ownership has been renounced.

Arguments

  • e - Access to the Soroban environment.
fn get_owner(env: soroban_sdk::Env) -> Option

Returns the address of the underlying verifier being wrapped.

fn get_verifier(env: soroban_sdk::Env) -> soroban_sdk::Address

Initializes the emergency stop wrapper.

Parameters

  • verifier -- address of the underlying verifier contract to wrap (e.g., a Groth16 verifier)
  • owner -- address of the guardian who can trigger the emergency stop
fn __constructor(
    env: soroban_sdk::Env,
    verifier: soroban_sdk::Address,
    owner: soroban_sdk::Address,
)

Accepts a pending ownership transfer.

Arguments

  • e - Access to the Soroban environment.

Errors

  • [crate::role_transfer::RoleTransferError::NoPendingTransfer] - If there is no pending transfer to accept.

Events

  • topics - ["ownership_transfer_completed"]
  • data - [new_owner: Address]
fn accept_ownership(env: soroban_sdk::Env)

Forwards receipt integrity verification to the underlying verifier.

Reverts if the contract is paused (emergency stop activated).

fn verify_integrity(
    env: soroban_sdk::Env,
    receipt: Receipt,
) -> Result<(), VerifierError>

Permanently pauses verification by submitting a proof of exploit.

Anyone can call this if they can produce a valid receipt whose claim_digest is the zero digest (all zeros). Such a receipt indicates a vulnerability in the verifier because a zero claim digest should never be provable.

Process

  1. Checks the contract is not already paused
  2. Verifies receipt.claim_digest == [0u8; 32]
  3. Forwards the receipt to the underlying verifier for validation
  4. If the verifier accepts it (proving the exploit), pauses permanently

Panics

  • Panics with [EmergencyStopError::InvalidProofOfExploit] if the receipt's claim digest is not the zero digest.
  • Panics if the contract is already paused.
fn estop_with_receipt(env: soroban_sdk::Env, receipt: Receipt)

Renounces ownership of the contract.

Permanently removes the owner, disabling all functions gated by #[only_owner].

Arguments

  • e - Access to the Soroban environment.

Errors

  • [OwnableError::TransferInProgress] - If there is a pending ownership transfer.
  • [OwnableError::OwnerNotSet] - If the owner is not set.

Notes

  • Authorization for the current owner is required.
fn renounce_ownership(env: soroban_sdk::Env)

Initiates a 2-step ownership transfer to a new address.

Requires authorization from the current owner. The new owner must later call accept_ownership() to complete the transfer.

Arguments

  • e - Access to the Soroban environment.
  • new_owner - The proposed new owner.
  • live_until_ledger - Ledger number until which the new owner can accept. A value of 0 cancels any pending transfer.

Errors

  • [OwnableError::OwnerNotSet] - If the owner is not set.
  • [crate::role_transfer::RoleTransferError::NoPendingTransfer] - If trying to cancel a transfer that doesn't exist.
  • [crate::role_transfer::RoleTransferError::InvalidLiveUntilLedger] - If the specified ledger is in the past.
  • [crate::role_transfer::RoleTransferError::InvalidPendingAccount] - If the specified pending account is not the same as the provided new address.

Notes

  • Authorization for the current owner is required.
fn transfer_ownership(
    env: soroban_sdk::Env,
    new_owner: soroban_sdk::Address,
    live_until_ledger: u32,
)

Imports

WebAssembly Text (WAT) ▶