Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭 适合新手
#295 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
79/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python, solidity
领域
blockchain, cli

调研方向

阅读 dincli/cli/task.py,并比较 register_request 与 update-manifest-request。移动 registry 合约的初始化,使 --manifestCID 路径和 manifest 文件路径都能使用费用查询,然后为 CID 路径添加测试。完成标准是 register-request --manifestCID <cid> 能够到达交易提交阶段,且不出现 UnboundLocalError。

由索引模型根据 Issue 内容生成。

描述

bug good first issue

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).

主要语言
Python
星标
4
派生
7
平均合并
3 天 4 小时
30 天内合并 PR
34

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

InfiniteZeroFoundation/DevNet 的其他 Issue

查看 InfiniteZeroFoundation/DevNet 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。