gemworks / gem-farm

Configurable staking for NFT Projects on Solana
https://gemfarm.gg/
MIT License
338 stars 252 forks source link

Failed to deploy gem-farm contract #4

Open p-lorenzo opened 2 years ago

p-lorenzo commented 2 years ago

After following the docs on https://docs.gemworks.gg/ i'm getting stuck at deploying te program. when running % anchor deploy --provider.cluster devnet i get the following error:

Deploying workspace: https://api.devnet.solana.com
Upgrade authority: /Users/redacted/.config/solana/id.json
Deploying program "gem_bank"...
Program path: /Users/redacted/stakingfarm/core/target/deploy/gem_bank.so...
Program Id: 7idK2QregNTtsAW9gy1bbL2vwYZ4E154dCjH1MGmMPRM

Deploying program "gem_farm"...
Program path: /Users/redacted/stakingfarm/core/target/deploy/gem_farm.so...
==========================================================================
Recover the intermediate account's ephemeral keypair file with
`solana-keygen recover` and the following 12-word seed phrase:
==========================================================================
redacted passphrase
==========================================================================
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`.
==========================================================================
Error: Custom: Invalid blockhash
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.
SamraatBansal commented 2 years ago

I am facing the same issue even solana deploy is giving

Error: Custom: Invalid blockhash

If you have sorted this out please let me know Thanks

SamraatBansal commented 2 years ago

I resolved it for Farm you need another 9 SOL

It would work!

ducan-ne commented 2 years ago

I resolved it for Farm you need another 9 SOL

It would work!

Hi what "I resolved it for Farm you need another 9 SOL" means, I'm new for blockchains thing, did you mean I mean add 9 SOL to my devnet account?

dshaw002 commented 2 years ago

Yeah. It costs SOL to deploy a program (with it being more expensive the more transactions/complicated a program is). Just airdrop more SOL. (solana airdrop 1 (or 2)) some times.

p-lorenzo commented 2 years ago

How much sol do you think it costs total? When I tried to deploy the contracts I had more than 10 Sol in the authoring wallet but it still failed.

dshaw002 commented 2 years ago

I think it’s around 14-16 SOL? You’re deploying two programs and Gem Bank’s around 6 SOL or so. Just airdrop and have a balance at least 18 and you should be fine.

kpvy2002 commented 2 years ago

use a stable solana cli version

Jack-R-Long commented 2 years ago

@kpvy2002 that solved this issue for me. Using solana-cli 1.8.17 now

ArchTaqi commented 2 years ago

I'm also getting the same error after step by step following the README Guide for deploying own version.

Deploying workspace: https://api.devnet.solana.com
Upgrade authority: /Users/muhammadtaqi/.config/solana/devnet.json
Deploying program "gem_bank"...
Program path: /Users/muhammadtaqi/Projects/gem-farm/target/deploy/gem_bank.so...
msg 5xo7xLxzJX4yp7Qxo5USLSRQtDWv5NizWKbRvZzHnmmW
msg 5xo7xLxzJX4yp7Qxo5USLSRQtDWv5NizWKbRvZzHnmmW
msg 5xo7xLxzJX4yp7Qxo5USLSRQtDWv5NizWKbRvZzHnmmW
msg 5xo7xLxzJX4yp7Qxo5USLSRQtDWv5NizWKbRvZzHnmmW
==============================================================================
Recover the intermediate account's ephemeral keypair file with
`solana-keygen recover` and the following 12-word seed phrase:
==============================================================================
slight supply tiny math rebuild pull planet enhance brown unhappy same erosion
==============================================================================
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`.
==============================================================================
Error: Custom: Invalid blockhash
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.
➜  gem-farm git:(main) ✗ solana config get
Config File: /Users/muhammadtaqi/.config/solana/cli/config.yml
RPC URL: https://api.devnet.solana.com 
WebSocket URL: wss://api.devnet.solana.com/ (computed)
Keypair Path: /Users/muhammadtaqi/.config/solana/devnet.json 
Commitment: confirmed 
➜  gem-farm git:(main) ✗ solana balance 
30.587937256 SOL

➜ gem-farm git:(main) ✗ solana --version solana-cli 1.9.2 (src:devbuild; feat:4100269022) ➜ gem-farm git:(main) ✗ anchor --version anchor-cli 0.19.0

janmallari commented 2 years ago

Anyone here fixed this issue?

Using solana version 1.9.18. I have enough sol on devnet

NikosCha commented 2 years ago

Any update on this ?

NikosCha commented 2 years ago

@janmallari after many hours of try and error I found how to deploy it. Just use version of solana-cli 1.8.16 Version 1.9.18 doesnt work.

janmallari commented 2 years ago

@janmallari after many hours of try and error I found how to deploy it. Just use version of solana-cli 1.8.16 Version 1.9.18 doesnt work.

Nice! Thank you @NikosCha

janmallari commented 2 years ago

@janmallari after many hours of try and error I found how to deploy it. Just use version of solana-cli 1.8.16 Version 1.9.18 doesnt work.

What's your anchor version @NikosCha ?