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

How to install goal

sathiyakennedy

I am not able execute teal file…

stdout, stderr = execute([“goal”, “clerk”, “compile”, “-o”, lsig_fname,
teal_file])

above line showing “no such file or directory goal”

how to install goal??

sathiyakennedy

We created node using sandbox in mac,
for windows we are using purestake API


from pyteal import *

import uuid,base64

import time

from algosdk import algod, transaction, account, mnemonic

from periodic import periodic_pay_escrow

#--------- compile & send transaction using Goal and Python SDK ----------

teal_source = periodic_pay_escrow.__teal__()

#time.sleep(30)

# compile teal

teal_file = str(uuid.uuid4()) + ".teal"

#print(teal_file)

listToStr = ' '.join([str(elem) for elem in teal_source])

with open(teal_file, "w+") as f:

    #for item in teal_source:

    f.write(listToStr)

lsig_fname = str(uuid.uuid4()) + ".tealc"

#with open(lsig_fname, "w+") as f:

    #for item in teal_source:

#        f.write(listToStr)

print(lsig_fname)

#time.sleep(30)

stdout, stderr = execute(["goal", "clerk", "compile", "-o",lsig_fname,

                          teal_file])

if stderr != "":

    print(stderr)

   # raise

elif len(stdout) < 59:

    print("error in compile teal")

   # raise

with open(lsig_fname, "rb") as f:

    teal_bytes = f.read()

lsig = transaction.LogicSig(teal_bytes)

# create algod clients

algod_token = 'eBlXRdLQNW6nbPb6grYp05BXsq0UHIz47nFik7sS'

algod_address = 'https://testnet-algorand.api.purestake.io/ps2'

purestake_token = {'X-Api-key': algod_token}

acl = algod.AlgodClient(algod_token, algod_address, headers=purestake_token)

periodic_pay_escrow function we imported…

still we getting error in executing teal file…

We create algo client using purestake api…