All Questions
80 questions with no upvoted or accepted answers
0
votes
0
answers
83
views
Abigen unable to generate go code for solidity enum type used inside a library used by other contracts
I am receiving the following error from abigen:
$ abigen --abi abi.json --pkg versioning --type Versioning --out versioning.go
Fatal: Failed to generate ABI binding: unsupported arg type: State
For ...
0
votes
0
answers
41
views
public key recovery failed intermittently with go-ethereum
I am trying to recover public key from signature and digest. below is my code. It's failing sometimes with error recovery failed
package main
import (
"crypto/ecdsa"
"crypto/...
0
votes
1
answer
35
views
How to implement solidity bitwise in Golang
Code in UniswapV3 Solidity contract
TickBitmap
uint256 mask = ~((1 << bitPos) - 1);
I had founded some example code in Golang:
a := new(big.Int).Exp(big.NewInt(2), big.NewInt(66), nil)
...
0
votes
1
answer
266
views
How to create Solidity bytes[] input argument in Go for Ethereum contract call
I have a simple multicall contract in Solidity which has the following function:
function multiCall (address[] calldata targets,bytes[] calldata data) external view returns(Return[] memory returnData)
...
0
votes
1
answer
284
views
How to properly handler error from contract call with go etheruem
I am writing an application with https://github.com/ethereum/go-ethereum
Basically I am trying to check a given smart contract address is erc20 or not. I am calling getBalance, getSymbol... methods. ...
0
votes
1
answer
1k
views
go ethereum bigint and unit256
Golang can only handles up to 64 int however ethereum contract call can return uint256 for example https://eips.ethereum.org/EIPS/eip-20 balanceOf method.
Does https://github.com/ethereum/go-ethereum ...
0
votes
1
answer
353
views
what consensus client is used while making personal blockchain with geth ( go-ethereum)?
Modular EVM based blockchain have multiple layers. mainly consensus layer and execution layer.
Execution layer options:
Besu
Erigon
Go Ethereum
Nethermind
consensus clients options:
Lighthouse
...
0
votes
1
answer
15
views
identify past malicious transitions on blockchain?
Do you know any way to identify past malicious transitions on blockchain?
Like if you see a large number of transactions going to a single address, or if you see transactions that seem to be moving ...
0
votes
1
answer
98
views
Decode Ethereum Gas Price Golang
I needed to get gas data from a transaction, I did it with the code below. The received data has been converted to a string. Now I need to decode the received value. How can I do this?
import (
&...
0
votes
1
answer
255
views
Simple Go-Ethereum Program not compiling
I am following this tutorial: 01-Interact with Ethereum blockchain using Golang
When I compile the code, i get the following errors:
# github.com/deckarep/golang-set
../github.com/deckarep/golang-set/...
0
votes
1
answer
294
views
How to extend functionality of geth (module, addon)?
Is there a way to extend functionality of geth using some sort of plugins, modules or addons?
However, I haven't found any information about the topic.
How to do it?
0
votes
1
answer
360
views
Can I deploy contract with go-ethereum and sign it via MetaMask?
I want to deploy contracts by using my go backend code with go-ethereum package. Since this part of the system will run as a central element (since it does a lot of other stuffs), I won't (and don't ...
0
votes
1
answer
972
views
How to interact with mainnet smart contracts by GOlang?
Please tell me an example of code in GOlang that connects to the contract and checks the balance of the ERC20 token / transfer tokens / gets the name of the token. I looked for examples and did not ...
0
votes
0
answers
379
views
Decode pending transaction input into map
I'm attempting to decode a transaction input into a map, the input contains uint256 which are translated to bigint but the output value I get is incorrect.
I use this function to decode the input data ...
0
votes
1
answer
1k
views
Decode Raw Transaction In GoLang to Go-Ethereum types.Transaction
I have the following raw transaction string.
...
0
votes
1
answer
127
views
Start and HTTP JSON-RPC geth on android?
Is it possible to change the code in /mobile to allow for a json-rpc api to be spawned on an android?
Or is there something I need to do in Java with the NodeConfig?
I already managed to run a light-...
0
votes
0
answers
236
views
geth is not attached with JavaScript console
I am Nikhil Upadhyay I am trying to connect geth with javaScript Console but it didn't work for me
here are few steps which I already tried but could not resolve it
geth attach ipc:gethDataDir/ geth....
0
votes
0
answers
33
views
Transferring tokens with Geth: what's outdated about this tutorial?
I'm using this e-book to learn about using go-ethereum, but it's pretty outdated. I'm on the part about transferring tokens and I'm getting an invalid opcode when estimating gas. I have a private key ...
0
votes
0
answers
784
views
Call getReserves() from goweb3
I've been using https://github.com/umbracle/go-web3 as my go web3 library, and I am having trouble finding out how to call the "function getReserves(address factory, address tokenA, address ...
0
votes
2
answers
57
views
Setup Quorum Blockchain
I am setting up a quorum blockchain on my computer. According to the official documentation, I have to first clone the git repo and give the following command:
git clone https://github.com/Consensys/...
0
votes
1
answer
2k
views
Monitoring pending transactions with Go
I'm trying to write a program in Go to watch pending transactions, using a geth full node that I'm connected to over websockets. I'm pretty sure I have to use the github.com/ethereum/go-ethereum/eth/...
0
votes
1
answer
89
views
Ethereum miner does not produce blocks
first time Mining! Watching a YouTube Tutorial about Blockchain basics and it shows how to set up a Genesis Block as well as how to start Mining.
I've followed all the steps to the best of my ...
0
votes
1
answer
2k
views
Issues with autogenerated go file while using abigen
I have a simple sol file message.sol
pragma solidity >=0.5.10;
contract Message {
string public message;
constructor(string memory initMessage) public {
message = initMessage;
...
0
votes
1
answer
3k
views
How to solve the "cannot find package" error in GoLand?
I just imported the go-ethereum project in GoLand. But the configuration shows the error below, how to solve it?
0
votes
0
answers
232
views
How it works with modified go-ethereum source code
I modified go-ethereum source code and built it. I am wondering if I want to test and run geth with the modified source code in mainnet or testnet, and how it works in the mainnet or testnet.
How to ...
0
votes
1
answer
610
views
connecting geth to web3.go 1.0 via websockets or HTTP
Is there anyThing similar to web3.js written in go that allows me to communicate with the geth client ?
0
votes
0
answers
277
views
Balance from ethereum accounts on geth disappears
I have geth private network with 3 accounts A, B and C.
each account has 100, 200 and 300 ether balance
I connected to this network from Metamask and Transferred the balance of 50 eth from account A ...
0
votes
1
answer
3k
views
go-ethereum event subscriptions doesn't work?
I'm new to go-ethereum and even Golang in general so my terminology might be wrong, I'm guessing event handling is also referred to as "subscription"? Anyways, my actual issue is that I want to test ...
0
votes
1
answer
385
views
How to immediately close ethclient.Client RPC sockets so they don't linger in TIME_WAIT status on server?
My server is running out of available sockets while I am using goroutines (limited to 100 concurrently) because once a goroutine finishes the ethclient.Client socket stays open in TIME_WAIT status for ...
0
votes
1
answer
664
views
SubscribeFilterLogs - cannot unmarshal array into Go value of type types.Log
i have a problem to get the Logs. Here is the Code:
query := ethereum.FilterQuery{
Addresses: []common.Address{contractAddress},
}
ctx := context.Background()
ethereumLogsCh := make(chan ...