Exemplo n.º 1
0
    def connect_to_blockchain(self):
        """Initialize all blockchain entities from parsed config values"""

        self.blockchain = Blockchain.from_config(filepath=self.config_filepath)
        self.accounts = self.blockchain.interface.w3.eth.accounts

        #TODO: Exception handling here for key error when using incompadible operating mode
        if self.payload['tester'] and self.payload['deploy']:
            self.blockchain.interface.deployer_address = self.accounts[0]
Exemplo n.º 2
0
    def connect_to_blockchain(self):
        """Initialize all blockchain entities from parsed config values"""

        if self.node_config is constants.NO_NODE_CONFIGURATION:
            raise RuntimeError("No node configuration is available")

        self.blockchain = Blockchain.from_config(config=self.node_config)
        self.accounts = self.blockchain.interface.w3.eth.accounts

        if self.node_config.deploy:
            self.blockchain.interface.deployer_address = self.accounts[0]