Parse json output of flow-cli for transaction using cadence/json
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- go
- 领域
- blockchain, cli
调研方向
首先运行文档中说明的 flow transactions get 命令并加上 -o json,检查输出以及 cadence/json.Decode 返回的错误。然后将该输出与 cadence Go dependency 预期的格式进行比较。当交易输出可以解码为 Go 中的内存表示时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Instructions
I am trying to parse the output of flow-cli`s -o json flag into a cadence transaction using cadence go dependency. This used to work, but now it does not work anymore
Problem
flow transactions get c82243bb504e49a0bd55191d8a7b6001ef391ce6fa5e69f580e2e3ca8524372e -n mainnet -o json | ./overflow-json
this does not work where code is
package main
import (
"fmt"
"io"
"os"
"github.com/bjartek/underflow"
jsoncdc "github.com/onflow/cadence/encoding/json"
)
func main() {
_, err := os.Stdin.Stat()
if err != nil {
panic(err)
}
bytes, err := io.ReadAll(os.Stdin)
if err != nil {
panic(err)
}
value, err := jsoncdc.Decode(nil, bytes)
if err != nil {
panic(err)
}
output, err := underflow.CadenceValueToJsonString(value)
if err != nil {
panic(err)
}
fmt.Println(output)
}
It fails on line 24, so before my code even runs.
Steps to Reproduce
Build the binary from the code above and try to run the cli command
Acceptance Criteria
It is possible to parse flow-cli transaction output into a in memory representation in golang.
Context
Debugging things
- 主要语言
- Go
- 星标
- 209
- 派生
- 88
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
onflow/flow-cli 的其他 Issue
-
Simplify MCP contract sorting with slices helpers可能已有人在做 @luangucun 于 41 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
-
`flow cadence lint` lints imports可能已有人在做 @holyfuchs 于 180 天前认领。 未关闭Bug Improvement
难度 2/5 1-3 小时 新手友好度 78/100
-
Bug
难度 3/5 1-2 天 新手友好度 48/100
-
flow test prints unreadable output可能已有人在做 @holyfuchs 于 179 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 55/100
-
Feature
难度 3/5 1-2 天 新手友好度 48/100
相似的 Issue
-
TOTP enrollment returns 500 for phone-only users (empty TOTP account name)可能已有人在做 @emiliosandoval4 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 60/100
维护者通常 1 天内回复
-
8.9 to 8.10 Helm upgrade guide still says deprecated keys are removed in chart v16 (Camunda 8.11)未关闭
难度 1/5 1 小时以内 新手友好度 78/100
camunda/camunda-platform-helm#7559 ·
维护者通常 1 天内回复
-
docs: namespaceRegexes example teaches prefix matching, but regexes are matched as a substring可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭triage/pending-triage
难度 2/5 1-3 小时 新手友好度 74/100
external-secrets/external-secrets#7117 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
ENTERPILOT/GoModel#1183 · 1 条评论 ·
维护者通常 1 天内回复
-
createEtcdKV fails on a single transient etcd endpoint sync timeout可能已有人在做 @vldmit 今天认领。 未关闭contribution
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复