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

can't install go dependency go-ethereum-hdwallet #8

Open
chenzhijie opened this issue Feb 25, 2024 · 0 comments
Open

can't install go dependency go-ethereum-hdwallet #8

chenzhijie opened this issue Feb 25, 2024 · 0 comments

Comments

@chenzhijie
Copy link

Go dependency go-ethereum-hdwallet uses github.com/btcsuite/btcutil, which is not maintained anymore. I notice zksync2-go has already upgraded. If I install zksync2-go first, then install zksync-go, confilct will happen. The following code will help you find out the problem

package main

import (
	"fmt"
	zksync1 "github.com/zksync-sdk/zksync-go"
	"github.com/zksync-sdk/zksync2-go/accounts"
)

func main() {
	ethSigner, err := zksync1.NewEthSignerFromMnemonic("color round crucial offer twist deer junior diesel cactus gown father alone")
	if err != nil {
		panic(err)
	}
	fmt.Println("ethSigner:", ethSigner)
	baseSigner, err := accounts.NewRandomBaseSigner(1)
	if err != nil {
		panic(err)
	}
	fmt.Println("baseSigner:", baseSigner)
}

After I run the code:

$  CGO_LDFLAGS="-L./libs" go run main.go

Error shows:

github.com/zksync-sdk/zksync-go imports
	github.com/miguelmota/go-ethereum-hdwallet imports
	github.com/btcsuite/btcutil/hdkeychain imports
	github.com/btcsuite/btcd/btcec: cannot find module providing package github.com/btcsuite/btcd/btcec

Here is the pr, fixing the problem. #7

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

1 participant