Hi,
- I am following the docs to build stateful smart contracts . When trying to to fetch and read global state of the smart contract using the method mentioned in the docs, it is giving me an error.
When looking at the app-details, i see that there is no global-state.
The approval program and clear program are exactly as given in the docs.
Any advice on how to fetch the global state?
The screenshot of error:
Code to read app global state
def read_global_state(client, addr, app_id):
print("\n--------------------- Global State ---------------------")
results = client.account_info(addr)
apps_created = results['created-apps']
for app in apps_created :
if app['id'] == app_id :
print(f"global_state for app_id {app_id}: ", app['params']['global-state'])
- In the global state, can the Value in the key value pair be strings? If yes, is there any limit on the number of strings length of string that is stored in the value?


