Skip to content

Conversation

@fbac
Copy link
Collaborator

@fbac fbac commented Sep 3, 2025

Require explicit config.ContractsOptions and payer private key in migrator.NewMigrationService and migrator.setupBlockchainPublisher to pass contract options correctly during migration setup

This refactor removes contracts from migration server config and makes the migrator require contract options and the payer private key explicitly.

  • Add contracts to DBMigratorConfig, introduce migrator.WithContractsOptions, and make migrator.NewMigrationService return error "contracts are required" when missing in migrator.go
  • Change migrator.setupBlockchainPublisher to accept payerPrivateKey string and *config.ContractsOptions; update internal references and pass *cfg to NewBlockchainPublisher in builder.go
  • Remove Contracts from config.MigrationServerOptions in migration.go
  • Pass migrator.WithContractsOptions(&cfg.Options.Contracts) from the server when migration is enabled in server.go
  • Update tests to provide contracts via migrator.WithContractsOptions in migrator_test.go

📍Where to Start

Start with migrator.NewMigrationService and the new WithContractsOptions path in migrator.go, then follow the call into migrator.setupBlockchainPublisher in builder.go.


Macroscope summarized c65bb3e.

@fbac fbac requested a review from a team as a code owner September 3, 2025 11:44
@graphite-app
Copy link

graphite-app bot commented Sep 3, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • Queue - adds this PR to the back of the merge queue
  • Hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@fbac fbac merged commit e3e8892 into main Sep 3, 2025
10 checks passed
@fbac fbac deleted the 09-03-migrator_contracts_opts branch September 3, 2025 14:49
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