Skip to content

Commit 9050307

Browse files
author
lizekun
committed
check null result
1 parent 9c37eea commit 9050307

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

geth.go

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

33
import (
4+
"math/big"
45
"strconv"
56
)
67

@@ -13,3 +14,9 @@ func (c *Client) GetBlockByNumber(blockNum int64) (block Block, err error) {
1314
err = c.call("proxy", "eth_getBlockByNumber", param, &block)
1415
return
1516
}
17+
18+
func (c *Client) GasPrice() (price *big.Int, err error) {
19+
param := M{}
20+
err = c.call("proxy", "eth_gasPrice", param, price)
21+
return
22+
}

0 commit comments

Comments
 (0)