Crowdfunding smartcontract error - General - Algorand

Crowdfunding Smart Contract Error

Post by harish on Jul 19, 2021

Example Crowdfunding Stateful Smart Contract Application

Link - Example Crowdfunding Stateful Smart Contract Application | Algorand Developer Portal

In these link I compile the command


goal app create --creator LHHQJ6UMXRGEPXBVFKT7SY26BQOIK64VVPCLVRL3RNQLX5ZMBYG6ZHZMBE --approval-prog ./crowd_fund.teal --global-byteslices 3 --global-ints 5 --local-byteslices 0 --local-ints 1 --app-arg "int:20" --app-arg "int:1000" --app-arg "int:1000000" --app-arg "addr:"LHHQJ6UMXRGEPXBVFKT7SY26BQOIK64VVPCLVRL3RNQLX5ZMBYG6ZHZMBE --app-arg "int:1000" --clear-prog ./crowd_fund_close.teal -d "C:\users\Dell\AlgorandNode\newdata"

It shows:


No wallets found. Create a new wallet with `goal wallet new [wallet name]`

Then I created the wallet


C:\Users\Dell\AlgorandNode>goal wallet new har
Please choose a password for wallet 'har':
Please confirm the password:
Creating wallet...
Created wallet 'har'
Your new wallet has a backup phrase that can be used for recovery.
Keeping this backup phrase safe is extremely important.
Would you like to see it now? (Y/n): y
Your backup phrase is printed below.
Keep this information safe -- never share it with anyone!

Then I compiled the above command:


C:\Users\Dell\AlgorandNode>goal app create --creator LHHQJ6UMXRGEPXBVFKT7SY26BQOIK64VVPCLVRL3RNQLX5ZMBYG6ZHZMBE --approval-prog crowd_fund.teal --global-byteslices 3 --global-ints 5 --local-byteslices 0 --local-ints 1 --app-arg "int:20" --app-arg "int:1000" --app-arg "int:1000000" --app-arg "addr:"LHHQJ6UMXRGEPXBVFKT7SY26BQOIK64VVPCLVRL3RNQLX5ZMBYG6ZHZMBE --app-arg "int:1000" --clear-prog crowd_fund_close.teal -d "C:\users\Dell\AlgorandNode\newdata"
Please enter the password for wallet 'har':
Couldn't sign tx with kmd: key does not exist in this wallet

Is my create command and arguments I passed are right? Can anyone help me please?

Post by cusma on Jul 19, 2021

In the command line you showed seems you are still using the account LHHQJ6UMXRGEPXBVFKT7SY26BQOIK64VVPCLVRL3RNQLX5ZMBYG6ZHZMBE as application creator.

So, either:

  1. Import the account LHHQJ6UMXRGEPXBVFKT7SY26BQOIK64VVPCLVRL3RNQLX5ZMBYG6ZHZMBE in the new created wallet using its mnemonic phrase.
  2. Substitute the account LHHQJ6UMXRGEPXBVFKT7SY26BQOIK64VVPCLVRL3RNQLX5ZMBYG6ZHZMBE with a new one created in your wallet.

Post by harish on Jul 19, 2021

Thank you. I imported the account. Then it shows


C:\Users\Dell\AlgorandNode>goal app create --creator J52X5I4TY5MIWDXGPRVD7QCRYURRRIYFY4QBGFNEM7DKEUP5TWFOQPD3SY --approval-prog ./crowd_fund.teal --global-byteslices 3 --global-ints 5 --local-byteslices 0 --local-ints 1 --app-arg "int:20" --app-arg "int:10000" --app-arg "int:1000000" --app-arg "addr:"J52X5I4TY5MIWDXGPRVD7QCRYURRRIYFY4QBGFNEM7DKEUP5TWFOQPD3SY --app-arg "int:100000" --clear-prog ./crowd_fund_close.teal -d  "C:\users\Dell\AlgorandNode\newdata"
Please enter the password for wallet 'har':
Couldn't broadcast tx with algod: HTTP 400 Bad Request: TransactionPool.Remember: transaction ASZTMNIE7IJEOQALIC4AVUJJ3UMJXKZMNW44X7MDSYLGU6ARQ7MA: check failed on ApprovalProgram: program version 18446744073709551615 greater than max supported version 5

What I have to change? Can you explain me please?

Post by JasonW on Jul 19, 2021

Are you doing this on TestNet, a private network, or Sandbox? Once you create a wallet, create a new account in that wallet using goal account new and use the -w flag to specify the new wallet. Once you have done that change the creator address you used to the new account. Keep in mind that once you create an account you need to fund it.

Post by harish on Jul 19, 2021

I am doing in testnet.

Post by fabrice on Jul 19, 2021

Can you show the content of the two teal files?

It looks like they are the wrong version for some reason.

Also, can you check your goal version? It looks like you are not using the stable version.


C:\Users\Dell\AlgorandNode>goal version -v
Version: [v1 v2]
GenesisID: testnet-v1.0
Build: 2.8.114414.master [master] (commit #da26ca79)

How to change the current goal version to stable version?

Post by harish on Jul 19, 2021

Initially, the two teal files are empty. Am I right?

Post by fabrice on Jul 19, 2021

No, that is why it is not working.

See Your First Application - Algorand Developer Portal

The files must contain something.

How did you install your node? Can you point to the exact tutorial you followed?

Post by harish on Jul 19, 2021

This is the tutorial which I followed - https://developer.algorand.org/tutorials/compile-and-run-the-algorand-node-natively-windows/

Post by fabrice on Jul 19, 2021

Run just before step 2:


git checkout rel/stable

inside the go-algorand folder.

And then redo all the steps.

Post by fabrice on Jul 19, 2021

Open an issue about confusing error message: Confusing error message when approval/clear programs are empty · Issue #2585 · algorand/go-algorand · GitHub

Post by harish on Jul 20, 2021

So I have to delete the current installed node. Then I reinstall the node. Am I right?

Post by fabrice on Jul 20, 2021

Yes, that might be the simplest option.