const std::string PaymentCode::asBase58() const
{
    OTData pubkey = Pubkey();

    uint8_t serialized[81]{};

    serialized[0] = PaymentCode::BIP47_VERSION_BYTE;
    serialized[1] = version_;
    serialized[2] = hasBitmessage_ ? 0x80 : 0;
    OTPassword::safe_memcpy(
        &serialized[3],
        33,
        pubkey.GetPointer(),
        pubkey.GetSize(),
        false);
    OTPassword::safe_memcpy(
        &serialized[36],
        32,
        chain_code_.GetPointer(),
        chain_code_.GetSize(),
        false);
    serialized[68] = bitmessage_version_;
    serialized[69] = bitmessage_stream_;

    OTData binaryVersion(serialized, sizeof(serialized));

    return App::Me().Crypto().Util().Base58CheckEncode(binaryVersion).Get();
}
void CompilerContext::injectVersionStampIntoSub(size_t _subIndex)
{
	eth::Assembly& sub = m_asm.sub(_subIndex);
	sub.injectStart(Instruction::POP);
	sub.injectStart(fromBigEndian<u256>(binaryVersion()));
}