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.1.tar.gz (7.4 kB view hashes)

Uploaded Source

Built Distribution

eclair_cli-1.0.1-py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 3

Supported by

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