# Passing in parameters into teal programs: type error

**URL:** <https://forum.algorand.co/t/passing-in-parameters-into-teal-programs-type-error/1155>\
**Category:** Uncategorized\
**Created:** [November 30, 2019, 1:15am UTC](https://forum.algorand.co/t/passing-in-parameters-into-teal-programs-type-error/1155 "2019-11-30T01:15:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dani](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.algorand.co/dani/32/357_2.png) [@dani](https://forum.algorand.co/u/dani)\
**Post date:** [November 30, 2019, 1:15am UTC](https://forum.algorand.co/t/passing-in-parameters-into-teal-programs-type-error/1155/1 "2019-11-30T01:15:31Z")

</div>

This is my teal program:

```auto
// push sha256(arg_0) to the stack
arg_0
sha256

// compare it with our pre-computed hashed and b64'ed secret
byte base64 ZjY5MzY5MTIxODQ0ODFmNWVkZDRjMzA0Y2UyN2M1YTFhODI3ODA0ZmM3ZjMyOWY0M2QyNzNiODYyMTg3MDc3Ngo=
==
&&

```

But when I pass it in to compile using: `goal clerk compile playground.teal`, I get:

```auto
playground.teal: :10 && arg 1 wanted type uint64 got None

```

Do I need to pass in args at the compile stage? I thought I only needed to pass it in when I run `goal clerk send` When I tried to pass in an arg at `goal clert compile`, I get unknown flag:

```auto
goal clerk compile playground.teal --argb64 dGVzdAo=
unknown flag: --argb64

```

---

<div class="post-metadata">

**Author:** ![ryanRfox](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.algorand.co/ryanrfox/32/364_2.png) [@ryanRfox](https://forum.algorand.co/u/ryanRfox)\
**Post date:** [November 30, 2019, 9:19pm UTC](https://forum.algorand.co/t/passing-in-parameters-into-teal-programs-type-error/1155/2 "2019-11-30T21:19:47Z")

</div>

You are very close. Perhaps having an issue with your stack. I believe you need only leave off the final `&&` operation from your program. At that point, there is only one item on the stack, thus nothing to compare. Try this program:

```
// Push arg_0 to stack
arg_0
// Pop arg_0 from stack and push sha256 hashed result to stack
sha256
// Push pre-computed b64 encoded sha256 of my-Super-Secret-32-bytes-of-Data
byte b64 Q0oWzpC/ICJPtdpY1hPLIZm0E2Ew3ozIGGNbWLg38aQ=
// Pop the top two items from the stack, compare, then push result to stack
==

```

Now compile it:

```
goal clerk compile playground.teal

```

Now create the transaction from the program and send it the b64 encoded secret:

```
goal clerk send -a 0 --argb64 bXktU3VwZXItU2VjcmV0LTMyLWJ5dGVzLW9mLURhdGE= -t R3NORFFJ3RXGEER2EUXJH5F35EGOBZYOGP6FNX3KCQ3HJ23VTETQJCM6SA --from-program playground.teal -d betanetdata -o playground.txn

```

Check the results:

```
goal clerk dryrun -t playground.txn -d betanetdata
```

---

<div class="post-metadata">

**Author:** ![dani](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.algorand.co/dani/32/357_2.png) [@dani](https://forum.algorand.co/u/dani)\
**Post date:** [November 30, 2019, 9:42pm UTC](https://forum.algorand.co/t/passing-in-parameters-into-teal-programs-type-error/1155/3 "2019-11-30T21:42:24Z")

</div>

Thank you so much! Will try out in a bit.

---

<div class="post-metadata">

**Author:** ![dani](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.algorand.co/dani/32/357_2.png) [@dani](https://forum.algorand.co/u/dani)\
**Post date:** [December 1, 2019, 1:20am UTC](https://forum.algorand.co/t/passing-in-parameters-into-teal-programs-type-error/1155/4 "2019-12-01T01:20:40Z")

</div>

And it worked! @ryanRfox you rock, thank you so much.
