Open Pfed-prog opened 6 months ago
I have further dug into the available code and tutorials
I think the key issue has been so far that not many of the examples work on an actual testnet
Hence, the following coding pattern from the docs is missed - https://docs.minaprotocol.com/zkapps/o1js/interact-with-mina
// send transaction, log transaction hash
let pendingTx = await tx.send();
console.log(`Got pending transaction with hash ${pendingTx.hash()}`);
// wait until transaction is included in a block
await pendingTx.wait();
// our account updates are applied on chain!
Gm, I am trying to understand how to get a value back from a contract
The function in an ideal case would provide an ability to read the data the contract returns.
However the best i could get is call
txn.toPretty()
which returns a large json with the correct values hidden in preconditions