1

I want data from return smart contract so that i can use it in client side

1
  • Adding more details here would be really helpful to guide you in the right direction. Commented Sep 13, 2022 at 10:23

2 Answers 2

1
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

0

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)

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.