Get the receipt of a tx.

        :param tx_hash: hash of the transaction
        :return: Tx receipt
497176
def get_tx_receipt(tx_hash):
        
        try:
            Web3Provider.get_web3().eth.waitForTransactionReceipt(tx_hash, timeout=20)
        except Timeout:
            logger.info('Waiting for transaction receipt timed out.')
            return
        return Web3Provider.get_web3().eth.getTransactionReceipt(tx_hash)
1232526
def issue(self, chain):
        

        blockchain_bytes = self.certificate_batch_handler.prepare_batch()

        for attempt_number in range(0, self.max_retry):
            try:
                txid = self.transaction_handler.issue_transaction(blockchain_bytes)
                self.certificate_batch_handler.finish_batch(txid, chain)
                logging.info('Broadcast transaction with txid %s', txid)
                return txid
            except BroadcastError:
                logging.warning(
                    'Failed broadcast reattempts. Trying to recreate transaction. This is attempt number %d',
                    attempt_number)
        logging.error('All attempts to broadcast failed. Try rerunning issuer.')
        raise BroadcastError('All attempts to broadcast failed. Try rerunning issuer.')
1103318
function (web3Provider, transactionHash) {
    return new Promise(function (onResolve, onReject) {
      // number of times it will attempt to fetch
      var maxAttempts = 50;

      // time interval
      const timeInterval = 15000;

      var getReceipt = async function () {
        if (maxAttempts > 0) {
          const receipt = await web3Provider.eth.getTransactionReceipt(transactionHash);

          if (receipt) {
            return onResolve(responseHelper.successWithData({receipt: receipt}));
          } else {
            maxAttempts--;
            setTimeout(getReceipt, timeInterval);
          }
        } else {
          let errObj = responseHelper.error({
            internal_error_identifier: 'l_ci_h_getTransactionReceiptFromTrasactionHash',
            api_error_identifier: 'receipt_not_found',
            error_config: basicHelper.fetchErrorConfig()
          });
          return onResolve(errObj);
        }
      };


      getReceipt();
    });
  }
801548
def _fulfill(self, *args, **kwargs):
        
        tx_hash = self.send_transaction('fulfill', args, **kwargs)
        receipt = self.get_tx_receipt(tx_hash)
        return receipt.status == 1
231133
def get_tx(txid, use_cache = true)
      decode_tx = use_cache ? load_cached_tx(txid) : load_tx(txid)
      Bitcoin::Protocol::Tx.new(decode_tx.htb)
    end
1310013
def check_successful_tx(web3: Web3, txid: str, timeout=180) -> Tuple[dict, dict]:
    
    receipt = wait_for_transaction_receipt(web3=web3, txid=txid, timeout=timeout)
    txinfo = web3.eth.getTransaction(txid)
    if 'status' not in receipt:
        raise KeyError(
            'A transaction receipt does not contain the "status" field. '
            'Does your chain have Byzantium rules enabled?',
        )
    if receipt['status'] == 0:
        raise ValueError(f'Status 0 indicates failure')
    if txinfo['gas'] == receipt['gasUsed']:
        raise ValueError(f'Gas is completely used ({txinfo["gas"]}). Failure?')
    return (receipt, txinfo)
639616
def broadcast_transaction(self, hex_tx):
        

        resp = self.obj.sendrawtransaction(hex_tx)
        if len(resp) > 0:
            return {'transaction_hash': resp, 'success': True}
        else:
            return error_reply('Invalid response from bitcoind.')
1368394
def get_lock_state_transaction(self, transaction_id):
        
        response = None
        try:
            response = requests.get(
                urls.get_lockstate_transaction(self._giid, transaction_id),
                headers={
                    'Accept': 'application/json, text/javascript, */*; q=0.01',
                    'Cookie': 'vid={}'.format(self._vid)})
        except requests.exceptions.RequestException as ex:
            raise RequestError(ex)
        _validate_response(response)
        return json.loads(response.text)
