Skip to content

[FEATURE] Allow calling assert_current_call_valid_authwit from entrypoint #19356

@ilpepepig

Description

@ilpepepig

Problem Statement

assert_current_call_valid_authwit cannot currently be used to check authwits from a context in which the msg_sender is null, because unwrapping a null msg_sender reverts.

Dapp entrypoints could benefit from using authwits.

Proposed Solution

assert_current_call_valid_authwit should not revert when the msg_sender is null. In such case, CallAuthorization::msg_sender should probably be NULL_MSG_SENDER_CONTRACT_ADDRESS.

Additionally, it would be helpful if aztec.js provided tooling for use cases in which a dapp entrypoint instead of an account entrypoint is used.

Example Use Case

This repo itself has an example contract: https://github.com/AztecProtocol/aztec-packages/blob/v3.0.0-devnet.20251212/noir-projects/noir-contracts/contracts/app/app_subscription_contract/src/main.nr#L79

Alternative Solutions

No response

Additional Context

v3.0.0-devnet.20251212

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-feature-requestType: Adding a brand new feature (not to be confused with improving an existing feature).from-communityThis originated from the community :)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions