def totalsupply(conf: dict): """Query total supply of ICX :param conf: totalsupply command configuration """ icon_client = IconClient(conf['uri']) response = icon_client.send(IconJsonrpc.getTotalSupply()) if "error" in response: print('Got an error response') print(json.dumps(response, indent=4)) else: print(f'Total supply of ICX in hex: {response["result"]}') print( f'Total supply of ICX in decimal: {int(response["result"], 16)}' ) return response
def test_getTotalSupply(self): request = IconJsonrpc.getTotalSupply() self.check_jsonschema_validation(request=request)