Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined: math.S256 #1242

Closed
jbaldwinroberts opened this issue Jan 31, 2025 · 10 comments
Closed

undefined: math.S256 #1242

jbaldwinroberts opened this issue Jan 31, 2025 · 10 comments
Assignees

Comments

@jbaldwinroberts
Copy link

i'm seeing this issue when I run go mod tidy:

github.com/hashgraph/hedera-sdk-go/[email protected]/contract_function_result.go:245:29: undefined: math.S256

Attempting to update my code to use github.com/hiero-ledger/hiero-sdk-go/v2 results in:

go: finding module for package github.com/hiero-ledger/hiero-sdk-go/v2
go: downloading github.com/hiero-ledger/hiero-sdk-go v0.9.4
go: github.com/palisadeinc/custody/backend/blockchain/hedera-connector imports
        github.com/hashgraph/hedera-mirror-node/hedera-mirror-rosetta/app/services/construction imports
        github.com/hiero-ledger/hiero-sdk-go/v2: module github.com/hiero-ledger/hiero-sdk-go/v2@latest found (v2.54.0), but does not contain package github.com/hiero-ledger/hiero-sdk-go/v2

Any ideas? Thanks

@0xivanov 0xivanov self-assigned this Feb 3, 2025
@0xivanov
Copy link
Contributor

0xivanov commented Feb 3, 2025

Hello @jbaldwinroberts , can you try updating everywhere in your codebase where you use import "github.com/hiero-ledger/hiero-sdk-go/v2" to import hiero "github.com/hiero-ledger/hiero-sdk-go/v2/sdk"

@jbaldwinroberts
Copy link
Author

Hey @0xivanov , all my imports are already using import hiero "github.com/hiero-ledger/hiero-sdk-go/v2/sdk"

@0xivanov
Copy link
Contributor

0xivanov commented Feb 3, 2025

Hmm, this is weird. I have set up a testing project and it compiles for me. Here is my setup:

go.mod:

module test.com

go 1.23.3

require (
	github.com/hiero-ledger/hiero-sdk-go/v2 v2.54.0
	google.golang.org/protobuf v1.36.2
)

require (
	github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
	github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
	github.com/json-iterator/go v1.1.12 // indirect
	github.com/mattn/go-colorable v0.1.13 // indirect
	github.com/mattn/go-isatty v0.0.20 // indirect
	github.com/mitchellh/mapstructure v1.5.0 // indirect
	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
	github.com/modern-go/reflect2 v1.0.2 // indirect
	github.com/pkg/errors v0.9.1 // indirect
	github.com/rs/zerolog v1.33.0 // indirect
	github.com/tyler-smith/go-bip39 v1.1.0 // indirect
	github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
	golang.org/x/crypto v0.32.0 // indirect
	golang.org/x/net v0.33.0 // indirect
	golang.org/x/sys v0.29.0 // indirect
	golang.org/x/text v0.21.0 // indirect
	google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
	google.golang.org/grpc v1.65.0 // indirect
)

main.go:

package main

import (
	"fmt"

	hiero "github.com/hiero-ledger/hiero-sdk-go/v2/sdk"
)

func main() {
	client := hiero.AccountID{}
	fmt.Println(client)
}

@jbaldwinroberts
Copy link
Author

I think the issue stems from this import github.com/hashgraph/hedera-mirror-node/hedera-mirror-rosetta/app/services/construction - please try to repro with that.

@jbaldwinroberts
Copy link
Author

@0xivanov
Copy link
Contributor

0xivanov commented Feb 3, 2025

Oh so you are not importing the SDK directly, but indirectly from the mirror-node?

@0xivanov
Copy link
Contributor

0xivanov commented Feb 3, 2025

I think the version imported from the mirror-node and the version you are importing are not compatible. Can you try to use v2.53.0?

@jbaldwinroberts
Copy link
Author

I did this:

❯ go mod edit -require=github.com/hiero-ledger/hiero-sdk-go/[email protected]
❯ go mod tidy
go: downloading github.com/hiero-ledger/hiero-sdk-go/v2 v2.53.0
go: finding module for package github.com/hiero-ledger/hiero-sdk-go/v2/sdk
go: found github.com/hiero-ledger/hiero-sdk-go/v2/sdk in github.com/hiero-ledger/hiero-sdk-go/v2 v2.54.0
go: finding module for package github.com/hiero-ledger/hiero-sdk-go/v2
go: github.com/palisadeinc/custody/backend/blockchain/hedera-connector imports
        github.com/hashgraph/hedera-mirror-node/hedera-mirror-rosetta/app/services/construction imports
        github.com/hiero-ledger/hiero-sdk-go/v2: module github.com/hiero-ledger/hiero-sdk-go/v2@latest found (v2.54.0), but does not contain package github.com/hiero-ledger/hiero-sdk-go/v2

Is there another way to lock the version you'd recommend?
Have you been able to reproduce?

@0xivanov
Copy link
Contributor

0xivanov commented Feb 3, 2025

go: finding module for package github.com/hiero-ledger/hiero-sdk-go/v2/sdk : it's trying to find the /sdk package which is only available in v2.54.0. I think you should revert the import changes from v2/sdk to v2 and it should download version 2.53.0.

@jbaldwinroberts
Copy link
Author

got it, thanks

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

No branches or pull requests

2 participants