Skip to content

th verify: generalize constructor args encoding beyond 0/2 inputs #9

@snissn

Description

@snissn

Context

Problem

  • th verify currently supports encoding constructor args only for arity 0 or 2 (admin + treasury).
  • If the generator evolves the App constructor (e.g. adds parameters), verification will break.

Proposal

  • Generalize constructor args encoding for verification.
    • Source of truth should be the manifest + compiled ABI.
    • For each constructor input, determine the value from the manifest (or CLI overrides).
    • Fail with a clear error if a required input cannot be resolved.

Options

  • Introduce manifest.deployments[].constructorArgs (ordered array) recorded during th deploy.
  • Or introduce manifest.deployments[].constructorArgsByName (object) and map into ABI order.
  • Or add th verify --constructor-args <hex> override while keeping manifest as default.

Acceptance criteria

  • Verification works for any constructor arity where args can be resolved from the manifest (or CLI override).
  • Existing 0/2-arg deployments remain backwards compatible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions