Closed cd1m0 closed 2 days ago
A twist in this is that we need the compiler version for each artifact even before we get to matching runtime bytecode to artifacts. We could try to infer this from the AST trees, with a basic walk if all else fails.
Fixed.
Sometimes we get contracts without compiler metadata hash. In those cases we can still try to match the deployed bytecode to the artifact with the following algorithm:
For constructor bytecodes, we can follow the same algorithm, except in step 1 we only pick bytecodes with lengths <= of the runtime bytecode.