My script breaks at a contract function call on line number 250 with an error :
but the connection.getLatestBlockhash works on line number 241: with this on the console :
My script breaks at a contract function call on line number 250 with an error :
but the connection.getLatestBlockhash works on line number 241: with this on the console :
I did not declare provider at the start, you can do this by
anchor.setProvider(anchor.AnchorProvider.env());
Try using a new RPC provider like Helius for your connection string.