Skip to content

feat(keychain): add AccessKeySpend event gated behind T2#2914

Open
decofe wants to merge 1 commit intomainfrom
tanishk/access-key-spend-event
Open

feat(keychain): add AccessKeySpend event gated behind T2#2914
decofe wants to merge 1 commit intomainfrom
tanishk/access-key-spend-event

Conversation

@decofe
Copy link
Member

@decofe decofe commented Feb 28, 2026

Emits AccessKeySpend(account, publicKey, token, amount, remainingLimit) from verify_and_update_spending whenever an access key's spending limit is deducted. Gated behind is_t2().

Only fires for actual access-key spends — root key txs (key_id == Address::ZERO) return early before reaching the emission point.

Prompted by: tanishk

Emits AccessKeySpend(account, publicKey, token, amount, remainingLimit)
whenever an access key's spending limit is deducted in
verify_and_update_spending. Gated behind is_t2() so it only applies
from the T2 hardfork onwards.

Amp-Thread-ID: https://ampcode.com/threads/T-019ca568-c744-717d-8a12-f5f80fc6c78e
Co-authored-by: Amp <amp@ampcode.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants