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

Documentation for searchlogs is incorrect #928

Open
ripply opened this issue Apr 19, 2021 · 0 comments
Open

Documentation for searchlogs is incorrect #928

ripply opened this issue Apr 19, 2021 · 0 comments

Comments

@ripply
Copy link
Contributor

ripply commented Apr 19, 2021

The online documentation for searchlogs as well as the command line documentation is incorrect for the topics parameter - "null" is incorrect and it should be null

The online documentation's example also needs to be updated as well
https://docs.qtum.site/en/Qtum-RPC-API/#searchlogs

Expected behavior

searchlogs fromBlock toBlock ( "address" "topics" minconf )

Search logs, requires -logevents to be enabled.

Arguments:

  1. fromBlock (numeric, required) The number of the earliest block (latest may be given to mean the most recent block).
  2. toBlock (numeric, required) The number of the latest block (-1 may be given to mean the most recent block).
  3. address (string, optional) An address or a list of addresses to only get logs from particular account(s).
  4. topics (string, optional) An array of values from which at least one must appear in the log entries. The order is important, if you want to leave topics out use null, e.g. [null, "0x00..."].
  5. minconf (numeric, optional, default=0) Minimal number of confirmations before a log is returned

Actual behavior

searchlogs fromBlock toBlock ( "address" "topics" minconf )

Search logs, requires -logevents to be enabled.

Arguments:

  1. fromBlock (numeric, required) The number of the earliest block (latest may be given to mean the most recent block).
  2. toBlock (numeric, required) The number of the latest block (-1 may be given to mean the most recent block).
  3. address (string, optional) An address or a list of addresses to only get logs from particular account(s).
  4. topics (string, optional) An array of values from which at least one must appear in the log entries. The order is important, if you want to leave topics out use null, e.g. ["null", "0x00..."].
  5. minconf (numeric, optional, default=0) Minimal number of confirmations before a log is returned

To reproduce

qtum-cli help searchlogs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant