Skip to main content

A tool to create library wrappers for Blockchain Business Logic code.

Project description

Eclair CLI Tool

Description

Eclair is a Command Line Interface (CLI) tool designed to streamline the creation of library wrappers for Blockchain Business Logic code. With Eclair, you can initialize a new project and aggregate function definitions from solidity files, generating Python code as a result.

Installation

Eclair can be installed via pip:

pip install eclair

Usage

Initialize a Project

To initialize a new project, use the init command:

eclair init

During initialization, you will be asked to specify:

  • The directory where you want to instantiate the project (default is the current directory).

  • The preferred RPC endpoint (default is localhost:7545).

  • The preferred Deployer address.

The tool will automatically create necessary directories and a configuration file in JSON format.

Generate Python Library Wrappers

To generate Python library wrappers from your Solidity files, simply run Eclair with no arguments:

eclair

This will process Solidity files found in the contracts directory of your project, generate an ABI for each contract, and then generate a Python class for each ABI in the wrappers directory.

Configuration

Eclair's behavior can be customized via the eclair.config.json file in your project directory. This file is created when you initialize a project and includes a number of settings:

  • run_compile: Whether to compile the Solidity files before processing (default is true).

  • constructor_args: Arguments to be passed to the contract constructor when deploying.

  • network_name: Network to deploy to (e.g., http://example.com).

  • private_key: Your private key for signing transactions.

  • abi_path: Path to the ABI file for the contract.

  • from_address: Your address (will be used as the sender of transactions).

  • gas: Gas limit for transactions.

  • gas_price: Gas price for transactions.

  • nonce: Nonce for transactions.

  • output_directory: Directory to output the Python wrapper classes to (default is wrappers).

Contributing

Contributions to Eclair are welcome! Please read our contributing guidelines for how to proceed.

License

Eclair is released under the MIT License. See the LICENSE file for more details.

Contact

If you have any issues or feature requests, please open an issue on the Eclair GitHub page. For other inquiries, you can reach out ioc.exchange/@formalcurryfication ~!

MIT License can be accessed here

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

eclair-cli-1.0.3.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

eclair_cli-1.0.3-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file eclair-cli-1.0.3.tar.gz.

File metadata

  • Download URL: eclair-cli-1.0.3.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for eclair-cli-1.0.3.tar.gz
Algorithm Hash digest
SHA256 9d8d018cc777cb5f63db575075a8be1c54efb0396df0e3665b0bb8bbbc7784a4
MD5 959cf0f6f93945b5d733d950b14b0e92
BLAKE2b-256 a6246e79449c0946942566542d1bba11a660d8ce6b2ff9f549ea3400abdbb47a

See more details on using hashes here.

File details

Details for the file eclair_cli-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: eclair_cli-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for eclair_cli-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d1af2195e46e4ddf4374c693cd32d99a088a6c66d5400451a30eadfccddcb03d
MD5 eb4557cd8fec42b7c41f1933d7b05da7
BLAKE2b-256 24b6b5899f6972c891239cb16177c7a3e7fa0e966ba1954f0e42a33ac12e7c1a

See more details on using hashes here.

Supported by

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