Skip to main content

No project description provided

Project description

Contract-Deployer-Interface

About project

This project is inner project of MyWish team which focused on python interface realization to deploy contracts in ethereum-like blockchains.

Install project

To install mywish-deployer use pip

pip install mywish-deployer

Brownie deployer

On version 0.3.0 this project supports contract deploy using brownie project. In normal case to deploy contract using brownie user need to use brownie-cli. Brownie deployer interacts with inner parts of brownie and provide opportunity to deploy contracts directly from python scripts.

How to use Brownie deployer

At first import Brownie deployer

from mywish import BrownieDeployer

Initialize brownie deployer

brownie_deployer = BrownieDeployer()

Deploy contract with all required arguments

contract = brownie_deployer.deploy(
    contract_code=contract_code,
    account_name='some_key',
    account_pass='some_pass',
    private_key='private_key',
    network='network_name',
    contract_name='some_name',
    etherscan_api_token='some_token',
    provider='network_provider',
    provider_id='provider_id',
)

contract_code: Full smart contract code

account_name: The name of the account that will be used when deploying contracts

account_pass: The name of the account that will be used when deploying contracts

private_key: The private of the account that will be used when deploying contracts

network: Network where contract will be deployed

contract_name: Contract name which will be used in deployment script

etherscan_api_token: Developer Etherscan API token

provider: Provider to use if network needs provider

provider_id: Provider ID

constructor_params: Params which will be used in contract deployment

config: Dataclass with all configurations for brownie projects

Method deploy will return Deployed contract address

WARNING! All params in constructor_params must be provided as strings for future formatting. But arguments which must be strings in params of constructor must be surrounded by double quotes. Like this:

constructor_params = ['\'{some_address}\'']

Brownie account settings

account_name and account_pass are name and password for brownie account associated with private key. Brownie-deployer will automatically create new account with given attributes if it does not exist. Brownie account data stored in dir ~/.brownie/....

For now brownie deployer is useful only for Ethereum network. In future, we will add support of others networks.

IDeployer interface

IDeployer is abstract model with one method "deploy" which used in different deployers.

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

mywish_deployer-0.3.7.tar.gz (19.3 kB view details)

Uploaded Source

File details

Details for the file mywish_deployer-0.3.7.tar.gz.

File metadata

  • Download URL: mywish_deployer-0.3.7.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for mywish_deployer-0.3.7.tar.gz
Algorithm Hash digest
SHA256 44401eb5bfc1218458a8c2dbd98b0ea5550c8e2a739324f7cf70614b0ee711b2
MD5 7d64cc02e397cd65e2dd6be04277e286
BLAKE2b-256 29a031c180320f81994d98003ccb6830e011d5ee2eedc15d599ff0d85d5a1d21

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