This forum is a read-only archive. Posting, replying and signing in are disabled.

Crowdfunding smartcontract error

harish

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?

cusma

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.
harish

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?

JasonW

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.

fabrice
↩ in reply to harish

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.
goal version -v should be 2.7.1.
If it’s something later than that, you will have issues as those versions are not stable.

fabrice

Run just before step2:

git checkout rel/stable

inside the go-algorand folder.

And then redo all the steps.