For converting Ethereum smart contract ABIs into interactive HTML user interface.
Project description
PyContractUI
PyContractUI is a Python package that simplifies the process of creating interactive HTML user interfaces for Ethereum smart contracts. It automates the conversion of smart contract ABIs into web-based UIs, making it easier for developers to build GUIs .
Features
- Convert Ethereum smart contract ABIs into HTML user interfaces.
- Seamless integration with popular Ethereum wallets for smooth execution of smart contract functions.
Installation
You can install PyConttractUI using pip:
pip install py-contract-ui
Serving the GUI on Local server
If you want to interact with your smart contracts you might want to generate the GUI on a local server (without exporting it). If you want to export the GUI please read the next section.
To start the server you can execute the command below in the same folder where your smart contract ABI is located:
contract-ui-gen --serve
For example, if your ABIS is placed on the folder named contract/abis first you have to navigate into the folder contract/abis and then execute the command above command After running the local server, the GUI is available on the URL http://0.0.0.0:8000
If you want instead to specify a custom path of the directory of the smart contract ABIs, you can add the optional parameter as per below:
contract-ui-gen --contract /contracts/abis --serve
The command above generates the GUI using the ABI found in the folder contracts/abis
Exporting the GUI
You can export your smart contract ABIs into HTML using the below command
contract-ui-gen
The command will create a folder with the GUI in the directory where the command has been executed. Alternatively, you can add optional parameters to the source folder of the ABI and/or the destination folder where the GUI has to be exported to. For example:
contract-ui-gen --contract /contracts/abis --output gui_output
The command above generates the GUI using the ABI found in the folder /contracts/abis and exports to the gui_output folder
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py-contract-ui-0.0.3.tar.gz.
File metadata
- Download URL: py-contract-ui-0.0.3.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14979c9a5691f8acbca18b8efd874d7e5290e43315543a6a850effed7255750b
|
|
| MD5 |
e054ed737a5593eec5c856907d24e6a4
|
|
| BLAKE2b-256 |
8d86c57235b63f8e4dcdd588a146f873e201ab1059b7791f2b3f27e896821a0f
|
File details
Details for the file py_contract_ui-0.0.3-py3-none-any.whl.
File metadata
- Download URL: py_contract_ui-0.0.3-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f99fe950e8794128de5d7744554c8c02c6182edd72b4d5a7abda2defff25bdb
|
|
| MD5 |
cf14417d1989501132741051674507ef
|
|
| BLAKE2b-256 |
049f6e882ebf153ca7297829a1768037affcca8e2e63ef02db11604b86f07425
|