Skip to content

Commit

Permalink
Merge pull request #60 from skalenetwork/enhancement/SKALE-1703-add-s…
Browse files Browse the repository at this point in the history
…eparate-instances-of-skale-py

SKALE-1703 add lib spawn method
  • Loading branch information
dmytrotkk authored Dec 2, 2019
2 parents 9f0d6e0 + 1cf7dbc commit f44beaa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions skale/manager_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ class EmptyPrivateKey(Exception):
pass


def spawn_skale_lib(skale):
return Skale(skale._endpoint, skale._abi_filepath, skale.wallet)


class Skale:
def __init__(self, endpoint, abi_filepath, wallet=None):
logger.info(f'Init skale-py, connecting to {endpoint}')
provider = get_provider(endpoint)
self._abi_filepath = abi_filepath
self._endpoint = endpoint
self.web3 = Web3(provider)
self.abi = get_abi(abi_filepath)
self.__contracts = {}
Expand Down

0 comments on commit f44beaa

Please sign in to comment.