{"id":13408949,"url":"https://github.com/SkullElf/ABI2API","last_synced_at":"2025-03-14T13:32:16.093Z","repository":{"id":182391232,"uuid":"665655827","full_name":"SkullElf/ABI2API","owner":"SkullElf","description":"ABI2API serves SC ABIs on the MultiversX blockchain as APIs with interactive Swagger UI","archived":false,"fork":false,"pushed_at":"2023-08-07T09:51:28.000Z","size":108,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-31T20:32:20.326Z","etag":null,"topics":["twitter"],"latest_commit_sha":null,"homepage":"https://twitter.com/BobbetBot","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SkullElf.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-12T17:33:39.000Z","updated_at":"2024-05-02T17:54:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"ddace2ba-30ca-4275-9a48-d3014e93a4e3","html_url":"https://github.com/SkullElf/ABI2API","commit_stats":null,"previous_names":["skullelf/abi2api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkullElf%2FABI2API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkullElf%2FABI2API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkullElf%2FABI2API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkullElf%2FABI2API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SkullElf","download_url":"https://codeload.github.com/SkullElf/ABI2API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243584530,"owners_count":20314780,"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":["twitter"],"created_at":"2024-07-30T20:00:56.822Z","updated_at":"2025-03-14T13:32:16.081Z","avatar_url":"https://github.com/SkullElf.png","language":"Python","readme":"# ABI2API\n\nABI2API is a Python library for converting smart contract ABI (Application Binary Interface) on the MultiversX blockchain into a RESTful API. It allows developers to expose the functionality of a smart contract through a simple API interface, making it easier to interact with Smart Contracts.\n\n## Features\n\n- Converts smart contract ABI into a RESTful API\n- Supports GET and POST methods for contract functions\n- Generates API documentation using Swagger UI\n- Handles conversion of data types between ABI and API\n\n# Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/SkullElf/ABI2API.git\n```\n2. Install the required dependencies:\n```bash\npip install -r requirements.txt\n```\n\n# Configuration\n\n```bash\n# Copy the configuration file and make the necessary modifications.\ncp config/config.example.py config.py\n# Copy the ABI file to the project directory.\ncp config/abi.example.json abi.json\n```\n\n## Configuration - config.py\n### APIS list:\n| Key Name                                           | API item                                  |\n| -------------------------------------------------- | ----------------------------------------- |\n| SCADDRESS # Replace with smart contract address    | SCADDRESS: \"erdqqqqqqqqqqqqq...\"          |\n| ABI_PATH # Replace with ABI path                   | ABI_PATH: \"abi.json\"                      |\n| NAME # Replace with name of the API                | NAME: \"xexchange\"                         |\n\n### Config variables:\n| Variable name                                      | config.py                                 |\n| -------------------------------------------------- | ----------------------------------------- |\n| PORT # Replace with port for the application       | PORT:  80                                 |\n| ENVIRONMENT # Replace with environment name        | ENVIRONMENT:  \"mainnet\"                   |\n\n## Configuration - abi.json\nABIs are a collection of metatada about the contract.\n\nReplace the path of the abi.json file with the ABI of your smart contract.\n\n# Usage\n## Setup\nUpdate the config.py file with your specific configuration settings.\nPlace the following in the APIS list of instances:\n1. ABI JSON file path or URL.\n2. The corresponding Smart Contract address.\n3. The name for the API (will be used in the URL. See example below).\n\nAnd the following in the corresponding variables:\n1. Specify the port in which you want the API to be available (default=80).\n2. Specify the environment in which you'd like to query the smart contracts (default=\"mainnet\")\n\n\u003e TIP: `ABI_PATH` can also be a URL. This way you'll always be up to date with the latest versions!\n\nStart the API server:\n\n```\npython api.py\n```\n\nAccess the API documentation:\nOpen your web browser and visit http://localhost:80/NAME/ to view the Swagger UI documentation for the generated API (`NAME` being the app name specified in the config).\n\nMake API requests:\nYou can now make GET requests to interact with your smart contract functions. Refer to the API documentation for the available endpoints and request formats.\n\n\u003e TIP: You can use the URL parameter `smartcontractaddress=X` to override the SC address in the same environment, and query SC X using the same ABI JSON\n\n## Examples\nABI2API allows usage of multiple instances on the same port with different URL paths by entering multiple entries in the APIS list of the config:\n```python\nAPIS = [\n    {\n        \"SCADDRESS\": \"erd1qqqqqqqqqqqqqpgqc03cjhpykywz03qsavcmsjah65zkjhgxah0ssseq8a\",\n        \"ABI_PATH\": \"multisig.json\",\n        \"NAME\": \"multisig\"\n    },\n    {\n        \"SCADDRESS\": \"erd1qqqqqqqqqqqqqpgq6wegs2xkypfpync8mn2sa5cmpqjlvrhwz5nqgepyg8\",\n        \"ABI_PATH\": \"xoxno.json\",\n        \"NAME\": \"xoxno\"\n    }\n\n]\nPORT = 80\n```\nIn this example, ABI2API will provide the user with 2 different APIs on:\n1. http://localhost/multisig/\n2. http://localhost/xoxno/\n\n\u003e TIP: The `NAME` variable is a unique identifier, so make sure it's different in each entry.\n\n# Contributing\nContributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.\n\n# License\nThis project is licensed under the MIT License. See the LICENSE file for more information.\n","funding_links":[],"categories":["MultiversX community"],"sub_categories":["SDKs and dev tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSkullElf%2FABI2API","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSkullElf%2FABI2API","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSkullElf%2FABI2API/lists"}