Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
2 votes
1 answer
463 views

Subscribe to events using local geth in light mode?

I've followed this guide to subscribe to events. I succesfully subscribed to the new block headers using Infura provider. But when I try to use local geth node syncing in light mode, it connects, but ...
Ivan Zakharov's user avatar
2 votes
2 answers
582 views

Golang Equivalent to list accounts on node - web3.eth.Accounts()

Does anyone know if its possible to get a list of the accounts on a node using golang, after Dialing to the node, basic PoC would be assuming the accounts are already unlocked via the CLI Basically ...
Kravitz's user avatar
  • 447
2 votes
1 answer
3k views

ethereumjs-abi equivalent for Golang?

ethereumjs-abi is great for easily ABI encoding and decoding in javascript. Is there an equivalently simple package for Golang? Geth's accounts/abipackage does this, but there's a lot of setup and it'...
Steve Ellis's user avatar
  • 1,367
2 votes
1 answer
930 views

How to run local VM from golang?

I am going to run the virtual ethereum machine from the code, pass to it a compiled smart contract code. But I do not know how to do it. It's my code: package main import ( "context" "...
EricEnticman's user avatar
2 votes
1 answer
2k views

How to send signed transaction to Ropsten through INFURA in Golang

I want to send and broadcast a signed transaction by sender to the Ropsten network through INFURA in Golang. I was able to send a signed transaction and recieved a response from INFURA as per below, ...
A. Take's user avatar
  • 424
2 votes
1 answer
1k views

Using Golang how to get the number of transactions in a block

I cant seem to find any way to get the number or transactions within a block using the block number in golang.. anyone have any idea how to do this
Kravitz's user avatar
  • 447
2 votes
1 answer
1k views

Developing native dapps with Go