106891
def _get_block_transactions(
            self,
            transaction_root: Hash32,
            transaction_class: Type['BaseTransaction']) -> Iterable['BaseTransaction']:
        
        for encoded_transaction in self._get_block_transaction_data(self.db, transaction_root):
            yield rlp.decode(encoded_transaction, sedes=transaction_class)
346755
public function transaction($txhash) {
        $response = $this->dataClient->get($this->converter->getUrlForTransaction($txhash));
        $res = $this->converter->convertTx($response->body(), null);

        if ($this->converter instanceof BtccomConverter) {
            $res['raw'] = \json_decode($this->dataClient->get("tx/{$txhash}/raw")->body(), true)['data'];
        }

        return $res;
    }
155069
def tx_for_tx_hash(self, tx_hash):
        ""
        URL = self.api_domain + ("/rawtx/%s?format=hex" % b2h_rev(tx_hash))
        tx = Tx.from_hex(urlopen(URL).read().decode("utf8"))
        return tx
878904
def get_transaction_result(
            self,
            transaction: BaseOrSpoofTransaction,
            at_header: BlockHeader) -> bytes:
        
        with self.get_vm(at_header).state_in_temp_block() as state:
            computation = state.costless_execute_transaction(transaction)

        computation.raise_if_error()
        return computation.output
135392
def tx_for_tx_hash(self, tx_hash):
        
        try:
            url_append = "?token=%s&includeHex=true" % self.api_key
            url = self.base_url("txs/%s%s" % (b2h_rev(tx_hash), url_append))
            result = json.loads(urlopen(url).read().decode("utf8"))
            tx = Tx.parse(io.BytesIO(h2b(result.get("hex"))))
            return tx
        except Exception:
            raise Exception
255118
def tx_serialization_order(provider: Provider, blockhash: str, txid: str) -> int:
    ''''''

    return provider.getblock(blockhash)["tx"].index(txid)
1078392
def AddTransaction(self, tx):
        
        if BC.Default() is None:
            return False

        if tx.Hash.ToBytes() in self.MemPool.keys():
            return False

        if BC.Default().ContainsTransaction(tx.Hash):
            return False

        if not tx.Verify(self.MemPool.values()):
            logger.error("Verifying tx result... failed")
            return False

        self.MemPool[tx.Hash.ToBytes()] = tx

        return True
406182
def poll(
            self,
            transaction_hash: bytes,
    ):
        
        if len(transaction_hash) != 32:
            raise ValueError(
                'transaction_hash must be a 32 byte hash',
            )

        transaction_hash = encode_hex(transaction_hash)

        # used to check if the transaction was removed, this could happen
        # if gas price is too low:
        #
        # > Transaction (acbca3d6) below gas price (tx=1 Wei ask=18
        # > Shannon). All sequential txs from this address(7d0eae79)
        # > will be ignored
        #
        last_result = None

        while True:
            # Could return None for a short period of time, until the
            # transaction is added to the pool
            transaction = self.web3.eth.getTransaction(transaction_hash)

            # if the transaction was added to the pool and then removed
            if transaction is None and last_result is not None:
                raise Exception('invalid transaction, check gas price')

            # the transaction was added to the pool and mined
            if transaction and transaction['blockNumber'] is not None:
                last_result = transaction

                # this will wait for both APPLIED and REVERTED transactions
                transaction_block = transaction['blockNumber']
                confirmation_block = transaction_block + self.default_block_num_confirmations

                block_number = self.block_number()

                if block_number >= confirmation_block:
                    return transaction

            gevent.sleep(1.0)
434685
def get_transaction_by_id(cls, txid):
        

        for api_call in cls.GET_TRANSACTION_BY_ID_MAIN:
            try:
                return api_call(txid)
            except cls.IGNORED_ERRORS:
                pass

        raise ConnectionError('All APIs are unreachable.')