Configure golang development ETH environment

The previous interview questions were written in python, but later the company said that it is best to use Golang

I don't know anything about the golang deployment contract. I can only configure the environment for Golang to develop ETH from 0.

Python implementation: https://github.com/r4bbit2015/Eaam

need:


1. Deploy the contract Anyswapv6Erc20 contract

2. Call InitValut to set Keystore address

3. Call mint, call swapout

4. Obtain swapout transaction, output transaction content, block height, block timestamp

5. Call the mpc function to view the mpc address

1. Configure go image

go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct

2. Install rpc

go get github.com/ethereum/go-ethereum/rpc

Proxy cannot be linked, otherwise an error will be reported

fatal: unable to access 'https://github.com/ethereum/go-ethereum/': Failed to connect to github.com port 443 after 6 ms: Connection refused

Installation process

➜  zkSync go get github.com/ethereum/go-ethereum/rpc
go: downloading github.com/ethereum/go-ethereum v1.10.19
go: downloading github.com/deckarep/golang-set v1.8.0
go: downloading github.com/gorilla/websocket v1.4.2
go: downloading gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce
go: downloading github.com/go-stack/stack v1.8.0
go: downloading golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
go: downloading github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible
go: downloading golang.org/x/sys v0.0.0-20211019181941-9d821ace8654
go: downloading github.com/tklauser/go-sysconf v0.3.5
go: downloading github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6
go: downloading github.com/go-ole/go-ole v1.2.1
go: downloading github.com/tklauser/numcpus v0.2.2

Guess you like

Origin blog.csdn.net/claysystem/article/details/125406994