Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# Convert to int in base 16
op = int(pk_op[cur:cur+2], 16)
# Incremenet the cursor by 4 bytes
cur += 2
# If the code is between 1-75, it's a number of bytes
# to add to stack
if (op >= 1) & (op <= 75):
# Get these and add these to script
script += ['PUSH_BYTES', op, pk_op[cur:cur+op * 2]]
cur += op * 2
else:
# Otherwise, get the OP_CODE from the dictionary
# If it's for an undefined code, return the code number
script += [OP_CODES.get(op, op)]
return script
# Convert to int in base 16
op = int(pk_op[cur:cur+2], 16)
# Incremenet the cursor by 4 bytes
cur += 2
# If the code is between 1-75, it's a number of bytes
# to add to stack
if (op >= 1) & (op <= 75):
# Get these and add these to script
script += ['PUSH_BYTES', op, pk_op[cur:cur+op * 2]]
cur += op * 2
else:
# Otherwise, get the OP_CODE from the dictionary
# If it's for an undefined code, return the code number
script += [OP_CODES.get(op, op)]
return script