Macro brontes_macros::action_dispatch
source · action_dispatch!() { /* proc-macro */ }
Expand description
action_dispatch macro crates a struct that automatically dispatches the given trace information to the proper action classifier. its invoked as the following:
ⓘ
action_dispatch!(<DispatchStructName>, [action_classifier_names..],);
an actual example would be
ⓘ
action_impl!(
Protocol::UniswapV2,
crate::UniswapV2::swapCall,
Swap,
[Ignore<Sync>, Swap],
call_data: true,
logs: true,
|trace_index,
from_address: Address,
target_address: Address,
msg_sender: Address,
call_data: swapCall,
log_data: UniswapV2swapCallLogs,
db_tx: &DB| {
todo!()
}
);
action_dispatch!(ClassifierDispatch, UniswapV2swapCall);