# How can i create a smart contract (Teal Version = 6) in algorand sandbox

**URL:** <https://forum.algorand.co/t/how-can-i-create-a-smart-contract-teal-version-6-in-algorand-sandbox/6607>\
**Category:** General\
**Tags:** teal, developer\
**Created:** [April 28, 2022, 1:39am UTC](https://forum.algorand.co/t/how-can-i-create-a-smart-contract-teal-version-6-in-algorand-sandbox/6607 "2022-04-28T01:39:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lishubin](https://avatars.discourse-cdn.com/v4/letter/l/b19c9b/32.png) [@lishubin](https://forum.algorand.co/u/lishubin)\
**Post date:** [April 28, 2022, 1:39am UTC](https://forum.algorand.co/t/how-can-i-create-a-smart-contract-teal-version-6-in-algorand-sandbox/6607/1 "2022-04-28T01:39:51Z")

</div>

Hello, bros!  
I use pyTeal to write smart contract code, and i compile it to .teal file.  
I’m try to use this teal file to create application in sandbox(dev).  
But, this console log this following information:

```nohighlight
data/core/approval.teal: 1: unsupported version: 6
/data/core/approval.teal: 2: field "ApplicationID" available in version 2. Missed #pragma version?
/data/core/approval.teal: 6: field "OnCompletion" available in version 2. Missed #pragma version?
/data/core/approval.teal: 10: field "OnCompletion" available in version 2. Missed #pragma version?
/data/core/approval.teal: 14: field "OnCompletion" available in version 2. Missed #pragma version?
/data/core/approval.teal: 18: field "OnCompletion" available in version 2. Missed #pragma version?
/data/core/approval.teal: 22: field "OnCompletion" available in version 2. Missed #pragma version?

```

But my code must use this code, which is supported by [Teal v6](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#contract-to-contract-calls)

```nohighlight
TxnField.type_enum: TxnType.ApplicationCall,

```

I’m trying to find solution (GitHub Issue、Algorand Forum), But don’t find it.

I’m going to try the following:

1. use this code to create application in testnet

I wonder if this is due to sandbox not supporting Teal V6, Please Help me.

---

<div class="post-metadata">

**Author:** ![lishubin](https://avatars.discourse-cdn.com/v4/letter/l/b19c9b/32.png) [@lishubin](https://forum.algorand.co/u/lishubin)\
**Post date:** [April 28, 2022, 3:28am UTC](https://forum.algorand.co/t/how-can-i-create-a-smart-contract-teal-version-6-in-algorand-sandbox/6607/2 "2022-04-28T03:28:10Z")

</div>

This teal code can be created on test network, but does’t work on sandbox .

---

<div class="post-metadata">

**Author:** ![fabrice](https://avatars.discourse-cdn.com/v4/letter/f/5fc32e/32.png) [@fabrice](https://forum.algorand.co/u/fabrice)\
**Post date:** [April 28, 2022, 1:43pm UTC](https://forum.algorand.co/t/how-can-i-create-a-smart-contract-teal-version-6-in-algorand-sandbox/6607/3 "2022-04-28T13:43:33Z")

</div>

Most likely your sandbox version is outdated (`git pull` in sandbox) or the containers used for your sandbox are outdated (`./sandbox clean` → this will remove all your accounts/transactions on sandbox and everything you may have done inside the containers).

---

<div class="post-metadata">

**Author:** ![lishubin](https://avatars.discourse-cdn.com/v4/letter/l/b19c9b/32.png) [@lishubin](https://forum.algorand.co/u/lishubin)\
**Post date:** [April 29, 2022, 8:47am UTC](https://forum.algorand.co/t/how-can-i-create-a-smart-contract-teal-version-6-in-algorand-sandbox/6607/4 "2022-04-29T08:47:21Z")

</div>

Thank you !  
I update my sandbox , this teal code has worked.
