Skip to main content

Starknet Simple Deploy

Project description

Starknet Simple Deploy

Overview

Starknet Simple Deploy is a Python package designed to simplify the process of deploying StarkNet smart contracts. It provides a set of APIs that abstract away the complexities involved in the deployment process, making it more accessible for developers of all skill levels. It utilizes API's from https://github.com/software-mansion/starknet.py

Features

  • Simplified Deployment: Decalre and Deploy StarkNet smart contracts with minimal setup and configuration.
  • Configurable: Supports custom deployment configurations through DeployerConfig.
  • Write Deployment Data: Supports ability to write data to a json file throug ContractDataWriter.
  • Async Support: Fully asynchronous API for efficient contract deployment.
  • Error Handling: Designed to gracefully handle deployment errors and provide clear feedback.

Installation

To install Starknet Simple Deploy, run the following command in your terminal:

pip install starknet-simple-deploy

Quick Start

Here's a quick example to get you started with deploying a StarkNet smart contract:


from starknet_simple_deploy import (
    DeclareContract,
    DeployContract, 
    DeployerConfig, 
    ContractDataWriter, 
    InitializeContractData,

)
from starknet_simple_deploy.utils import get_abi


deployer_config = DeployerConfig.get_config(deploy_env, chain).init_account()
initialized_contract = InitializeContractData(contract_name="MyContract")
casm_class_hash, compiled_contract, sierra_class_hash = initialized_contract.read_contract_file_data()
declared_contract = DeclareContract(
    deployer_config,
    casm_class_hash,
    compiled_contract,
    sierra_class_hash
)
declared_contract = await declared_contract.get_contract()
deployer = DeployContract(
    declared_contract,
    deployer_config,
    sierra_class_hash,
    constructor_args={
        "oracle_address": deployed_oracle_contract.address,
        "contract_class_hash": sierra_class_hash
    }
)
deployed_contract = await deployer.deploy()
ContractDataWriter.write_data(
    deploy_env=args.deploy_env, 
    abi=get_abi(declared_contract),
    chain_id=deployer_config.chain_id,
    contract_name="MyContract", 
    address = deployed_contract.address
)

Contributing

Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request with your changes. For major changes, please open an issue first to discuss what you would like to change.

License

Starknet Simple Deploy is released under the MIT License.

Support

If you have any questions or encounter any issues, please open an issue on the GitHub repository, and we'll do our best to assist you.

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

starknet-simple-deploy-0.1.4.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

starknet_simple_deploy-0.1.4-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file starknet-simple-deploy-0.1.4.tar.gz.

File metadata

  • Download URL: starknet-simple-deploy-0.1.4.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for starknet-simple-deploy-0.1.4.tar.gz
Algorithm Hash digest
SHA256 29454c8bdc04225f7af6b919ac083f770402bcec0f55737c441f52ba835d8baa
MD5 7467f3d2b9b48ba562148bc628bd2758
BLAKE2b-256 d46bdfd748e22c27148aa589091abaf019e6f208e1ec3c296efc74c41f5e8890

See more details on using hashes here.

File details

Details for the file starknet_simple_deploy-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for starknet_simple_deploy-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b0703f5b8aefc477321dde2ed141b93883c2a938304ba1ef835f9585fdae9822
MD5 89a6dfb77c024e31e875f03cc3181432
BLAKE2b-256 532e06c849f0782a9b4c1b268de419983d7c1d91ce105a78bccad90259f02301

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