To get an f0<->f2
mapping for all newly created smart contracts:
- Walk the execution trace.
- Ignore sub-trees of the execution trace where the exit code (
.MsgRct.ExitCode
) is non-zero (i.e., the sub-call reverted). - If the sub-trace's
.Msg.To
isf01
(init actor), the exit code is zero (success), and the method number is 2 (Exec
) or 3 (Exec4
): decode.MsgRct.Return
asExecReturn
(specifically, as a cbor-encoded list of two byte-strings where the first byte-string is thef0
address of the newly created actor and the second byte-string is thef2
address of the newly created actor.