In order to get this to work inside of the envio indexer you have to currently set the address to 0x00000000, but then also modify the following routine inside of the generated code. Obviously this will be slightly different for different instances, but the generator could add the || ... section automatically.
function convertDecodedEvent(
$$event,
contractInterfaceManager,
log,
blockTimestamp,
chainId,
txOrigin
) {
var contractName =
ContractInterfaceManager.getContractNameFromAddress(
contractInterfaceManager,
log.address
) || // BEGIN: THIS SECTION ADDED TO READ THE WILDCARD CONTRACT IN ADDITION.
ContractInterfaceManager.getContractNameFromAddress(
contractInterfaceManager,
"0x0000000000000000000000000000000000000000"
); // END: THIS SECTION ADDED TO READ THE WILDCARD CONTRACT IN ADDITION.
if (contractName === undefined) {
return {
TAG: "Error",
_0: {
RE_EXN_ID: UnregisteredContract,
_1: log.address,
},
};
}
var match = Types.eventTopicToEventName(
contractName,
Caml_array.get(log.topics, 0)
);
var $$event$1;
$$event$1 =
match === "LSPData_DataChanged"
? {
TAG: "LSPDataContract_DataChanged",
_0: makeEventLog(
convertDataChangedDecodedEventParams($$event),
log,
blockTimestamp,
chainId,
txOrigin
),
}
: {
TAG: "LSPDataContract_TokenIdDataChanged",
_0: makeEventLog(
convertTokenIdDataChangedDecodedEventParams($$event),
log,
blockTimestamp,
chainId,
txOrigin
),
};
return {
TAG: "Ok",
_0: $$event$1,
};
}
In order to get this to work inside of the envio indexer you have to currently set the address to 0x00000000, but then also modify the following routine inside of the generated code. Obviously this will be slightly different for different instances, but the generator could add the
|| ...
section automatically.