Skip to content

Commit d6bd20b

Browse files
author
lizekun
committed
sendRawTransaction
1 parent 5dc194d commit d6bd20b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

geth.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package etherscan
22

33
import (
4+
"github.com/ethereum/go-ethereum/common/math"
45
"math/big"
56
"strconv"
67
)
@@ -15,9 +16,11 @@ func (c *Client) GetBlockByNumber(blockNum int64) (block Block, err error) {
1516
return
1617
}
1718

18-
func (c *Client) GasPrice() (price *BigInt, err error) {
19+
func (c *Client) GasPrice() (price *big.Int, err error) {
1920
param := M{}
20-
err = c.call("proxy", "eth_gasPrice", param, price)
21+
result := ""
22+
err = c.call("proxy", "eth_gasPrice", param, &result)
23+
price, _ = math.ParseBig256(result)
2124
return
2225
}
2326

0 commit comments

Comments
 (0)