之前面试题是用python写的,后来公司那边人说最好是用Golang实现
我对golang部署合约完全不懂,只能从0开始配置Golang开发ETH的环境
python实现:https://github.com/r4bbit2015/Eaam
需求:
1.部署合约Anyswapv6Erc20合约2.调用InitValut设置Keystore地址
3.调用mint、调用swapout
4.获取swapout交易、输出交易内容、区块高度、区块时间戳
5.调用mpc函数查看mpc地址
1.配置go镜像
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
2.安装rpc
go get github.com/ethereum/go-ethereum/rpc
不能挂代理,不然报错
fatal: unable to access 'https://github.com/ethereum/go-ethereum/': Failed to connect to github.com port 443 after 6 ms: Connection refused
安装过程
➜ zkSync go get github.com/ethereum/go-ethereum/rpc
go: downloading github.com/ethereum/go-ethereum

本文档详细介绍了如何从零开始配置Golang环境,以便进行ETH智能合约的开发。主要内容包括部署Anyswapv6Erc20合约、初始化设置、执行mint和swapout操作、获取交易详情以及调用mpc函数。在配置过程中,特别提到不能使用代理,否则会导致go-ethereum的安装失败。

1670

被折叠的 条评论
为什么被折叠?



