Skip to content

feat(contracts): add v3 SessionManager and Stage7702Module (EIP-7702) Go bindings - #366

Merged
marino39 merged 3 commits into
masterfrom
claude/brave-sinoussi-cc95a0
Jul 24, 2026
Merged

feat(contracts): add v3 SessionManager and Stage7702Module (EIP-7702) Go bindings#366
marino39 merged 3 commits into
masterfrom
claude/brave-sinoussi-cc95a0

Conversation

@marino39

@marino39 marino39 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Go contract bindings for two v3 contracts from wallet-contracts-v3:

  1. SessionManager — the on-chain Sapient signer that validates session permissions (recoverSapientSignature, validatePermission, getLimitUsage, incrementUsageLimit, MAX_SPACE, VALUE_TRACKING_ADDRESS). Its compiled artifact was already vendored; this wires the Go bindings.
  2. Stage7702Module — the EIP-7702 aggregate entrypoint module for the 7702-delegated wallet (analogous to the existing Stage1Module/Stage2Module). Its artifact was built from source and vendored (see Provenance below).

Both follow the existing v3 abigen codegen convention.

Changes

  • contracts/gen/gen.go — two //go:generate ethkit abigen directives (sessionmanager with --includeDeployedBin matching the Estimator/Simulator siblings; walletstage7702 without it, matching Stage1/Stage2).
  • contracts/gen/v3/sessionmanager/session_manager.gen.go, contracts/gen/v3/walletstage7702/wallet_stage7702.gen.go — generated abigen bindings (new packages).
  • contracts/artifacts/wallet-contracts-v3/Stage7702Module.sol/Stage7702Module.json — newly vendored compiled artifact.
  • contracts/contracts.go — new imports and V3.SessionManager / V3.WalletStage7702Module artifact wiring.

Verification

  • go build ./..., go vet ./contracts/..., go test ./contracts/... all pass.
  • SessionManager: generated bytecode + ABI verified byte-for-byte against the vendored artifact (ABI entry count 29; creation + deployed bytecode exact).
  • Stage7702Module: V3.WalletStage7702Module initializes with non-empty Bin (16608 bytes) and its 23 ABI functions match the vendored artifact's 23 function entries.

Provenance (Stage7702Module)

wallet-contracts-v3 ships no pre-built artifacts or release tags. Stage7702Module was compiled from source at commit 7a864d6 (master) using the repo's own foundry.toml — solc 0.8.28, via-ir, optimizer runs 4294967295, evm_version paris — matching the compiler settings of the already-vendored sibling v3 artifacts. Because it is a newly built artifact, its bytecode cannot be diffed against a prior vendored reference; fidelity rests on the matching compiler settings.

Scope / follow-ups

  • SessionManager: concrete SessionManager only (the abstract Explicit/Implicit/PermissionValidator interfaces are not bound).
  • 7702: Stage7702Module only. Stage7702Auth and Implementation7702 are not bound in this PR.

🤖 Generated with Claude Code

marino39 and others added 2 commits July 24, 2026 13:34
Wire abigen bindings for the concrete SessionManager sapient signer from
wallet-contracts-v3 (artifact already vendored). Adds one go:generate
directive, the generated contracts/gen/v3/sessionmanager package, and the
V3.SessionManager artifact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Vendor the compiled Stage7702Module artifact from wallet-contracts-v3
(built from source at 7a864d6, solc 0.8.28 / viaIR / paris, matching the
canonical settings of the sibling v3 artifacts) and wire its abigen Go
bindings, following the Stage1Module/Stage2Module pattern.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@marino39 marino39 changed the title feat(contracts): add v3 SessionManager Go bindings feat(contracts): add v3 SessionManager and Stage7702Module (EIP-7702) Go bindings Jul 24, 2026
…binding

Add --includeDeployedBin to the walletstage7702 abigen directive and wire
WalletStage7702DeployedBin into V3.WalletStage7702Module so the runtime
bytecode is available (needed for EIP-7702 delegated-code verification).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@marino39
marino39 marked this pull request as ready for review July 24, 2026 13:59
@marino39
marino39 merged commit 1396641 into master Jul 24, 2026
6 checks passed
@marino39
marino39 deleted the claude/brave-sinoussi-cc95a0 branch July 24, 2026 14:36
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.

2 participants