Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-contract-ui-0.0.1.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_contract_ui-0.0.1-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file py-contract-ui-0.0.1.tar.gz.

File metadata

  • Download URL: py-contract-ui-0.0.1.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

Hashes for py-contract-ui-0.0.1.tar.gz
Algorithm Hash digest
SHA256 03a30cafc0fad325060afe8a8378a1356b04ccc586af5b7d47248aaf93f960b1
MD5 3f5307a9509bc4d11f7c2420fc8408bc
BLAKE2b-256 8c32bb910573fb4c7930b1d40fb919e7f55e89e2ef9fc2241017547bf90aa2c9

See more details on using hashes here.

File details

Details for the file py_contract_ui-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: py_contract_ui-0.0.1-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

Hashes for py_contract_ui-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b012d6182f5bc9c92ebeeb1c053a26e594793e0b0c5a5c171a13ba1dd6b90c4b
MD5 353dcc4f6eb32cde291f0e6bcad1733f
BLAKE2b-256 815baf5b79d2c01e8496a331c6d50b138a398b7df53e05999cf4dfc1e264a7db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page