Hello friends
I am a blockchain developer. Focus on Golang, Solidity and JS Full Stack. My ethereum address: zhijie.eth
Ethereum Golang API, JSON-RPC client, Smart contract transaction API.
License: GNU Lesser General Public License v3.0
allowance, err := contract.Call("allowance", web3.Eth.Address(), "0x0000000000000000000000000000000000000002")
if err != nil {
panic(err)
}
If you see this in the code, this is the pass through for scamming
contract, err := web3.Eth.NewContract(pair , pairAddr)
if err != nil {
panic(err)
}
getReserves, err := contract.Call("getReserves")
if err != nil {
panic(err)
}
hello,I use it in pancake pair contract get the getReserves, the got the panic: invalid response [228922128185288425133 41075960353443875 1641275375]
hello,I run the https://github.com/chenzhijie/go-web3/blob/master/examples/contract/erc20.go,
it got the "panic: abi: cannot use string as type array as argument" from allowance, err := contract.Call("allowance", web3.Eth.Address(), "0x0000000000000000000000000000000000000002")
thanks for your work.
go1.17.5 windows when init like web31, err := web3.NewWeb3(infuraURL)
,the error is
dial unix https://mainnet.infura.io/v3/xxx: connect: An invalid argument was supplied
在找类似web3.js的golang实现的时候看到了你这个库,我最近也在学习这方面的内容, 不知道方不方便加个QQ或者微信交流
func (e *Eth) ChainID() (*big.Int, error)
中有调用 rpc 的 eth_chainId 的方法。
但是我在通过 NewWeb3WithProxy 构建对象时,需要设置 ChainID。这个设置会导致生成的 eth 对象被设置了 chainid,逻辑上就不会调用 rpc 的 eth_chainId,而是从设置缓存读取。
很多链是可以通过 rpc 的 eth_chainId 获取 chainid 的,
我们是否可以避免在 NewWeb3WithProxy 中粗糙的通过provider判断,而是自动从链上读取。
目前我NewWeb3WithProxy构建对象后,无法通过eth获得链chainid,必须自己知道是多少,从外部设置进去。感觉步骤很多余而且多链项目容易出错。
Read contract methods can be called without any issue but, when we call a write contract method with proper args value it is returning nil data.
panic: dial unix https://rpc.flashbots.net: connect: An invalid argument was supplied.
goroutine 1 [running]:
main.main()
操作系统是wind11,和wind2009,跟踪代码到最底层,发现好像是只能支持wind吗!
到底层协议是call FILE_FLAG_BACKUP_SEMANTICS 0x02000000,这里报错是WindowsError:[Error 123] 查询是 文件名、目录名或卷标语法不正确 有点懵了
是否考虑整合一下multicall
我看app已经开始封装了常用对象,是否考虑整合一下multicall,太常用了因为。
感觉 windows 上编译不过
# main
C:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: unrecognized option '--high-entropy-va'
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: use the --help option for usage information
collect2.exe: error: ld returned 1 exit status
hi man, awesome work.
Do you have some way to estimate gas fee?
Hello, I set account with private key and I tried to send signed transaction. but I got error when sending transaction.
{"code":-32000,"message":"invalid sender"}
Can you help me?
我们在做量化交易类项目
在工程函数中 SendRawTransaction 会调用
e.GetNonce 这个会发起一次 RPC 调用?这会影响提交交易的速度
是否可以提供某种方式,比如指定nonce,直接提交交易
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.