I got stuck during the deployment of a simple smart contrac

i got stuck during the deployment of a simple smart contract please help me out as i am a begineer. The error it is showing is

Couldn’t broadcast tx with algod: HTTP 400 Bad Request: TransactionPool.Remember: transaction 3LCVMVPB25XPTAODV3YF4OAFMZDHHHBUJYPMVCPSE65EI4XL4YQQ: check failed on ApprovalProgram: program version 7 greater than protocol supported version 6

With PyTEAL, in your approval function (and clear state function), you need to return :
return compileTeal(program, Mode.Application, version=6)

1 Like

i had put this code in my code file where i had written the approval function but it is not working what to do. thankyou for your effort

You’re using version 7 of TEAL which is only available on BetaNet right now:

If you don’t need features from version 7, you can downgrade to version 6.
See @ismax’s comment if you’re using PyTeal.

Actually i am using visual studio code git bash. is there an option to downgrade to versions 6 how can i do that. I didn’t understand the ismax comment can you please elaborate

How did you write the TEAL script? Did you write it directly or did you use PyTeal?
What exact steps did you follow? (Did you follow a tutorial?)
Can you copy them here inside triple back quotes ```

I user pyteal and after i enter the docker container aldo node using command ./sandbox enter algod
enter after getting and address used this command
goal app create --creator $ONE --approval-prog /data/build/approval.teal --clear-prog /data/build/clear.teal --global-byteslices 1 --global-ints 1 --local-byteslices 0 --local-ints 0

Can you share your PyTeal code?
Most likely inside you have a line like mentioned by @ismax

compileTeal(program, Mode.Application, version=7)

and you need to change the version to 6.
Then re-execute it.

the support team is doing a great job i resolved thanks will post new problem if had any in the future