简体   繁体   English

无法通过 de.net 部署 solana 智能合约

[英]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.我已按照以下步骤在 solana de.net 上部署我的智能合约,但我面临 Blockhashed Expired:剩余 5 次重试。

I have followed below steps to deploy my smart contract over solana de.net but i am facing Blockhashed Expired: 5 retries remaining.我已按照以下步骤在 solana de.net 上部署我的智能合约,但我面临 Blockhashed Expired:剩余 5 次重试。

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

  2. solana config set --url de.net solana 配置集 --url de.net

  3. solana airdrop 2 0xxx.... 0xxxx [and get sufficient balance upto 10 sol] solana airdrop 2 0xxx.... 0xxxx [并获得足够的余额高达 10 sol]

  4. anchor build锚构建

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

  6. Copy programId and updated my Anchor.toml file as well as Lib.rs file [declare_id]复制 programId 并更新我的 Anchor.toml 文件以及 Lib.rs 文件 [declare_id]

  7. Set cluster and programs to de.net in Anchor.toml file在 Anchor.toml 文件中将集群和程序设置为 de.net

  8. anchor build锚构建

  9. I updated programId in idl file as well.我也更新了 idl 文件中的 programId。

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

How to resolve this issue?如何解决这个问题?

  • this might be one issue这可能是一个问题

    solana address -k target/deploy/my-keypair.json solana地址-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你还应该将它添加到anchor.toml

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

It looks like you're using the Public RPC.看起来您正在使用公共 RPC。 One possible cause of this issue is that the public de.net RPC is overloaded.此问题的一个可能原因是公共 de.net RPC 过载。

You might want to try a private RPC.您可能想尝试私有 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.您可以尝试使用像Quicknode这样的服务,它具有私有的 Solana de.net RPC 和可用于此目的的免费套餐。

Then, once you have the URL to your private node, you use:然后,一旦你将 URL 连接到你的私有节点,你就可以使用:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法使用 Truffle Infura 将智能合约部署到测试网 (Ropsten) - Unable to deploy smart contract to testnet (Ropsten) using Truffle Infura 我试图在 ropsten 中部署带有地址参数的智能合约,但该帐户被投诉无效 - I tried to deploy a smart contract with address argument in ropsten, but the account is complained to be invalid 有没有办法在部署之前预先部署从智能合约中部署的库? - Is there a way pre-deploy a library deployed from within a smart contract before it is deployed? 为什么我无法在 Solana 主网上部署程序? - Why I can't deploy program on Solana Mainnet? 通过应用程序访问在Ropsten网络上部署的智能合约 - Access a smart contract that is deployed on the Ropsten network from an App 在rinkeby测试网络上部署固态智能合约的问题 - issues deploying solidity smart contract to rinkeby test network Solana 锚点部署错误。 初始化不应提供碰撞目标。 请使用没有目标的颠簸 - Solana Anchor deploy error. bump targets should not be provided with init. please use bump without a target 无法将 python 代码部署到云端 - Not able to deploy python code to the cloud 无法在App Harbor上部署数据库 - Not able to deploy database on App Harbor 无法将SSIS项目部署到SQL Server - Not able to Deploy the SSIS Project to SQL Server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM