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

use --to-address and --from-address for filtering #97

Open
sslivkoff opened this issue Nov 3, 2023 · 6 comments
Open

use --to-address and --from-address for filtering #97

sslivkoff opened this issue Nov 3, 2023 · 6 comments

Comments

@sslivkoff
Copy link
Member

currently --to-address and --from-address only are used for eth_calls and trace_calls datasets

but they should also be usable for filtering

relevant datasets

  • txs
  • traces
  • native_transfers
  • erc20_transfers
  • erc721_transfers
@cool-mestorf
Copy link
Contributor

Hi. If you don't mind can I take this task?

@sslivkoff
Copy link
Member Author

that would be great

I think this is probably the best solution path

  • define an optional_parameters() function that specifies which optional parameters each of these datasets should take. see logs.rs or erc20_transfers.rs for examples. this makes it so that in the extract() function for each dataset, the request object can now return request.to_address() and request.from_address()
  • the extract() function should be modified to skip the data that doesn't satisfy the filter. for txs dataset this will require modifying the Response type to be optional and modifying the process_transactions function. for the other datasets, no modification required, can just return an empty list from extract

@cool-mestorf
Copy link
Contributor

I struggled a while to take from_address arg into new Dim... but found it quite tricky. I will try to stick on implementing easier filters first, to_address and maybe erc transfers first.

@sslivkoff
Copy link
Member Author

oh right, I forgot that from_address was removed from the Dim. yea to_address would be a good start

where are the difficulties with from_address coming from?

@cool-mestorf
Copy link
Contributor

Even I define dim and optional args for from_address the supplied argument does not seem to be passed to query. If debugging takes too long I will try to open a draft PR and ask for comments.

@cool-mestorf
Copy link
Contributor

Maybe this issue can be closed now?

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