client: add gasperblock getter
It's an important chain parameter.
This commit is contained in:
parent
87d4939093
commit
7990fa1b61
2 changed files with 21 additions and 0 deletions
|
@ -25,3 +25,12 @@ func (c *Client) GetNNSPrice() (int64, error) {
|
|||
}
|
||||
return c.invokeNativeGetMethod(nnsHash, "getPrice")
|
||||
}
|
||||
|
||||
// GetGasPerBlock invokes `getGasPerBlock` method on a native NEO contract.
|
||||
func (c *Client) GetGasPerBlock() (int64, error) {
|
||||
neoHash, err := c.GetNativeContractHash(nativenames.Neo)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("failed to get native NEO hash: %w", err)
|
||||
}
|
||||
return c.invokeNativeGetMethod(neoHash, "getGasPerBlock")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue