[Solved] Uncaught (in promise) TypeError: Cannot read property 'getContractInstance' of null

Uncaught (in promise) TypeError: Cannot read property ‘decode’ of undefined
Uncaught (in promise) TypeError: Cannot read property ‘getContractInstance’ of null
i’m following Dacade101
@moritzfelipe any help ???
async function callStatic(func, args) {
//Create a new contract instance that we can interact with
const contract = await client.getContractInstance(contractSource, {contractAddress});
//Make a call to get data of smart contract func, with specefied arguments
const calledGet = await contract.call(func, args, {callStatic: true}).catch(e => console.error(e));
//Make another call to decode the data received in first call
const decodedGet = await calledGet.decode().catch(e => console.error(e));
return decodedGet;
}

Hi @Goodness, what AE SDK are you using? And what URL for compiling?

i’m using the js browser sdk
on the dacade course there wasn’t anything like url for compileing

It looks like your client is not initialized properly. How did you create client?

client = await Ae.Aepp();

this has been solved thanks