// Copyright (c) 2016-2024 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * * holder information and the developer policies on copyright and licensing. * * * * Unless otherwise agreed in a custom licensing agreement, no part of the * * SuperNET software, including this file may be copied, modified, propagated * * or distributed except according to the terms contained in the LICENSE file * * * * Removal or modification of this copyright notice is prohibited. * * * ******************************************************************************/ #include "script/cc.h" bool IsCryptoConditionsEnabled() { return 0; } static unsigned char* CopyPubKey(CPubKey pkIn) { unsigned char* pk = (unsigned char*) malloc(33); memcpy(pk, pkIn.begin(), 33); // TODO: compressed? return pk; } bool GetPushData(const CScript &sig, std::vector &data) { opcodetype opcode; auto pc = sig.begin(); if (sig.GetOp(pc, opcode, data)) return opcode > OP_0 && opcode <= OP_PUSHDATA4; return false; } bool GetOpReturnData(const CScript &sig, std::vector &data) { auto pc = sig.begin(); opcodetype opcode; if (sig.GetOp2(pc, opcode, NULL)) if (opcode == OP_RETURN) if (sig.GetOp(pc, opcode, data)) return opcode > OP_0 && opcode <= OP_PUSHDATA4; return false; }