Conversation
…rchitecture Extract EVM-specific simulation code into a chain/evm/ package behind a ChainFamily interface with a registry. The simulate command now iterates registered families instead of hardcoding EVM calls. New chain/ package: - ChainFamily interface defining what a chain family plugin must implement - Typed registry with Register(), Get(), All() for family discovery - ChainClient, ChainConfig, CapabilityConfig, FamilyTriggers shared types New chain/evm/ package: - EVMFamily implementing ChainFamily with init() self-registration - SupportedChains list (moved from simulator_utils.go) - EVM chain capabilities, trigger parsing, health check, limited capabilities - EVMChainLimits interface to avoid circular imports with SimulationLimits Refactored simulate command: - Inputs struct uses family-generic fields (FamilyClients, FamilyForwarders, FamilyKeys) - ResolveInputs iterates chain.All() instead of hardcoded SupportedEVM - simulatorInitialize registers capabilities per-family via registry - Cron/HTTP triggers split into chain-agnostic CronAndHTTPTriggers - Trigger routing uses family.ParseTriggerChainSelector() dispatch Adding a new chain family (e.g., Aptos) requires: 1. Create chain/aptos/ package implementing ChainFamily 2. Add one import to simulate.go Zero user-facing changes. All existing tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
chain/evm/package behind aChainFamilyinterface with a registryChanges
chain/package:ChainFamilyinterface, typed registry withRegister()/Get()/All()chain/evm/package:EVMFamilyimplementingChainFamilywithinit()self-registrationsimulate.go:Inputsstruct uses family-generic fields, orchestration loops over registered familiescapabilities.go: Split cron/HTTP triggers (chain-agnostic) from EVM chain capabilitieschain/evm/Test plan
go test ./cmd/workflow/simulate/... -count=1— all tests pass across 3 packagesgo build ./...— full project compiles cleancre workflow simulateproduces identical output to main🤖 Generated with Claude Code