cryo
cryo copied to clipboard
use --to-address and --from-address for filtering
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
Hi. If you don't mind can I take this task?
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. seelogs.rs
orerc20_transfers.rs
for examples. this makes it so that in theextract()
function for each dataset, therequest
object can now returnrequest.to_address()
andrequest.from_address()
- the
extract()
function should be modified to skip the data that doesn't satisfy the filter. fortxs
dataset this will require modifying theResponse
type to be optional and modifying theprocess_transactions
function. for the other datasets, no modification required, can just return an empty list from extract
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.
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?
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.
Maybe this issue can be closed now?