All Questions
12 questions
1
vote
0
answers
104
views
Why is the TransactionByHash function in the go-ethereum client unable to return the sender?
I learned how to get the sender's address from this question. JSON-RPC returns a result with a from field, which we can unmarshal in our struct.
But I'm curious why go-ethereum didn't return ...
1
vote
0
answers
642
views
How to add a custom JSON RPC endpoint to geth?
I would like to add custom RPC method to geth. I found this question:
How to add a custom JSON-RPC endpoint to geth?. But it does not work...
What I did:
1. https://github.com/ethereum/go-ethereum
2. ...
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 ...
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 (...
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, ...
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 ...
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 ...
3
votes
1
answer
913
views
send a tx, json rpc, golang
I tried to send a tx via geth json rpc using the following code. But the geth rpc server response with "Invalid sender".
I also tried HomesteadSigner. In that case there is no error received, but I ...
5
votes
1
answer
3k
views
ethereum-go how to get the latest block?
I've set up a private local Ethereum node with just a genesis block I made, and I have this Go code I want to run on the private local network:
package main
import (
"fmt"
"math/...
3
votes
1
answer
2k
views
Encode method signature and parameters using Go-Ethereum
Is there any way to use the Go-Ethereum library to get the string I have to send to JSON RPC to call a contract method. I mean, Go-Ethereum comes with a CLI, so there must be some built-in functions ...
6
votes
2
answers
4k
views
How to communicate with the JSON RPC server programmatically using Go?
Is there a way to interact with the JSON RPC server directly in Go?
I tried the following:
Starting the RPC Server with "geth --rpc"
Running the following code:
package main
import (
"fmt"
...
3
votes
1
answer
481
views
Are there Ethereum API wrappers?
I'm looking into developing some Go software on Ethereum and I'm wondering - are there any API wrappers around for Ethereum (something like BTCSuite's BTCRPCClient is for Bitcoin)? I know there is a ...