Skip to content

Add import contracts command#701

Merged
DokaIzk merged 1 commit into
SoroScan:mainfrom
mayasimi:codex/import-contracts
Jun 1, 2026
Merged

Add import contracts command#701
DokaIzk merged 1 commit into
SoroScan:mainfrom
mayasimi:codex/import-contracts

Conversation

@mayasimi
Copy link
Copy Markdown
Contributor

@mayasimi mayasimi commented Jun 1, 2026

resolves #475

Changes

  • Adds import_contracts with --file / --input support.
  • Reads contracts from the export_contracts JSON format.
  • Supports plain address/name mappings, including { "CONTRACT_ID": "Name" }.
  • Creates new TrackedContract records.
  • Skips existing contracts without erroring or overwriting them.
  • Supports --owner for assigning imported contracts to an existing user.
  • Falls back to a deterministic soroscan-import service user when no owner is provided.
  • Adds tests for import success, duplicate handling, owner selection, mapping formats, and validation errors.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@mayasimi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@DokaIzk DokaIzk merged commit 3fde656 into SoroScan:main Jun 1, 2026
3 checks passed
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.

Add management command to import tracked contracts from a JSON file

3 participants