Open van-bright opened 3 years ago
【Issue 1】
if I want to dependency github.com/PlatONnetwork/PlatON-Go
in my go project, it can not be compiled because of bls.git
.
I can only compile PlatON-Go
locally and then replace it in go.mod.
But for project go-ethereum
, works fine to dependency.
【Issue 2】
According to this tutorial https://geth.ethereum.org/docs/dapp/native-bindings
, use the tool abigen
to generate native binding for .sol file.
The output .go file can not be compiled, because abi.ConvertType
it is not defined.
【Issue 3】
types.BlockNonce
is defined as [81]byte
, but in go-ethereum
it is defined as [8]byte
.
The difference makes some APIs can not be unmarshaled.
@benbaley
@clearly PTAL
【Issue 1】 if I want to dependency
github.com/PlatONnetwork/PlatON-Go
in my go project, it can not be compiled because ofbls.git
.I can only compile
PlatON-Go
locally and then replace it in go.mod.But for project
go-ethereum
, works fine to dependency.
你是指通过go get PlatON的方式来作为项目的dependency 无法编译吗?由于PlatON中依赖bls库,需要根据操作系统预先生成bls静态库后方可运行。
【Issue 2】 According to this tutorial
https://geth.ethereum.org/docs/dapp/native-bindings
, use the toolabigen
to generate native binding for .sol file. The output .go file can not be compiled, becauseabi.ConvertType
it is not defined.
PlatON下的abigen还没有同步更新到以太坊的最新版本,后续我们会加入支持。
【Issue 3】
types.BlockNonce
is defined as[81]byte
, but ingo-ethereum
it is defined as[8]byte
.The difference makes some APIs can not be unmarshaled. PlatON和以太坊的types.BlockNonce的用法不同,以太坊的BlockNonce是一个无意义的随机数,用于工作量证明,与挖矿的难度有关,PlatON的BlockNonce用作存储VRF的证明,因此两边的类型不一致,暂无兼容计划。对于该字段,除了go版本之外的sdk基本都能兼容。
Issue feedback(600U) rewards have been issued (2021.12.29 Base Price 0.12)
Project Name: Go-SDK for Platon
Project repository: https://github.com/oldmanfan/platon-go-sdk
Development tools/resources used: Go language
Scheduled completion date: Jan 1, 2022
The expected content of delivery: source code, examples and documents
Contact info: https://t.me/oldmanfan
LAT address (PlatON main network LAT account address for receiving rewards): lat1qzqykpmfwvuj9lf2mx88r6vx2q0lmeals83aw8