Function chaindexing::include_contract
source · pub async fn include_contract<'a, C: HandlerContext<'a>>(
event_context: &C,
contract_name: &str,
address: &str
)
Expand description
Includes runtime-discovered contract addresses for indexing.
§Arguments
event_context
- context where the contract was discovered. N/B: Indexing for this contract starts from this point onwardsname
- name of the contract as defined in the configaddress
- address of discovered contract
§Example
ⓘ
// In an EventHandler...
chaindexing::include_contract(&context, "UniswapV3Pool", &pool_contract_address)
.await;
// Includes a new UniswapV3Pool contract:{pool_contract_address} for indexing...