Problem implementing logic signature - General - Algorand
Problem implementing logic signature
post by ddev on Jul 8, 2020
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.
post by fabrice on Jul 8, 2020
Can you share with us a minimum example with the issue?
Did you try to look at a full example like https://developer.algorand.org/tutorials/dynamic-fee-template-pyteal?
post by ddev on Jul 8, 2020
@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'})
post by rfustino on Jul 9, 2020
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. https://github.com/algorand/docs/tree/master/examples/smart_contracts
post by ddev on Jul 10, 2020
Let me walk through this link you pasted. I’ll revert shortly.
post by ddev on Jul 10, 2020
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.
post by JasonW on Jul 11, 2020
The program is coming from a hex dump of the compiled TEAL. Read about how to do that here:
https://developer.algorand.org/docs/features/asc1/sdks/#accessing-teal-program-from-sdks
A new REST endpoint is being added currently so this step will not be required in the future.
post by ddev on Jul 22, 2020
Thank you. I’ll check it out.