I want data from return smart contract so that i can use it in client side
2 Answers
const CreatedAccountPubkey = new anchor.web3.PublicKey("5rLPJrgrNyWZ3TwvbcJvGmV5qaJdBZ9c72dG3cCbywzW");
const Account = await program.account.data.fetch(CreatedAccountPubkey);
console.log("Authority ", Account.authority.toString());
This action does not consume SOL
The answer is obviously Yes.
Could you add more details on what you want to achieve?
For example, https://solanacookbook.com/guides/get-program-accounts.html#filters
using solana web3.js you can retrieve all program accounts data stored on the chain so you can display it on your client side(say users' browser)