Python SDK LogicSig - Error using method sign()

Hi there,

I’m using the Python SDK for the example Account Delegation SDK Usage and I’m struggling figuring out what’s wrong.

Here the piece of code that is failing:

lsig = transaction.LogicSig(lsig_asc1_bytes)
lsig = lsig.sign(private_key)

lsig.sign(private_key) returns None.

I checked: both lsig_asc1_bytes and private_key are correct.

Do you have any idea about the possible issue?

I think the reason is lsig.sign is signing in place: lsig is modified directly.

Can you try to replace lsig = lsig.sign(private_key) by lsig.sign(private_key)?

1 Like

That’s correct Fabrice, it worked. My error!