Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
1 vote
0 answers
83 views

Getting Blockchain Domains From Transaction Hashes

I am compiling a list of some blockchain domains (.eth, .crypto, etc.) and was wondering what would be the best approach. My strategy is to take something like this: https://etherscan.io/address/...
goEthDevvv1's user avatar
3 votes
1 answer
5k views

How do I increase the amount of memory geth can use for cache?

I'm running geth on a system with 96GB of memory, soon to be bumped up to 192GB. I currently start geth with --cache 32768 but I plan to double it when my memory is upgraded. However, I've noticed ...
Broseph's user avatar
  • 695
1 vote
0 answers
61 views

Geth's golang contract bindings need "RPC subscription features that are still under review" to process event logs. What are those features?

The documentation for Geth's golang contract bindings start out with Please note, events are not yet implemented as they need some RPC subscription features that are still under review. What ...
Alex Coventry's user avatar
0 votes
1 answer
83 views

Infura node seems to crash when tryining to deploy contract

I am trying to deploy a contract and run some tests on the functions within it. Here is what my code currently looks like: package main import ( "context" "crypto/rand" "encoding/hex" ...
0xsegfault's user avatar
  • 1,260
0 votes
1 answer
32 views

Balance returning zero after sending KETH to it

I have sent the following transactions to the account 0x2D76d8729F9Cfa5bC3CEba8a504400FE30bb53D2: 0x8667bd1859a5ccc99bcc77b38c5453195bf32b308b4038ae409b47b002546344 ...
0xsegfault's user avatar
  • 1,260
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
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 ...
JongH's user avatar
  • 73
0 votes
1 answer
3k views

Decode transaction inputs with go-ethereum

When making a contract transaction using go-ethereum (golang) how can I decode the transaction inputs. Specifically Given a tx.Data []byte , the contract's contractABI abi.ABI and the method that ...
Nico Vergauwen's user avatar
0 votes
1 answer
323 views

How is Ethereum Virtual Machine (EVM) isolated (sandboxed)?

I always had this question in mind: What are the used technologies, in order to achieve the isolation of the EVM? does it just run as an isolated process in its own namespaces using the linux feature ...
icy3's user avatar
  • 98
2 votes
1 answer
2k views

Different outputs for Keccak256(), which one is right?

To get a value from contract storage I used this geth code succesfully: var contractAddress = '0x88e726de6cbadc47159c6ccd4f7868ae7a037730' var index = '...
Juan Ignacio Pérez Sacristán's user avatar
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
1 vote
0 answers
79 views

Retrieving a State_object value on go-ethereum

I have a deployed contract address and I need to query a contract storage value, a token account balance that is stored on a mapping variable: mapping (address => uint256) balances; From go-...
Juan Ignacio Pérez Sacristán's user avatar
0 votes
1 answer
1k views

Is there a web3 api written in golang to interact with Eth nodes?

I'm looking for a library that can easily interact with Ethereum nodes that is similar to Web3.js. go-ethereum is written entirely in go so I would of thought I could write scripts pretty easily.
Cer Hewer'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
446 views

How can I make new account by JSON-RPC of Go

I'd like to make new account by JSON-RPC.I've checked the wiki of Ethereum, however I could not find out how to do that. I've found call existed accounts, but it isn't what I want. eth_accounts ...
steven's user avatar
  • 11
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
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
255 views

How to programmatically check the type of Ethereum node/backend that I'm connected to using Go?

I'm aware that I can do this using CURL like so: curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}' https://the-node-ip-...
Zulhilmi Zainudin's user avatar
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 ?
MS B's user avatar
  • 196
3 votes
1 answer
278 views

How to get an evm reference inside go-ethereum GetBalance function?

In order to modify GetBalance function to fork go-ethereum, I find difficulties to get a reference of the running evm. The function has a reference for self *StateDB: func (self *StateDB) GetBalance(...
Juan Ignacio Pérez Sacristán's user avatar
0 votes
1 answer
127 views

Reading genesis config on GoLang

In a custom fork of Ethereum my team is developing, we need to read a new config parameter from genesis block. At https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/runner.go#L100 the code ...
Juan Ignacio Pérez Sacristán's user avatar
4 votes
1 answer
3k views

Calling contract method internally from geth code

On developing a custom geth fork there is the need to call a specific hardcoded smart contract when ETH transfer occur. This is not an Ethereum normal behaviour but a new feature we want to implement ...
Juan Ignacio Pérez Sacristán'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
0 votes
1 answer
540 views

Genesis allocation and (address, balance) tuples

On go-ethereum souce code at core\genesis_alloc.go(19): ... package core // Constants containing the genesis allocation of built-in genesis blocks. // Their content is an RLP-encoded list of (...
Juan Ignacio Pérez Sacristán's user avatar
1 vote
0 answers
196 views

Handling EOF when subscribing to Event Logs

I'm trying to subscribe to events logs to handle Transfer(address,address,uint64) events. I've followed this example. https://github.com/miguelmota/ethereum-development-with-go-book/blob/master/en/...
Daniel Sarosi's user avatar
1 vote
1 answer
298 views

How to parse input data in transaction using go programming language?

I know there are some resolutions about parsing transaction input data, but they don't work with go. I wander if there is any way i can use with abi available. Specifically, When i receive a ...
Jocelyn's user avatar
  • 71
8 votes
6 answers
5k views

Given a RAW Transaction - how to get senders address

Is it possible to get the senders address using golang when all you have is the raw transaction string. I can decode it and get the nonce, hash, to etc as these are all exported functions from the ...
Kravitz's user avatar
  • 447
0 votes
1 answer
868 views

Converting Log Topics to int64 correctly in Go

I currently use the code below to extract the ERC721 Token ID from Transfer Event Logs: txHash := newLog.TxHash.Hex() hexString := common.BytesToAddress(newLog.Topics[3].Bytes()).Hex() flowerNum, _ :=...
P A S H's user avatar
  • 138
0 votes
1 answer
373 views

How does one go about implementing the ContractTransactor interface from the bind package in go-ethereum?

Hey guys thanks in advance! Here is the interface provided by the go-ethereum library in the bin package. I need an example on how to implement this interface please :) // ContractTransactor ...
Mr.Blonde's user avatar
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 ...
Jagdish0886's user avatar
2 votes
2 answers
6k views

GoEthereum getting public key from private key hex formatting

So I am trying to get public key in hex formatting. In some documentation I found the following will give public key from the private key, but it is not formatted correctly as I can see: publicKey := ...
Chipe's user avatar
  • 259
2 votes
1 answer
3k views

goethereum getting publicKeyBytes from given public key

Trying to follow this documentation on verifying a signature: https://goethereumbook.org/signature-verify/ Where I am a bit confused is this line: publicKeyBytes := crypto.FromECDSAPub(...
Chipe's user avatar
  • 259
0 votes
1 answer
78 views

Private ethereum network account related query

Please help with below queries: how to reset the paraphrase for an account on private ethereum network Is there a way to delete an account on private ethereum network How to enable the etherscan url ...
Jagdish0886's user avatar
0 votes
0 answers
239 views

Metamask to Private ethereum communication issue [duplicate]

When i connect to my private ethereum network using the 'Custom RPC' of the metamask, it is getting connected from the MetaMask. FYI, i am connecting from outside the network of my server, and all ...
Jagdish0886's user avatar
1 vote
1 answer
6k views

How to fix "unexpected directory layout" error when Installing go-ethereum?

All, I hope this question belongs here. I am following a Blockgeeks tutorial, trying to set up my environment for Ethereum blockchain development. I have basically gotten to the final step, ...
dillon.harless's user avatar
0 votes
1 answer
1k views

How to use event log in solidity contract using go language

I have created ethereum smart contract using go language. Smart contract successfully deployed. I have a created many transactions on ethereum private network. But I confuse how to get event log.
vasudev patel'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
3 votes
1 answer
3k views

How to convert string to type defined by an abi.Type for payload construction?

I am writing a CLI in Go that should faciliate users to be able to make contract function calls from it. This entails generating contract ABIs and providing input parameters to the function arguments ...
Shiri's user avatar
  • 826
0 votes
1 answer
3k views

How to correctly send RPC call using Golang to get smart-contract owner?

Update 12 November 2018 Someone shared a very close solution to what I was looking for here. Update 10 November 2018 Since I'm not able to achieve this using the approach in this question, I ...
Zulhilmi Zainudin'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
0 votes
1 answer
1k views

How do I check the Ethereum balance and unique transactions count of a Smart Contract over a period of time?

Basically I want to be able to track smart contracts balance and unique transactions over a period of time such as , last 24hours, last hour and so. What would be the best approach into doing this? ...
Demeterca Ionuţ-Alexandru's user avatar
0 votes
2 answers
144 views

Token transfer not dropped no event on MetaMask

I am using the following contract Fixed Contract Example And using this example to transfer token Transfer token example Everything goes fine, i see no error what so ever except MetaMask doesn't ...
TheeCodeDragon's user avatar
0 votes
2 answers
499 views

Golang - alloc large Wei amount to address

Im modifying the puppeth genesis wizard file for my own use case. I want to be able to assign a pre-set amount in Wei to a few chosen addresses.. Im having some trouble figuring out how to format the ...
Kravitz's user avatar
  • 447
1 vote
1 answer
2k views

Golang How to slice Ethereum log events from smart contract to a more readable format

Im looking to use a channel to watch contract log events but the output returns a byte array like this the go code i am using looks like this package main import ( "...
Gizzard's user avatar
  • 73
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
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
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
1 vote
1 answer
687 views

Is it possible to get bytecode from the evm in golang?

Imagine this scenario, I have a contract that has a function where I call with runtime.Call(). But this function returns an address of a newly created contract, but not the bytecode as runtime.Create ...
Jonathan Gimeno's user avatar
3 votes
0 answers
191 views

Getting error message from require() using golang, and go-ethereum?

From everything I've been able to find, the only way you can get the error message from require() is by using remix which isn't practical for dealing with production issues. Therefore, I'm wondering ...
hextet's user avatar
  • 1,593
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 ...
Elio Decolli's user avatar