Problem implementing logic signature

I am unable to implement logic signature in my python code. The issue is arriving at the logic program which is then converted into a logic signature. Anyone to help me code example? I read one on the developer’s resources still can’t get it.

Can you share with us a minimum example with the issue?

Did you try to look at a full example like

@fabrice here is where I have issue.

logicsic = transaction.LogicSig(program)

i = create_transaction(defaultAddr, rec, 100000)

lstx = transaction.LogicSigTransaction(i, logicsic)

assert lstx.verify()

algodClient.send_transaction(lstx, headers={'content-type': 'application/x-binary'})```

Is the send transaction failing? Some of the samples we use int 0 as the program, which always returns false, and the send will fail with an error. What is the error you are getting? Here are the examples I just posted for Contract and Delegated account.

1 Like

Let me walk through this link you pasted. I’ll revert shortly.

My headache is actually where you have the program in line
logicsig = transaction. LogicSig(program)

How is the program arrived at? I tried convert several strings to byte but not working.

The program is coming from a hex dump of the compiled TEAL. Read about how to do that here:

A new REST endpoint is being added currently so this step will not be required in the future.

1 Like

Thank you. I’ll check it out.