// 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:
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:
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: