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

Setup correct filter to listen only on ResolutionProposed events #5

Open
potomak opened this issue Sep 6, 2017 · 0 comments
Open
Assignees

Comments

@potomak
Copy link
Member

potomak commented Sep 6, 2017

The topic is the hash of an event function signature.

Example

curl -X POST --data '{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "topics": [
        "0x56b138798bd325f6cc79f626c4644aa2fd6703ecb0ab0fb168f883caed75bf32"
      ]
    }
  ],
  "id": 1
}' http://localhost:8545 | jq .

This filter will collect data about a specific event. To calculate the topic's hash run web3.sha3('TestEvent(string,uint256)') in a geth console. web3.sha3 will return a hash calculated using the Keccak-256 SHA3 algorithm.

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

2 participants