19 case OP_0 :
return "0";
25 case OP_1 :
return "1";
26 case OP_2 :
return "2";
27 case OP_3 :
return "3";
28 case OP_4 :
return "4";
29 case OP_5 :
return "5";
30 case OP_6 :
return "6";
31 case OP_7 :
return "7";
32 case OP_8 :
return "8";
33 case OP_9 :
return "9";
34 case OP_10 :
return "10";
35 case OP_11 :
return "11";
36 case OP_12 :
return "12";
37 case OP_13 :
return "13";
38 case OP_14 :
return "14";
39 case OP_15 :
return "15";
40 case OP_16 :
return "16";
43 case OP_NOP :
return "OP_NOP";
44 case OP_VER :
return "OP_VER";
45 case OP_IF :
return "OP_IF";
49 case OP_ELSE :
return "OP_ELSE";
58 case OP_2DUP :
return "OP_2DUP";
59 case OP_3DUP :
return "OP_3DUP";
61 case OP_2ROT :
return "OP_2ROT";
65 case OP_DROP :
return "OP_DROP";
66 case OP_DUP :
return "OP_DUP";
67 case OP_NIP :
return "OP_NIP";
68 case OP_OVER :
return "OP_OVER";
69 case OP_PICK :
return "OP_PICK";
70 case OP_ROLL :
return "OP_ROLL";
71 case OP_ROT :
return "OP_ROT";
72 case OP_SWAP :
return "OP_SWAP";
73 case OP_TUCK :
return "OP_TUCK";
76 case OP_CAT :
return "OP_CAT";
78 case OP_LEFT :
return "OP_LEFT";
80 case OP_SIZE :
return "OP_SIZE";
84 case OP_AND :
return "OP_AND";
85 case OP_OR :
return "OP_OR";
86 case OP_XOR :
return "OP_XOR";
93 case OP_1ADD :
return "OP_1ADD";
94 case OP_1SUB :
return "OP_1SUB";
95 case OP_2MUL :
return "OP_2MUL";
96 case OP_2DIV :
return "OP_2DIV";
98 case OP_ABS :
return "OP_ABS";
99 case OP_NOT :
return "OP_NOT";
101 case OP_ADD :
return "OP_ADD";
102 case OP_SUB :
return "OP_SUB";
103 case OP_MUL :
return "OP_MUL";
104 case OP_DIV :
return "OP_DIV";
105 case OP_MOD :
return "OP_MOD";
117 case OP_MIN :
return "OP_MIN";
118 case OP_MAX :
return "OP_MAX";
123 case OP_SHA1 :
return "OP_SHA1";
134 case OP_NOP1 :
return "OP_NOP1";
136 case OP_NOP3 :
return "OP_NOP3";
137 case OP_NOP4 :
return "OP_NOP4";
138 case OP_NOP5 :
return "OP_NOP5";
139 case OP_NOP6 :
return "OP_NOP6";
140 case OP_NOP7 :
return "OP_NOP7";
141 case OP_NOP8 :
return "OP_NOP8";
142 case OP_NOP9 :
return "OP_NOP9";
172 if (!
GetOp(pc, opcode))
178 if (fAccurate && lastOpcode >=
OP_1 && lastOpcode <=
OP_16)
181 n += MAX_PUBKEYS_PER_MULTISIG;
197 std::vector<unsigned char>
data;
198 while (pc < scriptSig.
end())
215 return (this->
size() == 25 &&
218 (*
this)[2] == 0x14 &&
226 return (this->
size() == 23 &&
228 (*
this)[1] == 0x14 &&
235 return (this->
size() == 51 &&
239 (*
this)[3] ==
OP_IF &&
241 (*
this)[5] == 0x14 &&
243 (*
this)[27] == 0x14 &&
256 return (this->
size() == 26 &&
260 (*
this)[3] == 0x14 &&
267 return (!this->
empty() && (*
this)[0] == opcode);
290 if (!
GetOp(pc, opcode))
309 return memusage::DynamicUsage(*
static_cast<const CScriptBase*
>(
this));
Serialized script, used inside transaction inputs and outputs.
bool IsPayToScriptHash() const
bool IsPayToColdStakingLOF() const
bool StartsWithOpcode(const opcodetype opcode) const
size_t DynamicMemoryUsage() const
static int DecodeOP_N(opcodetype opcode)
Encode/decode small integers:
bool IsZerocoinSpend() const
bool IsZerocoinPublicSpend() const
bool GetOp(iterator &pc, opcodetype &opcodeRet, std::vector< unsigned char > &vchRet)
unsigned int GetSigOpCount(bool fAccurate) const
Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs as 20 sigops.
bool IsZerocoinMint() const
bool IsPayToPublicKeyHash() const
bool IsPayToColdStaking() const
bool IsPayToExchangeAddress() const
Implements a drop-in replacement for std::vector<T> which stores up to N elements directly (without h...
const char * GetOpName(opcodetype opcode)
opcodetype
Script opcodes.
@ OP_CHECKCOLDSTAKEVERIFY
@ OP_CHECKCOLDSTAKEVERIFY_LOF