Skip to content

Commit

Permalink
Merge pull request #83 from icon-project/mksong-feature-getnetworkinfo
Browse files Browse the repository at this point in the history
Add IconService.get_network_info()
  • Loading branch information
sink772 committed Jun 21, 2023
2 parents c52784a + bf6e3da commit 427e1cf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion iconsdk/icon_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,4 +530,14 @@ def monitor(self, spec: MonitorSpec, keep_alive: Optional[float] = None) -> Moni
in fraction of seconds
:return: Monitoring handle
"""
return self.__provider.make_monitor(spec, keep_alive)
return self.__provider.make_monitor(spec, keep_alive)

def get_network_info(self) -> dict:
"""
Returns basic network information
Delegates to icx_getNetworkInfo RPC method.
https://github.com/icon-project/goloop/blob/master/doc/jsonrpc_v3.md#icx_getNetworkInfo
:return: Basic network information
"""
return self.__provider.make_request('icx_getNetworkInfo')

0 comments on commit 427e1cf

Please sign in to comment.