You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Select only artifacts with deployed bytecode length equal to the runtime bytecode length
Of those pick the artifact that:
2.1 Matches the runtime bytecode in the most location
2.2 Has all 0-s in the mismatching locations
For constructor bytecodes, we can follow the same algorithm, except in step 1 we only pick bytecodes with lengths <= of the runtime bytecode.
The text was updated successfully, but these errors were encountered:
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.
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:
2.1 Matches the runtime bytecode in the most location
2.2 Has all 0-s in the mismatching locations
For constructor bytecodes, we can follow the same algorithm, except in step 1 we only pick bytecodes with lengths <= of the runtime bytecode.
The text was updated successfully, but these errors were encountered: