在 Solana 程序部署失败后,如何恢复用于出租的 SOL?
Posted
技术标签:
【中文标题】在 Solana 程序部署失败后,如何恢复用于出租的 SOL?【英文标题】:How can I recover the SOL used for rent after a failed Solana program deployment? 【发布时间】:2022-01-06 14:20:32 【问题描述】:我尝试部署 Solana 程序,但失败了,并且我丢失了用于出租的 SOL。有什么办法找回来吗?
Error: Deploying program failed: Error processing Instruction 1: custom program error: 0x1
【问题讨论】:
【参考方案1】:是的!即使部署失败,您用于租用的 SOL 仍然存储在帐户中。
部署失败后,您会收到如下错误:
Recover the intermediate account's ephemeral keypair file with
`solana-keygen recover` and the following 12-word seed phrase:
=================================================================================
this is a fake seed phrase really argle bargle boopity doop face
=================================================================================
To resume a deploy, pass the recovered keypair as the
[BUFFER_SIGNER] to `solana program deploy` or `solana write-buffer'.
Or to recover the account's lamports, pass it as the
[BUFFER_ACCOUNT_ADDRESS] argument to `solana program close`.
=================================================================================
首先从它给你的助记词中恢复密钥对:
# After running this, paste in the seed phrase above
solana-keygen recover -o recover.json
然后您可以关闭帐户以恢复您的 SOL。
solana program close recover.json
【讨论】:
以上是关于在 Solana 程序部署失败后,如何恢复用于出租的 SOL?的主要内容,如果未能解决你的问题,请参考以下文章
在 localhost 上将程序部署到 solana 的问题
什么是用于创建程序可用于执行合同付款的转账账户的 Solana 模式?