dragonchain/lib/dto/bnb.py
def _publish_transaction(self, transaction_payload: str) -> str:
        """Publish a transaction to this network with a certain data payload
        Args:
            transaction_payload: The arbitrary data to send with this transaction
        Returns:
            The string of the published transaction hash
        """
        _log.info(f"[BINANCE] Publishing transaction. payload = {transaction_payload}")
        # cannot send an amount of 0 -- transaction will not be accepted!
        # send funds to yourself, avoid hardcoding a dummy recipient address
        raw_transaction = {"amount": 1, "to_address": self.address, "symbol": "BNB", "memo": transaction_payload}
        signed_tx = self.sign_transaction(raw_transaction)
        _log.info(f"[BINANCE] Sending signed transaction: {signed_tx}")
        response = self._call_node_rpc("broadcast_tx_commit", {"tx": signed_tx})
        response_json = response.json()
        # cannot check HTTP status codes, errors will return 200 :
        if response_json.get("error") is not None:
            _log.warning(f"[BINANCE] Error response from Binance node: {response_json['error']['data']}")
        return response_json["result"]["hash"]
Publish a transaction to this network with a certain data payload
        Args:
            transaction_payload: The arbitrary data to send with this transaction
        Returns:
            The string of the published transaction hash
        
Publish a transaction to this network with a certain data payload
Publish a transaction to this network with a certain data payload
def _publish_transaction(self, transaction_payload: str) -> str:
        _log.info(f"[BINANCE] Publishing transaction. payload = {transaction_payload}")
        raw_transaction = {"amount": 1, "to_address": self.address, "symbol": "BNB", "memo": transaction_payload}
        signed_tx = self.sign_transaction(raw_transaction)
        _log.info(f"[BINANCE] Sending signed transaction: {signed_tx}")
        response = self._call_node_rpc("broadcast_tx_commit", {"tx": signed_tx})
        response_json = response.json()
        if response_json.get("error") is not None:
            _log.warning(f"[BINANCE] Error response from Binance node: {response_json['error']['data']}")
        return response_json["result"]["hash"]
def _publish_transaction ( self , transaction_payload : str ) -> str : _log . info ( f"[BINANCE] Publishing transaction. payload = {transaction_payload}" ) raw_transaction = { "amount" : 1 , "to_address" : self . address , "symbol" : "BNB" , "memo" : transaction_payload } signed_tx = self . sign_transaction ( raw_transaction ) _log . info ( f"[BINANCE] Sending signed transaction: {signed_tx}" ) response = self . _call_node_rpc ( "broadcast_tx_commit" , { "tx" : signed_tx } ) response_json = response . json ( ) if response_json . get ( "error" ) is not None : _log . warning ( f"[BINANCE] Error response from Binance node: {response_json['error']['data']}" ) return response_json [ "result" ] [ "hash" ]
Publish a transaction to this network with a certain data payload
Publish a transaction to this network with a certain data payload
"""Publish a transaction to this network with a certain data payload
        Args:
            transaction_payload: The arbitrary data to send with this transaction
        Returns:
            The string of the published transaction hash
        """ # cannot send an amount of 0 -- transaction will not be accepted! # send funds to yourself, avoid hardcoding a dummy recipient address # cannot check HTTP status codes, errors will return 200 :
The string of the published transaction hash
The string of the published transaction hash
self
transaction_payload
str
The arbitrary data to send with this transaction
The arbitrary data to send with this transaction