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

Get Contract Events by Contract Hash #3583

Open
cschuchardt88 opened this issue Nov 16, 2024 · 0 comments
Open

Get Contract Events by Contract Hash #3583

cschuchardt88 opened this issue Nov 16, 2024 · 0 comments
Labels
Discussion Initial issue state - proposed but not yet accepted Enhancement Type - Changes that may affect performance, usability or add new features to existing modules.

Comments

@cschuchardt88
Copy link
Member

cschuchardt88 commented Nov 16, 2024

Summary or problem description
ApplicationLog already saves a log of all the events per transaction. Searchable by contract hash or transaction hash. You can also already view this information in neo-cli by command log contract. This is very useful for syncing or looking at missed contract events. If user were to do this they would need to build a plugin to watch for this activity on their own.

Do you have any solution you want to propose?
Enable this data to end-user by HTTP RPC. What this will do is allow users to get the events by a contract hash, returning transaction hash (a list of events).

Method Name: getcontractlog

Example of Command:

neo> log contract 0xf0151f528127558851b39c2cd8aa47da7418ab28 0 3
Transaction Hash: 0x16890a963a9325bcce5fa874840ee9385fb52a81b08ba87a90cc0881842b03ad

  Event Name:  Transfer
  State Parameters:
    arg1: {"type":"ByteString","value":"Llmh1poEZKFMPOkBa0p1QYFoqys="}
    arg2: {"type":"ByteString","value":"352hGohJmxzp1lmMC322MRwTfag="}
    arg3: {"type":"Integer","value":"3339600000000"}
--------------------------------
Transaction Hash: 0x5f577775c8980b9d3f17e0c241a77c19232e39ff973fad9a4e3c854074c0f657

  Event Name:  Transfer
  State Parameters:
    arg1: {"type":"ByteString","value":"BrY0XpYy7nFjXOnPMsMBAxx5HRc="}
    arg2: {"type":"ByteString","value":"YeKHeeCXGEps8sSRlxbc4v97b1U="}
    arg3: {"type":"Integer","value":"128176221000"}
--------------------------------
neo>

Where in the software does this update applies to?

  • RPC (HTTP)
@cschuchardt88 cschuchardt88 added Enhancement Type - Changes that may affect performance, usability or add new features to existing modules. Discussion Initial issue state - proposed but not yet accepted labels Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Initial issue state - proposed but not yet accepted Enhancement Type - Changes that may affect performance, usability or add new features to existing modules.
Projects
None yet
Development

No branches or pull requests

1 participant