Skip to content

Commit

Permalink
feat(indexer): ✨ implement LogicSig json fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonboukheir committed Oct 3, 2021
1 parent 459969c commit b22297c
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 76 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ public struct LogicSig
: ISignature
, IEquatable<LogicSig>
{
[AlgoApiField(null, "l")]
[AlgoApiField("logicsig", "l")]
public byte[] Program;

[AlgoApiField(null, "arg")]
[AlgoApiField("args", "arg")]
public FixedList128Bytes<byte>[] Args;

[AlgoApiField(null, "sig")]
[AlgoApiField("signature", "sig")]
public Sig Sig;

[AlgoApiField(null, "msig")]
[AlgoApiField("multisig-signature", "msig")]
public MultiSig MultiSig;

public bool Equals(LogicSig other)
Expand All @@ -33,7 +33,6 @@ public bool Equals(LogicSig other)

public bool IsValid(Address sender)
{

using var programByteArray = new NativeByteArray(Program, Allocator.Temp);
return Sig.Verify(programByteArray, sender)
|| MultiSig.Verify(programByteArray, sender)
Expand Down

0 comments on commit b22297c

Please sign in to comment.