Categorygithub.com/bitxx/evm-utils
modulepackage
1.2.13
Repository: https://github.com/bitxx/evm-utils.git
Documentation: pkg.go.dev

# README

evm-utils

ethereum生态的常用工具,如钱包生成、账户余额查询、转账等等

使用方式

具体使用方式,先看根目录的evmutils_test.go吧,后面有空了再写

** 关于model/contract/中的使用说明

合约交互不比简单转账,它是有参数的,而且参数的编码也要严格遵守规范,go-ethereum自带的abigen可以根据合约的ABI文件,自动生成对应的Go文件。
go-ethereum相关程序官方下载入口

举例:
假设要获取erc20的基本操作流程
OpenZeppelin库 下载接口文件,然后放到Remix里编译,拷贝出ABI文件
保存的ABI文件名是IERC20.json
运行命令

abigen --abi IERC20.json --type ERC20 --pkg erc20 --out erc20.go

之后进一步操作erc20的golang代码即可。

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

NewEthClient @Description: if rpcUrl and timeout is empty,you can‘t connect the node,but you can use the function about wallet @param rpcUrl @param timeout @return *EvmClient.
NewSimpleEthClient @Description: not support connect to the node @return *EvmClient.

# Structs

No description provided by the author