Categories: CRYPTOCURRENCY

by admin

Share

Categories: CRYPTOCURRENCY

by admin

Share

Solana Blockchain is a Vanilla JavaScript mini application using HTML and Ajax CDN.

Vanilla JavaScript “indicates that there is no method called” Getrecentblockhash “available in the” Connection “link, probably due to a compatibility problem or outdated directory.

Here’s an article that needs to help solve the problem:

**

Error message:

Solana: failed to get recent blockhash: Method not found at Connection.getRecentBlockhash on vanilla javascript mini app

`

CONNECTION.GETRECENTBOKHASHAST FIVE ON VANILLA JAPSCript

`

Solution:

  • Check the libraries used:

    You can check

2.

Here’s an example:

`Javascript

Const Connection = New Web3Connection (URL); // Replace the Solana wallet URL

Async Functionalblockhash () {

CONST RECENTHASH = Wait for contact.getecentblockhasasync ();

Return recenthash;

}

Code example:

`html

Solana Lottery

Go to Top