2

My script breaks at a contract function call on line number 250 with an error : enter image description here

but the connection.getLatestBlockhash works on line number 241: enter image description here with this on the console : enter image description here

2
  • does this work calling it subsequently one after another?
    – Jimii
    Commented May 14 at 10:10
  • Now it works, i missed declaring the provider. Commented May 17 at 9:39

2 Answers 2

1

I did not declare provider at the start, you can do this by

 anchor.setProvider(anchor.AnchorProvider.env());
0

Try using a new RPC provider like Helius for your connection string.

1
  • 1
    Thankyou for your recommendation, but the RPC service provider was not the issue, I didn't declare the provider only in my setup. Commented May 14 at 12:59

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.