-
Notifications
You must be signed in to change notification settings - Fork 479
Closed
Copy link
Labels
🪲 bugSomething isn't workingSomething isn't working
Description
I just came across a case that breaks and crashes the server instead of catching a general error.
For some reason, some of the contracts in this file (flattened) do not have "metadata" in the JSON output, ie. the field is: "metadata": ""
. This might just be an old version bug (0.4.18) and I asked the Solidity team about it.
Contract: https://repo.sourcify.dev/1/0xdAC17F958D2ee523a2206206994597C13D831ec7
Endpoint: POST /v2/verify
chain-1-0xdAC17F95-standard-json-input.json
output.json
To reproduce, verify the contract above with Compilation Target: TetherToken.sol:BasicToken
You can see from the above output too that BasicToken has empty metadata.
I noticed the error happens here:
We need to fix several things here:
- We should not assume there will be a metadata from the SolidityCompilation (e.g. pre-metadata (<v0.4.7) contracts) and have proper handling for that. I think this is always generated for Vyper?
- Even if during the compilation or after compilation an error is thrown, this should have been caught gracefully. This is more imporant than the above point.
Metadata
Metadata
Assignees
Labels
🪲 bugSomething isn't workingSomething isn't working
Type
Projects
Status
COMPLETED