Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix standard json requests without optimizer #109

Open
rimrakhimov opened this issue Sep 1, 2022 · 0 comments
Open

Fix standard json requests without optimizer #109

rimrakhimov opened this issue Sep 1, 2022 · 0 comments

Comments

@rimrakhimov
Copy link
Member

rimrakhimov commented Sep 1, 2022

If we send the following standard json request to smart-contracts verifier it fails with error content is not valid standard json: missing field 'optimizer' at line 10 column 3:

{
  "language": "Solidity",
  "sources": {
    "A.sol": {
      "content": "pragma solidity ^0.6.8; contract A {}"
    }
  },
  "settings": {
    "remappings": []
  }
}

The problem is in settings.optimizer field which is not present in the input and is required in our current implementation. But according to solidity documentation (https://docs.soliditylang.org/en/v0.8.15/using-the-compiler.html#input-description), that field should be optional. Thus, in general, we should accept that input and consider it the same way as if we have

{
  "language": "Solidity",
  "sources": {
    "A.sol": {
      "content": "pragma solidity ^0.6.8; contract A {}"
    }
  },
  "settings": {
    "remappings": [],
    "optimizer": {}
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant