Index originated contracts from factory contracts
When a contract originates another contract on Tezos, it currently breaks the indexer. When contents["kind"] == "origination"
, there is no contents["destination"]
which breaks here https://yourlabs.io/pyratzlabs/djwebdapp/-/blob/v0.4.20-rc6/src/djwebdapp_tezos/provider.py#L138.
However, how do we want to handle this originated contract.
We'd probably like to have a relation from TezosTransaction.originated_contracts -> m2m(TezosTransaction)
indicating which contracts were originated by a given contract (a contract can originate multiple contracts in a single call).
Let's index by default originated contracts (set the originated contract's TezosTransaction.index = True
).