Source code for solidbyte.templates.templates.bare

""" Create a bare project template """
from ...template import Template
from ....common.logging import getLogger

log = getLogger(__name__)


[docs]class BareTemplate(Template):
[docs] def __init__(self, *args, **kwargs): super(BareTemplate, self).__init__(*args, **kwargs)
[docs] def initialize(self): """ Initialize the template and create a bare project structure """ self.create_dirs() self.create_deployment() self.create_networks()
[docs] def create_deployment(self): """ Create the deploy file """ log.info("Creating contract deploy scripts...") self.copy_template_file(self.pwd, 'deploy', '__init__.py') self.copy_template_file(self.pwd, 'deploy', 'deploy_main.py')
[docs] def create_networks(self): """ Create the networks.yml file """ log.info("Creating networks.yml...") self.copy_template_file(self.pwd, '', 'networks.yml')
[docs]def get_template_instance(*args, **kwargs): """ Return a bare template """ return BareTemplate(*args, **kwargs)