Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogicSigAccount.getAddress() causes NPE after delegated with account.signLogicsig(escrowAccountLogicSig.lsig) #695

Open
adevvv opened this issue Mar 22, 2024 · 0 comments
Labels
new-bug Bug report that needs triage

Comments

@adevvv
Copy link

adevvv commented Mar 22, 2024

LogicSigAccount.getAddress() causes NPE after delegated with account.signLogicsig(escrowAccountLogicSig.lsig)

When creating an escrow as stateless smart contract:

LogicSigAccount escrowAccountLogicSig = new LogicSigAccount(escrowAccountStatelessSmartContract.getBytes(), null)
then making it secure by delegating:
account.signLogicsig(escrowAccountLogicSig.lsig)
--> getting the address afterwards fails:
escrowStatelessSmartContractAddress = escrowAccountLogicSig.getAddress()

error Cannot invoke "com.algorand.algosdk.crypto.Ed25519PublicKey.getBytes()" because "this.sigKey" is null at com.algorand.algosdk.account.LogicSigAccount.getAddress(LogicSigAccount.java:138)

Your environment

Algorand Java SDK 2.4

Expected behaviour

Getting the address should also work after delegating the logicSig

Actual behaviour

NPE :)

BTW It would be great if there is a Method in LogicSigAccount to sign/delegate, and not indirectly go via the account only, not really ObjectOriented?

@adevvv adevvv added the new-bug Bug report that needs triage label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-bug Bug report that needs triage
Projects
None yet
Development

No branches or pull requests

1 participant