简体   繁体   中英

Not able to deploy solana smart contract over devnet

I have followed below steps to deploy my smart contract over solana de.net but i am facing Blockhashed Expired: 5 retries remaining.

I have followed below steps to deploy my smart contract over solana de.net but i am facing Blockhashed Expired: 5 retries remaining.

  1. solana-keygen new --outfile solana/my_wallet.json --force

  2. solana config set --url de.net

  3. solana airdrop 2 0xxx.... 0xxxx [and get sufficient balance upto 10 sol]

  4. anchor build

  5. solana address -k target/deploy/my-keypair.json

  6. Copy programId and updated my Anchor.toml file as well as Lib.rs file [declare_id]

  7. Set cluster and programs to de.net in Anchor.toml file

  8. anchor build

  9. I updated programId in idl file as well.

  10. anchor deploy --provider.cluster de.net

How to resolve this issue?

  • this might be one issue

    solana address -k target/deploy/my-keypair.json

file name should include your contract name. this is the syntax

yourContractName-keypair.json
  • you should also add this to anchor.toml

     cluster = "de.net" wallet = "./my_wallet.json"

It looks like you're using the Public RPC. One possible cause of this issue is that the public de.net RPC is overloaded.

You might want to try a private RPC. You can try using a service like Quicknode , which has private Solana de.net RPCs and a free tier you can use for this purpose.

Then, once you have the URL to your private node, you use:

solana config set --url https://quicknode.com.....{insertrestofurl}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM