def __init__(self, contract_name, contracts_folder=contracts_directory, provider=infura_provider): Connector.__init__(self, provider) self.contract_file = f"{contracts_folder + contract_name}.sol" with open(self.contract_file, 'r') as contract_code: self.source_code = contract_code.read() self.compiled = compile_source(self.source_code) self.abi = self.compiled[f'<stdin>:{contract_name}']['abi'] self.bin = self.compiled[f'<stdin>:{contract_name}']['bin']
def __init__(self): self.logger.debug('PLTEConnector Init') Connector.__init__(self, PLTEManager.getInstance()) self.plteQueId = int(ConfManager.getInstance().getConfigData( ConfManager.MSGQUEUE_INFO, "PLTEIB")) try: maxQSize = ConfManager.getInstance().getConfigData( ConfManager.MSGQUEUE_INFO, "MAX_QUEUE_SIZE") self.plteQueue = sysv_ipc.MessageQueue( self.plteQueId, max_message_size=int(maxQSize)) except Exception as e: self.logger.error( "msgQueue Connection Failed.. PLTE QUEUE_ID[%d] SIZE[%s]" % (self.plteQueId, maxQSize))
def __init__(self, url, api_key, api_user = '', api_pass = ''): self.url = url self.api_key = api_key Connector.__init__(self, url, api_key, api_user, api_pass)
def __init__(self, url, api_key, api_user='', api_pass=''): self.url = url self.api_key = api_key Connector.__init__(self, url, api_key, api_user, api_pass)