You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dincli: task model-owner register-request --manifestCID fails because the registry contract isn't initialised #295
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).
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.
Activity
docs: address PR InfiniteZeroFoundation#294 review feedback
umeradl commentedon Oct 29, 2026
Done by PR No. 297, merged into
developase9424af(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:dincli/cli/task.py:197now setsdinregistry_contract = ctx.obj.get_deployed_din_registry_contract()beforeif not manifestCID:at line 210, the same orderupdate_manifest_requestuses (lines 301 / 312).tests/test_register_request_cid.py::test_register_request_with_manifest_cid_sends_the_request_tx. It drives the--manifestCIDroute through tobuild_and_send_txand checks that theproprietaryFee()value is sent. Withdevelop's pre-fixtask.pyit fails with the reportedUnboundLocalError. Fullpytest -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 anUnboundLocalError"). That warning is now stale; it should be dropped, and the--manifestCIDroute documented, before PR No. 294 merges.docs: drop stale --manifestCID warning from register-request (fixed by …