I try to get smart-contract storage data:


  eztz.contract.watch(addr, 2, function(s){
    console.log("New storage", s);

But got an error: TypeError: contract.storage is not a function

Also I tried to find API method for this on tzscan.

Any idea for receive storage data?

Thanks in advance for your help

3 Answers 3


I found the solution!

For me it:

function httpGet() {
    let xmlHttp = new XMLHttpRequest();
    xmlHttp.open( "GET", 'https://alphanet-node.tzscan.io/chains/main/blocks/head/context/contracts/<CONTRACT_ADDRESS>/storage', false ); // false for synchronous request
    xmlHttp.send( null );
    return JSON.parse(xmlHttp.responseText)

It returns JSON object with storage data.


Tzscan has joined the Dune network and APIs can change quite dramatically, which will break your app. Why not using Taquito? It is simple and elegant and the package being bundled with your app, it won't break if there is an update.

import { Tezos } from "@taquito/taquito";
const contract = await Tezos.contract.at(contractAddress)
const storage = await contract.storage();

And that's it, in addition of having an easy access to the storage, you can also search your Maps/BigMaps for keys/values :)


You can use eztz function as that worked for me,

storage = await eztz.contract.storage(contractAddress);

The output will be in JSON format, you can stringify the output as,


Hope that will help you. Good luck...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.