Skip to content

feat: add T3 hardfork support#91

Merged
grandizzy merged 3 commits intomasterfrom
georgen/t3-support
Apr 7, 2026
Merged

feat: add T3 hardfork support#91
grandizzy merged 3 commits intomasterfrom
georgen/t3-support

Conversation

@decofe
Copy link
Copy Markdown
Member

@decofe decofe commented Apr 3, 2026

Updates tempo-std to support T3 hardfork features.

Changes

  • IAccountKeychain.sol: Updated to match canonical T3 ABI from tempo/crates/contracts/src/precompiles/account_keychain.rs
    • Added LegacyTokenLimit struct (pre-T3 shape)
    • Updated TokenLimit with period field for periodic limit resets
    • Added CallScope, SelectorRule, KeyRestrictions structs
    • Added authorizeKey(address, SignatureType, KeyRestrictions) V2 overload
    • Added setAllowedCalls, removeAllowedCalls, getAllowedCalls, getRemainingLimitWithPeriod
    • Added new errors: InvalidSpendingLimit, SignatureTypeMismatch, CallNotAllowed, InvalidCallScope, LegacyAuthorizeKeySelectorChanged
    • Added AccessKeySpend event
  • StdPrecompiles.sol: Added T3-enabled precompile addresses and typed constants
    • ADDRESS_REGISTRY (0xfDC0000000000000000000000000000000000000)
    • SIGNATURE_VERIFIER (0x5165300000000000000000000000000000000000)
    • VALIDATOR_CONFIG_V2 (0xCcCCCCcC00000000000000000000000000000001)

Testing

forge build passes.

Prompted by: georgen

- IAccountKeychain: T3 ABI with call scopes (CallScope, SelectorRule),
  periodic token limits (TokenLimit.period), KeyRestrictions struct,
  authorizeKey V2, setAllowedCalls, removeAllowedCalls, getAllowedCalls,
  getRemainingLimitWithPeriod, new errors and AccessKeySpend event
- StdPrecompiles: add ADDRESS_REGISTRY, SIGNATURE_VERIFIER, and
  VALIDATOR_CONFIG_V2 addresses and typed constants

Co-Authored-By: grandizzy <38490174+grandizzy@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d5352-e28f-72dd-b87b-befc7fce5cf8
decofe and others added 2 commits April 3, 2026 12:42
@grandizzy grandizzy merged commit 72467d7 into master Apr 7, 2026
22 checks passed
@grandizzy grandizzy deleted the georgen/t3-support branch April 7, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants