sammchardy / python-binance-chain

Binance Chain Exchange API python implementation for automated trading
http://python-binance-chain.rtfd.io
MIT License
302 stars 132 forks source link

Broadcast error. tx parse error #26

Closed logan059 closed 5 years ago

logan059 commented 5 years ago

Enviroment

binance chain full node version: 0.6.0 env: linux

code

transfer_msg = TransferMsg(  
        wallet=wallet,  
        symbol='BNB',  
        amount=0.12345,  
        to_address='tbnb15cwx4kh8qcgr0uumm4hf20a4lsd7znpdjykevc',  
        memo='Transfer one BNB'  
    )  
    transfer_msg.wallet.initialise_wallet()  
    data = transfer_msg.to_hex_data()   

then I broadcast tx data with rpc broadcast_tx_commit & broadcast_tx_sync

Response:

{ "jsonrpc": "2.0", "id": "", "result": { "check_tx": { "code": 65538, "log": "{\"codespace\":1,\"code\":2,\"abci_code\":65538,\"message\":\"tx parse error\"}" }, "deliver_tx": {}, "hash": "80273E69A422A5F083EAF20B3401C16BB067AF5CAFD7FC535BC8ED431D284FA0", "height": "0" } }

logan059 commented 5 years ago

Fixed. raw data error.