{"id":21744022,"url":"https://github.com/telefonica/level_up","last_synced_at":"2025-04-13T05:07:53.866Z","repository":{"id":152333769,"uuid":"604529219","full_name":"Telefonica/level_up","owner":"Telefonica","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-27T10:31:40.000Z","size":1298,"stargazers_count":45,"open_issues_count":3,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-13T05:07:46.054Z","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":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Telefonica.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-21T08:53:34.000Z","updated_at":"2025-02-27T11:01:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"a33b969c-7d21-430e-8882-f57a16f6edf2","html_url":"https://github.com/Telefonica/level_up","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/Telefonica%2Flevel_up","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Telefonica%2Flevel_up/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Telefonica%2Flevel_up/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Telefonica%2Flevel_up/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Telefonica","download_url":"https://codeload.github.com/Telefonica/level_up/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665747,"owners_count":21142123,"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-26T07:09:45.435Z","updated_at":"2025-04-13T05:07:53.842Z","avatar_url":"https://github.com/Telefonica.png","language":"Python","readme":"![ [python_version](https://img.shields.io/badge/python-3.9%20%7C%203.10-blue) ](https://img.shields.io/badge/python-3.9%20%7C%203.10-blue)\n[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)\n\n# { level_up! : Web3 Security WarGames }\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./static/img/blockchain.jpeg\" alt=\"image\" width=\"256\"/\u003e\n\u003c/p\u003e\n\n\n**level_up!** is a smartcontracts challenge platform where users can register with their wallet and perform different challenges oriented to their security. In each challenge the corresponding Solidity code can be found for analysis.\n\n**level_up!** is based on the idea that the best way to improve smart contract security is through active participation. By motivating users to work in such an easy way to find security flaws, we hope to improve good programming practices within smart contracts.\n\n## Requirements\n- Python 3.9 or 3.10\n- [Ganache (CLI or GUI)](https://trufflesuite.com/ganache/)\n\n## Ganache\nThe easiest way to run Ganache is to use the GUI version, as it allows you to view the necessary information very quickly and the installation is easy to perform.\n\nIt is necessary to know the configuration information and then indicate it in the file to be created with the [environment variables](#environment-variables), such as the blockchain address, the port, the chainId and an address together with its private key.\n\n## Environment variables\n\nFor the environment variables there must be a file named `.env` in the root of the project (just like the `.flaskenv` file) with the following configuration:\n\n```\n# Files paths\nFILE_BYTECODES_PATH=bytecode.json\nFILE_ABI_PATH=abi.json\nFILE_DATA_PATH=data.json\nFILE_CONTRACT_ADDRESS=contract-address.json\n\n# Blockchain settings\nNETWORK=http://localhost:7545\nNETWORK_NAME=ganache-gui\nCHAIN_ID=1337\nADDRESS_OWNER=[ADDRESS_OWNER]\nPRIVATE_KEY=[PRIVATE_KEY_HERE]\n\n# Game settings\nLEVEL_BASE=1000\nLEVEL_NFT=1004\n```\n\nThe address and the private key must be specified in order to deploy the contracts.\n\nThe `.flaskenv` file contains the environment variables with the information about the flask launch.\n\n## About the virtual environment\n\n**levelup!** can be installed on the global Python environment, however, if you want to install on a virtual environment you can use [`pipenv`](https://pipenv-es.readthedocs.io/es/latest/) or `venv`, among others.\n\nThe following is the installation using `pipenv` as the virtual environment manager.\n\nFirst, you must install `pipenv`. Then, on the root directory of the project, the dependencies are installed and the virtual environment is activated:\n```\npipenv install\npipenv shell\n```\n\n**Note:** *You must ensure that you are using a supported version of Python, such as 3.9 or 3.10. This can be indicated at the time of creating the environment.*\n\n## Execution\n\nFinally, run **levelup!** with the `flask` command:\n```\nflask run\n```\n\n## Docker\n\nFor a more agile deployment, it is possible to run **levelup!** with Docker, mounting the entire environment by using the `docker-compose` command at the root of the project:\n```\ndocker-compose up\n```\nIf Docker is used, it is not necessary to create the `.env` file, since the environment variables are set in the `Dockerfile` file. In the `compose.yaml` are those that have to do with the blockchain configuration, such as `NETWORK`, `NETWORK_NAME`, `ADDRESS_OWNER` and `PRIVATE_KEY`.\n\n## Contact\n\nThe goal of **level_up!** is to facilitate learning in a new disruptive world. We recommend to always use it in a test environment, as it is designed and implemented to work in a test environment. We do not recommend using it in a production or real Blockchain (where transactions cost real money and we are not responsible for such use or misuse of the platform).\n\nThis software doesn't have a QA Process. This software is a **Proof of Concept**.If you have any problems, you can contact: ideaslocas@telefonica.com","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelefonica%2Flevel_up","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelefonica%2Flevel_up","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelefonica%2Flevel_up/lists"}