Skip to content

[2.11.1] Implement MetaTxV0 Syscall #1153

@JulianGCalderon

Description

@JulianGCalderon

Cairo version 2.11.1 introduces a new syscall that we should implement:

/// Invokes the given entry point as a v0 meta transaction.
///
/// * The signature is replaced with the given signature.
/// * The caller is the OS (address 0).
/// * The transaction version is replaced by 0.
/// * The transaction hash is replaced by the corresponding version-0 transaction hash.
///
/// The changes apply to the called contract and the inner contracts it calls.
///
/// NOTE: This syscall should only be used to allow support for old version-0 bound accounts,
/// and should not be used for other purposes.
extern fn meta_tx_v0_syscall(
    address: ContractAddress,
    entry_point_selector: felt252,
    calldata: Span<felt252>,
    signature: Span<felt252>,
) -> starknet::SyscallResult<Span<felt252>> implicits(GasBuiltin, System) nopanic;

See casm lowering for more information: https://github.com/starkware-libs/cairo/blob/1a531143af0066d3d9141d63dfbfba2e293ff8f0/crates/cairo-lang-sierra-to-casm/src/invocations/starknet/mod.rs#L88

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions