{"id":20910116,"url":"https://github.com/viperproject/2vyper","last_synced_at":"2025-05-13T07:31:34.881Z","repository":{"id":39118233,"uuid":"238958279","full_name":"viperproject/2vyper","owner":"viperproject","description":"A static verifer for Ethereum Smart Contracts written in Vyper","archived":false,"fork":false,"pushed_at":"2023-02-15T09:14:12.000Z","size":76749,"stargazers_count":51,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T11:42:27.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viperproject.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-07T15:33:48.000Z","updated_at":"2025-01-21T13:05:48.000Z","dependencies_parsed_at":"2023-02-15T10:01:17.494Z","dependency_job_id":null,"html_url":"https://github.com/viperproject/2vyper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperproject%2F2vyper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperproject%2F2vyper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperproject%2F2vyper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperproject%2F2vyper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viperproject","download_url":"https://codeload.github.com/viperproject/2vyper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253894788,"owners_count":21980400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T14:13:57.052Z","updated_at":"2025-05-13T07:31:30.134Z","avatar_url":"https://github.com/viperproject.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n2vyper is an automatic verifier for smart contracts written in Vyper, based on the `Viper \u003chttp://viper.ethz.ch\u003e`_ verification infrastructure. It is being developed at the `Programming Methodology Group \u003chttp://www.pm.inf.ethz.ch/\u003e`_ at ETH Zurich. 2vyper was mainly developed by Robin Sierra, Christian Bräm, and Marco Eilers. \n\nFor examples of the provided specification constructs, check out the `examples folder \u003ctests/resources/examples\u003e`_. Note that the examples are written in Vyper 0.1.0, but 2vyper supports different versions if a version pragma is set. \nFor documentation, read `our paper \u003chttps://arxiv.org/abs/2104.10274\u003e`_ about 2vyper's specification constructs; an explanation of how the specification constructs introduced in the paper can be used in the tool, as well as documentation of configuration options and other specification functions, can be found `here \u003cdocs/specifications.md\u003e`_. More information about 2vyper's encoding and implementation can be found in `Robin Sierra's \u003chttps://ethz.ch/content/dam/ethz/special-interest/infk/chair-program-method/pm/documents/Education/Theses/Robin_Sierra_MA_Report.pdf\u003e`_ and `Christian Bräm's \u003chttps://ethz.ch/content/dam/ethz/special-interest/infk/chair-program-method/pm/documents/Education/Theses/Christian%20Br%C3%A4m_MS_Report.pdf\u003e`_ Master's theses on the tool.\n\nDependencies (Ubuntu Linux, MacOS)\n===================================\n\nInstall Java \u003e= 11 (64 bit) and Python \u003e= 3.7 (64 bit).\n\nFor usage with the Viper's verification condition generation backend Carbon, you will also need to install the .NET / the Mono runtime.\n\nDependencies (Windows)\n==========================\n\n1.  Install Java \u003e= 11 (64 bit) and Python \u003e= 3.7 (64 bit).\n\n2.  Install either Visual C++ Build Tools 2015 (http://go.microsoft.com/fwlink/?LinkId=691126) or Visual Studio 2015. For the latter, make sure to choose the option \"Common Tools for Visual C++ 2015\" in the setup (see https://blogs.msdn.microsoft.com/vcblog/2015/07/24/setup-changes-in-visual-studio-2015-affecting-c-developers/ for an explanation).\n\n\nGetting Started\n===============\n\n1.  Clone the 2vyper repository::\n\n        git clone https://github.com/viperproject/2vyper\n        cd 2vyper/\n\n2.  Create a virtual environment and activate it::\n\n        virtualenv env\n        source env/bin/activate\n        \n3.  Install 2vyper::\n\n        pip install .\n\n\nCommand Line Usage\n==================\n\nTo verify a specific file from the 2vyper directory, run::\n\n    2vyper [OPTIONS] path-to-file.vy\n\n\nThe following command line options are available::\n\n    ``--verifier``      \n                    Selects the Viper backend to use for verification.\n                    Possible options are ``silicon`` (for Symbolic Execution) and ``carbon`` \n                    (for Verification Condition Generation based on Boogie).  \n                    Default: ``silicon``.\n\n    ``--viper-jar-path``    \n                    Sets the path to the required Viper binaries (``silicon.jar`` or\n                    ``carbon.jar``). Only the binary for the selected backend is\n                    required. We recommend that you use the provided binary \n                    packages installed by default, but you can or compile your own from \n                    source.\n                    Expects either a single path or a colon- (Unix) or semicolon-\n                    (Windows) separated list of paths. Alternatively, the environment\n                    variables ``SILICONJAR``, ``CARBONJAR`` or ``VIPERJAR`` can be set.\n     \n    ``--z3``            \n                    Sets the path of the Z3 executable. Alternatively, the\n                    ``Z3_EXE`` environment variable can be set.\n                    \n    ``--boogie``        \n                    Sets the path of the Boogie executable. Required if the Carbon backend\n                    is selected. Alternatively, the ``BOOGIE_EXE`` environment variable can be\n                    set.    \n     \n    ``--counterexample``            \n                    Produces a counterexample if the verification fails. Currently only works\n                    with the default ``silicon`` backend.\n                    \n    ``--vyper-root``        \n                    Sets the root directory for the Vyper compiler.\n     \n    ``--skip-vyper``            \n                    Skips type checking the given Vyper program using the Vyper compiler.\n                    \n    ``--print-viper``        \n                    Print the generated Viper file to the command line.\n\nTo see all possible command line options, invoke ``2vyper`` without arguments.\n\n\nAlternative Viper Versions\n==========================\n\nTo use a custom version of the Viper infrastructure, follow the\n`instructions here \u003chttps://bitbucket.org/viperproject/documentation/wiki/Home\u003e`_. Look for\n``sbt assembly`` to find instructions for packaging the required JAR files. Use the\nparameters mentioned above to instruct 2vyper to use your custom Viper version.\nNote that 2vyper may not always work with the most recent Viper version.\n\n\nTroubleshooting\n=======================\n\n1.  On Windows: During the setup, you get an error like ``Microsoft Visual C++ 14.0 is required.`` or ``Unable to fnd vcvarsall.bat``: \n\n    Python cannot find the required Visual Studio 2015 C++ installation, make sure you have either installed the Build Tools or checked the \"Common Tools\" option in your regular VS 2015 installation (see above).\n\n2.  While verifying a file, you get a stack trace ending with something like ``No matching overloads found``:\n\n    The version of Viper you're using does not match your version of 2vyper. Try using the the one that comes with 2vyper instead.\n\n\nBuild Status\n============\n\n.. image:: https://pmbuilds.inf.ethz.ch/buildStatus/icon?job=2vyper-linux-xenial\u0026style=plastic\n   :alt: Build Status\n   :target: https://pmbuilds.inf.ethz.ch/job/2vyper-linux-xenial\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviperproject%2F2vyper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviperproject%2F2vyper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviperproject%2F2vyper/lists"}