Bug - Adding contracts with wrong signature/interface breaks templateLauncher#handleTemplateAdded
#92
Labels
bug
Something isn't working
Context
TemplateLauncher.addTempate(address templateAddress)
expects, in good faith, that the received contract is implementing the methodtemplateName
-- which names the template.Transaction 0x59398c2374b35 adds, by mistaken, a
FixedPriceSale
sale module toTemplateLauncher
. The call emitsTemplateAdded
, the subgraph picks up the event. However, when trying to process the event, the signature/methodtemplateName
does not exist on . and the subgraph fails to sync any further blocks.Solution
Contract-level
Check the address interface for matching signature before adding the template. This is also critical to document for people building on top of Aqua.
Subgraph-
Check if the address implements the
templateName
method. A try/catch could help.The text was updated successfully, but these errors were encountered: