Skip to content

dincli: task model-owner register-request --manifestCID fails because the registry contract isn't initialised #295

Closed

Description

@abrahamnash

Found by @Santiagocetran while reviewing #291 and #294, and confirmed in the source. Not yet reproduced on a live network.

In dincli/cli/task.py, register_request only sets dinregistry_contract = ctx.obj.get_deployed_din_registry_contract() inside the if not manifestCID: block (the manifest-file path). When a user passes --manifestCID, that block is skipped, and the later fee lookup (dinregistry_contract.functions.openSourceFee() / proprietaryFee()) fails with an UnboundLocalError before any transaction is sent.

Expected: register-request --manifestCID <cid> works the same as the manifest-file route.

Likely fix: move the get_deployed_din_registry_contract() call above the if not manifestCID: block, as update-manifest-request already does, and add a test for the CID path.

Until it's fixed, the docs should only show the --manifestpath route (see #294).

Activity

  1. added a commit that references this issue on Oct 28, 2026
  2. umeradl commented on Oct 29, 2026

    @umeradl
    Member

    Done by PR No. 297, merged into develop as e9424af (outcome, develop CI green). The PR's closing keyword closed this issue automatically when the merge was pushed. I re-checked it by hand:

    Checked on origin/develop @ e9424af:

    • Likely fix (move the lookup above the branch): dincli/cli/task.py:197 now sets dinregistry_contract = ctx.obj.get_deployed_din_registry_contract() before if not manifestCID: at line 210, the same order update_manifest_request uses (lines 301 / 312).
    • Add a test for the CID path: tests/test_register_request_cid.py::test_register_request_with_manifest_cid_sends_the_request_tx. It drives the --manifestCID route through to build_and_send_tx and checks that the proprietaryFee() value is sent. With develop's pre-fix task.py it fails with the reported UnboundLocalError. Full pytest -m "not integration" on the merged tree: 543 passed.

    Follow-up: the open PR No. 294 still carries the interim warning this issue asked for ("Use --manifestpath, not --manifestCID … currently crashes with an UnboundLocalError"). That warning is now stale; it should be dropped, and the --manifestCID route documented, before PR No. 294 merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions