planetarium / libplanet

Blockchain in C#/.NET for on-chain, decentralized gaming
https://docs.libplanet.io/
GNU Lesser General Public License v2.1
511 stars 144 forks source link

Explorer: Query action with condition expression #1250

Closed moreal closed 1 year ago

moreal commented 5 years ago

Now, there is no way to filter Action.Arguments and it returns all of its plainValue. So I suggest to filter with a expression .

# With PolymorphicAction
blocks {
  transactions {
    actions {
      arguments(where: ".type_id == 'hack_and_slash' and .values.address == 0x7ff128f5ce2ee414e0acf8bd24ca3fd68db45135")  {
        key
        value
      }
    }
  }
}
# If plainValue is Bencodex.Types.Integer, not Bencodex.Types.Dictionary
blocks {
  transactions {
    actions {
      arguments(where: ". > 3000") {
        key
        value
      }
    }
  }
}

In my thought, if this feature was implemented, Issue planetarium/libplanet#1248 could be also resolved. And this will be affected from planetarium/libplanet#1249.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.