so I was looking around for a decent up-to-date tutorial to start developing native dapps (C++ or GO doesn't really matter), but I can't seem to find a concise tutorial rather than this one. Can ...
Elio Decolli's user avatar
2 votes
1 answer
323 views

How to modify the gasLimit of the private block chain on the console

as the title,How to modify the "gasLimit" of the private block chain on the console?
mike's user avatar
  • 21
2 votes
3 answers
1k views

Frameworks or Alternatives to create smart contracts/ETH using Golang

Hi guys I'm new to smart contracts, and I'm experimenting with Ethereum. I would like to use golang in my developments so: Are there frameworks for developing smart contracts with Ethereum using go? ...
user avatar
2 votes
1 answer
2k views

Geth 1.4.10 invalid command line parameters

I've upgraded my geth client to version 1.4.10-stable-5f55d95a (from 1.3.5) and now it won't run with the following command line arguments (the documentation is lackluster when it comes to describing ...
Sebi's user avatar
  • 5,284
2 votes
1 answer
459 views

Generate r, s, v permit signature variables off chain using Golang

I'm trying to generate a signature in line with https://eips.ethereum.org/EIPS/eip-712 so that I can permit spending of tokens without having to call Approve() first. this is my code so far: func ...
PopFendi's user avatar
2 votes
1 answer
725 views

How to use contractAbi.Unpack to parse raw log data into a log type struct

I am following the guide here but I am not able to replicate what is being done in the guide. var transferEvent LogTransfer err := contractAbi.Unpack(&transferEvent, "Transfer", vLog....
SelfLearnedNoob's user avatar
2 votes
1 answer
2k views

Transaction Effective Gas Price

I am developing in Go and I have a question that I have been looking for the solution for a long time and I am not able to find it. How can I find the effective gas price used in the transaction? Not ...
alopez's user avatar
  • 21
2 votes
1 answer
1k views

Cannot get transaction's field "From" using Golang

How I can get transaction's field "From"? client, err := ethclient.Dial("https://mainnet.infura.io") if err != nil { log.Fatal(err) } blockNumber := big.NewInt(5671744) block, err := client....
user7851819's user avatar
2 votes
1 answer
540 views

go lang installation error - raspberrypi

I needed to create privatenet in raspberrypi and installed go1.9. Cloned geth, extracted it. When 'make geth' command is passed I get following error. Please help me out github.com/ethereum/go-...
angelmaria's user avatar
  • 1,061
2 votes
1 answer
605 views

How to convert MEW signature to go-ethereum acceptable signature for verification

NOTE: Sorry in advance, some links are without https:// and have sign / turned to \ because I don't have enough reputation to post more than 2 links) I want to verify the signature made on MEW (link) ...
Azaryan's user avatar
  • 131
2 votes
2 answers
3k views

How to access the event log by knowing the contract address (golang)?

At the moment I develope dapps that use smart contract as storage for specific data. I use abigen to generate specific go binding to my contract. If someone try change state of the contract I use ...
Юра Коломиец's user avatar
2 votes
1 answer
718 views

How to setup the account manager type to sign transactions in Go?

TL;DR: I've setup a private Ethereum node, and I want to send a signed transaction to it. By reading the docs I know that there's an account Manager type which can access a Wallet type which has a ...
thanos's user avatar
  • 854
2 votes
1 answer
455 views

Create IPC Client

I just recently updated my local repo of go-ethereum to commit 8ec6ccc54d1da7bbaa87bd0b489b1778ea729c90 I previously used the IPC Client like this in my code: var client rpc.Client if len(...
MethDamon's user avatar
  • 803
2 votes
1 answer
475 views

How are addresses created if deploying a new bound contract

How exactly are the contract addresses created that are returned by the DeployNewXYZ() method a bound contracts? Is it possible that, if the method is called rapidly consecutively, the same address is ...
MethDamon's user avatar
  • 803
2 votes
1 answer
125 views

Why is the same set of bytes encoded base58 differently?

I want to generate a bip32 private root key based on bip39 seed. I found an article with python code, copied it to myself and executed it, getting a valid private root key (checked here). Then I wrote ...
Mod diller's user avatar
2 votes
0 answers
487 views

Simulate transaction replacement on go-ethereum SimulatedBackend

i'm writing in go-lang and using go-ethereum package to interact with nodes. For testing purposes go-ethereum provides blockhchain simulation via SimulatedBackend (https://github.com/ethereum/go-...
Andrey Obruchkov's user avatar
2 votes
0 answers
1k views

Getting ALL pending tx from txPool

I'm working on top of geth in golang. My first goal would be to stream all pending transactions from the txPool. The problem is that when I run my script, I can't manage to catch 100% of pending ...
kms kms's user avatar
  • 21
2 votes
0 answers
215 views

Subscribe to smart contract using go-ethereum

I am trying to subscribe to certain smart contract using go-ethereum. Here is the example of my function client, err := ethclient.Dial(config.AppConfig.SmartcontractHost) if err != nil { log.Fatal(...
Yur Gasparyan's user avatar
2 votes
0 answers
468 views

Reading TxPool using GO

Hello I am trying to learn Go and have not been able to figure out how to get pending transactions. I was reading the following link but I am not sure what I should be importing: https://geth.ethereum....
marrrrrrk's user avatar
2 votes
1 answer
613 views

Problem with deploying the precompiled contract bytecode in genesis.json file

I am trying to add this simple test contract dumb.sol to my genesis.json file. pragma solidity <0.8.6; contract Dumb { string public name; string public symbol; constructor() { ...
Sakon Thephamongkhol's user avatar
2 votes
1 answer
305 views

UnhandledPromiseRejectionWarning: Error: nonce generation function failed or private key is invalid in Ganache

In Go I am using go-ethereum to read data from the ethereum smart contract. My smart contract is maintained with truffle. I am trying to fetch candidate information based on candidate id. I have a ...
NinjaMAN's user avatar
  • 419
2 votes
0 answers
34 views

How to reduce corruption in developing countries using Ethereum [closed]

I would like an honest opinion on whether or not the picture below is self-explanatory. I would also like to know what more functionalities I can add to reduce the capital flight by government ...
Neel Modi's user avatar
2 votes
0 answers
82 views

How to add or modify account_signTransaction function

In this github.com/ethereum/go-ethereum/accounts/external/backend.go of Ethereum project i see the "account_signTransaction" function and i want to edit or update the logic for this function, where ...
Mark Nguyen's user avatar
2 votes
0 answers
1k views

No contract code at give address

Its a bit of a long question... I am using Go to deploy a Smart Contract using the following code: client, err := ethclient.Dial("http://localhost:8545") if err != nil { errorhandler.HandleErr(...
user3536523's user avatar
2 votes
1 answer
963 views

Invalid transaction signature on sending transaction

Hello guys I'm having a "Invalid transaction signature." error. Can't get pass this one. Am I missing something? client, err := ethclient.Dial("path/to/geth.ipc") if err != nil { return err } ks :...
emurmotol's user avatar
2 votes
1 answer
247 views

Transactions Mined Status in Go Lang

I have a private block chain setup. I am calling a smart contract method from Go Lang. I my code in GoLang should wait until the transaction got mined. How I can achieve that. Regards AKM
Amit Modi's user avatar
  • 321
2 votes
1 answer
695 views

getTransactionByHash function is not available in the go-ethereum package

In have downloaded go-ethereum package and made the private network. I am able to make changes in the code as per my requirement and it is also working fine. However, ethereum_js.go file has the ...
userven's user avatar
  • 201
1 vote
2 answers
3k views

Is it possible to create a unique hash inside geth?

When we make a transaction call, we get the transaction hash right away. As mentioned here we could not get transaction's hash inside the contract's function. Would it be good idea to set a variable ...
alper's user avatar
  • 8,404
1 vote
1 answer
5k views

bower vs web3 vs nodejs vs golang apis

What benefits does the use of following bring to my Ethereum application if I wish to interact smart contracts for sending multiple transactions, upload files on blockchain, etc.? bower web3js ...
Gagan's user avatar
  • 433
1 vote
1 answer
213 views

Compiling two smart contracts it the same folder cause duplicates

When I compile two contracts in the same folder I get duplicates. The following contracts, Store.sol pragma solidity ^0.8.0; contract Store { event ItemSet(bytes32 key, bytes32 value); ...
pigfox's user avatar
  • 167
1 vote
1 answer
522 views

The EVM throws an error "invalid opcode 0x1c" [duplicate]

I have written a simple smart contract that allows to store a string, and I'am trying to use go-ethereum(which is similar to web3j). When I execute a transaction, I have this error VM returned ...
MS B's user avatar
  • 196
1 vote
1 answer
2k views

Local caching database for fast retrieval

I'm currently working on dApps for a private blockchain based on ethereum. While it works fine and the dApps really show the power of the blockchain it lacks the speed and versatility of a SQL ...
just_trying_stuff's user avatar
1 vote
2 answers
148 views

How to analyze a tx data?

Given a transaction of type types.Transaction (golang go-ethereum), how can I analyze the data field and check if it has a swap or a sync event? I know that ...
AnastasiaShishkova's user avatar
1 vote
1 answer
1k views

How to calculate CREATE2 address in golang?

I have a factory pattern smart contract that creates other smart-contracts by cloning the master smart contract via Minimal Proxy Contract and CREATE2 opcode. What is the proper way to calculate ...
navigante's user avatar
1 vote
1 answer
2k views

Connecting my Golang Backend server with Metamask

I'm trying to build a Ticket-Office project in one of my courses at the University. The project uses a backend server (which I'm writing in Golang) and it should be able to deploy and use smart ...
Daniel Shterenberg's user avatar
1 vote
1 answer
2k views

Golang binding - call contract method and get its return value or tuple?

Suppose i have contract like: pragma solidity ^0.4.11; contract MyToken { uint256 a; function SimpleGetter() returns(string) { return "something"; } function DoTheGreat(address _to) ...
Croll's user avatar
  • 115
1 vote
1 answer
2k views

go-ethereum keccak256 multi value byte slice does not match solidity keccak256

I have a smart contract with the following function: function testHash( address _sender, uint8 _method, uint256 _number, uint256 _amount) public returns (bytes32) { ...
hextet's user avatar
  • 1,593
1 vote
1 answer
735 views

Adding JSON-RPC call in geth

I want to build a custom version of geth that provides a new JSON-RPC call to clients. It looks like there are two pieces to make that happen: (1) a Go implementation in internal/ethapi/api.go, and (...
Paul Steckler's user avatar
1 vote
1 answer
3k views

Get ERC20 Tokens Transferred Information from Transaction Hash

I am building very simple Golang program to get transaction details from HASH. I am able to get the information of any transaction but I am unable to get information what ERC20 token was transferred ...
Sallu's user avatar
  • 175
1 vote
1 answer
1k views

Subscription for newBlocks golang

I have followed this guide and wrote the same code but instead of getting the latest block, I am getting this, Subscription Failed => The method newBlocks_newBlocks does not exist/is not ...
Hafiz Atif's user avatar
1 vote
3 answers
4k views

Create Ethereum Account using golang

I want to create ethereum account using golang. I am following this guide but I am stuck with errors just at the beginning of code. accountManager:=accounts.NewManager(".ethereum/rinkeby/keystore",...
Hafiz Atif's user avatar
1 vote
1 answer
3k views

Using go to make a contract call without private key like web3 does?

I'm working on moving a node project of ours over to a go project and I've run into an issue: web3.eth.defaultAccount = web3.eth.accounts[0]; In node using web3 this is all I had to do for every ...
Corey Ogburn's user avatar
1 vote
1 answer
161 views

The official library for work with ethereum payments

I looking for way to generate ether wallet (priv-pub pair), handle incoming transaction to that wallet and make/push to network transaction from it. How to do that via go-ethereum or pyethereum (full ...
Vassily's user avatar
  • 79
1 vote
1 answer
667 views

go-ethereum rpc connection via http for native dapps

For native dapps we can establish an rcp connection over IPC using conn, err := rpc.NewIPCClient("/home/karalabe/.ethereum/testnet/geth.ipc") Now what if I want to establish an rpc connection over ...
Arijoon's user avatar
  • 143