Deployer¶
Ethereum deployment functionality
-
class
solidbyte.deploy.
Deployer
(network_name: str, account: str = None, project_dir: Union[pathlib.Path, str] = None)[source]¶ The big ugly black box of an object that handles deployment in one giant muddy process but it tries to be useful to various parts of the system and represent the current state of the entire project’s deployments.
The primary purpose of this object is to know if a deployment is necessary, and to handle the deployment of all contracts if necessary.
Example:
from solidbyte.deploy import Deployer d = Deployer('test', '0xdeadbeef00000000000000000000000000000000', Path('/path/to/my/project')) assert d.check_needs_deploy() == True d.deploy()
-
__init__
(network_name: str, account: str = None, project_dir: Union[pathlib.Path, str] = None)[source]¶ Initialize the Deployer. Get it juiced up. Make the machine shudder.
Parameters: - network_name – (
str
) The name of of the network, as defined in networks.yml. - account – (
str
) The address of the account to deploy with. - project_dir – (
Path
/str
) The project directory, if not pwd.
- network_name – (
-
artifacts
¶ Returns the ABI and Bytecode artifacts, generated from the build direcotry.
Parameters: force – ( bool
) Force load, don’t just rely on cached dicts.Returns: ( AttrDict
) An AttrDict representing all available contracts
-
check_needs_deploy
(name: str = None) → bool[source]¶ Check if any contracts need to be deployed
Parameters: name – ( str
) The name of a contract if checking a specific.Returns: ( bool
) if deployment is required
-
contracts
¶ Returns instantiated Contract objects to provide to the deploy scripts.
Parameters: force – ( bool
) Force load, don’t just rely on cached data.
-
deploy
() → bool[source]¶ Deploy the contracts with magic lol
Returns: ( bool
) if deployment succeeded. Fails miserably if it didn’t.
-
deployed_contracts
¶ Contracts from MetaFile
-
get_artifacts
(force: bool = False) → attrdict.dictionary.AttrDict[source]¶ Returns the ABI and Bytecode artifacts, generated from the build direcotry.
Parameters: force – ( bool
) Force load, don’t just rely on cached dicts.Returns: ( AttrDict
) An AttrDict representing all available contracts
-