Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insufficient data remaining for VarString #4

Open
marcianovc opened this issue Apr 16, 2018 · 0 comments
Open

Insufficient data remaining for VarString #4

marcianovc opened this issue Apr 16, 2018 · 0 comments

Comments

@marcianovc
Copy link

marcianovc commented Apr 16, 2018

I am adapting the code to MarteXcoin, but this is happening this error, could you help me?

PHP Fatal error:  Uncaught BitWasp\Buffertools\Exceptions\ParserOutOfRange: Insufficient data remaining for VarString in /var/www/html/openassetsphp/vendor/bitwasp/buffertools/src/Buffertools/Types/VarString.php:55
Stack trace:
#0 /var/www/html/openassetsphp/vendor/youkchan/monacoin/src/Serializer/Transaction/TransactionInputSerializer.php(66): BitWasp\Buffertools\Types\VarString->read(Object(BitWasp\Buffertools\Parser))
#1 /var/www/html/openassetsphp/vendor/youkchan/monacoin/src/Serializer/Transaction/TransactionSerializer.php(70): BitWasp\Bitcoin\Serializer\Transaction\TransactionInputSerializer->fromParser(Object(BitWasp\Buffertools\Parser))
#2 /var/www/html/openassetsphp/vendor/youkchan/monacoin/src/Serializer/Transaction/TransactionSerializer.php(119): BitWasp\Bitcoin\Serializer\Transaction\TransactionSerializer->fromParser(Object(BitWasp\Buffertools\Parser))
#3 /var/www/html/openassetsphp/vendor/youkchan/monacoin/src/Transaction/TransactionFactory.php(48): BitWasp\Bitcoin\Serializer\Transaction\TransactionSerializer->par in /var/www/html/openassetsphp/vendor/bitwasp/buffertools/src/Buffertools/Types/VarString.php on line 55

My Martexcoin.php is:


<?php

namespace BitWasp\Bitcoin\Network\Networks;

use BitWasp\Bitcoin\Network\Network;
use BitWasp\Bitcoin\Script\ScriptType;

class Martexcoin extends Network
{
    /**
     * {@inheritdoc}
     * @see Network::$base58PrefixMap
     */
    protected $base58PrefixMap = [
        self::BASE58_ADDRESS_P2PKH => "32",
        self::BASE58_ADDRESS_P2SH => "05",
        self::BASE58_WIF => "b2",
    ];

    /**
     * {@inheritdoc}
     * @see Network::$bip32PrefixMap
     */
    protected $bip32PrefixMap = [
        self::BIP32_PREFIX_XPUB => "0488b21e",
        self::BIP32_PREFIX_XPRV => "0488ade4",
    ];

    /**
     * {@inheritdoc}
     * @see Network::$bip32ScriptTypeMap
     */
    protected $bip32ScriptTypeMap = [
        self::BIP32_PREFIX_XPUB => ScriptType::P2PKH,
        self::BIP32_PREFIX_XPRV => ScriptType::P2PKH,
    ];

    /**
     * {@inheritdoc}
     * @see Network::$signedMessagePrefix
     */
    protected $signedMessagePrefix = "MarteX Signed Message";

    /**
     * {@inheritdoc}
     * @see Network::$p2pMagic
     */
    protected $p2pMagic = "f5a23f2d";
    //protected $p2pMagic = "2d3fa2f5";

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant