Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

goLang graphQL module doesn't compile #1067

Open
miketsl opened this issue Apr 9, 2021 · 1 comment
Open

goLang graphQL module doesn't compile #1067

miketsl opened this issue Apr 9, 2021 · 1 comment

Comments

@miketsl
Copy link

miketsl commented Apr 9, 2021

Context

Please provide any relevant information about your setup

  • Are you running Mesh in the browser or as a standalone server? Are running Mesh inside of Docker or directly running the binary?

I am running mesh as a standalone server inside the docker container as shown in the documentation.

  • What version of Mesh are you running? Be as specific as possible (e.g., 8.0.1 instead of latest or 8).

11.1.0

  • Are you using one of our GraphQL clients and if so, which one? (e.g., Typescript or Golang client, the exact version)

Golang client 1.0.7 / golang version 1.16.3

Expected Behavior

go build should work?

Current Behavior

Currently there are a bunch of errors compiling the 0xmesh golang graphQL client.

Failure Information (for bugs)

Looks like it just doesn't compile the module / supporting files...

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. go mod init testGraphQL
  2. inside test.go "import 'github.com/0xProject/0x-mesh/rpc'"
  3. go build

Failure Logs

../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/zeroex/orderwatch/decoder/event_decoder.go:660:33: cannot call non-function event.ID (type common.Hash)
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/zeroex/orderwatch/decoder/event_decoder.go:664:34: cannot call non-function event.ID (type common.Hash)
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/zeroex/orderwatch/decoder/event_decoder.go:668:35: cannot call non-function event.ID (type common.Hash)
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/zeroex/orderwatch/decoder/event_decoder.go:672:36: cannot call non-function event.ID (type common.Hash)
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/zeroex/orderwatch/decoder/event_decoder.go:912:10: assignment mismatch: 1 variable but _abi.Unpack returns 2 values
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/zeroex/orderwatch/decoder/event_decoder.go:912:24: too many arguments in call to _abi.Unpack
have (interface {}, string, []byte)
want (string, []byte)

github.com/0xProject/0x-mesh/ethereum/wrappers

../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/ethereum/wrappers/coordinator_registry.go:23:6: undefined: abi.U256
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/ethereum/wrappers/coordinator_registry.go:142:78: cannot use result (type interface {}) as type *[]interface {} in argument to _CoordinatorRegistry.Contract.CoordinatorRegistryCaller.contract.Call: need type assertion
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/ethereum/wrappers/coordinator_registry.go:161:52: cannot use result (type interface {}) as type *[]interface {} in argument to _CoordinatorRegistry.Contract.contract.Call: need type assertion
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/ethereum/wrappers/coordinator_registry.go:183:43: cannot use out (type *string) as type *[]interface {} in argument to _CoordinatorRegistry.contract.Call
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/ethereum/wrappers/dev_utils.go:23:6: undefined: abi.U256
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/ethereum/wrappers/dummy_erc721_token.go:23:6: undefined: abi.U256
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/ethereum/wrappers/erc1155_mintable.go:23:6: undefined: abi.U256
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/ethereum/wrappers/exchange.go:24:6: undefined: abi.U256
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/ethereum/wrappers/weth9.go:23:6: undefined: abi.U256
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/ethereum/wrappers/zrx_token.go:23:6: undefined: abi.U256
../../../go/pkg/mod/github.com/0x!project/0x-mesh@v1.0.7/ethereum/wrappers/coordinator_registry.go:183:43: too many errors

@miketsl
Copy link
Author

miketsl commented Apr 9, 2021

Looked into the ethereum Go packages that you reference like abi for example, and there is no U256 in it, .. also the UnPack function in the wrapper doesn't take an interface as a first parameter as your code attempts to do. So this leads me to believe this goLang package requires an older version of go-ethereum abi etc. Its not immediately clear to me how to get this to compile or work.

Any help appreciated.

PS: All I am trying to do is make a goLang GraphQL client to talk to the mesh thats running in docker, using your published golang graphql mod.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@miketsl and others