Post
Topic
Board Announcements (Altcoins)
Re: [ANN] Destiny | scrypt (pow/pos) | deflation coin | no premine
by
InceptionCoin
on 26/02/2016, 05:25:12 UTC
...
Hi thank you for share, which version of python are you using, i am trying to run in 3.5.1 and i am getting "missing parenthesis in call to print", some idea what can it be?
Now it should work with any python version
Code:
# type here desired prefix
IWANT="inc"

#do not change anything after the signal
#BEEP
b58_digits = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
def base58_encode(n):
    l = []
    while n > 0:
        n, r = divmod(n, 58)
        l.insert(0,(b58_digits[r]))
    return ''.join(l)

lw=len(IWANT)
result=""

for i in IWANT:
  if not i in b58_digits:
    print "Address contain non b58 symbol"
    exit()

for i in range(16**6):
  pk=int(hex(i)+"0"*(8-len(hex(i))) + "0"*44,16)
  adr=base58_encode(pk)
  if adr[:lw]==IWANT:
    result=hex(i)+"0"*(8-len(hex(i))) + "0"*44
    break

result_string='base58Prefixes[PUBKEY_ADDRESS] = list_of'
for i in range(1,16):
  st=result[i*2:i*2+2]
  if st=="00":
    break
  else:
    result_string+="(%d)"%int('0x'+st,16)

result_string+=";"

print(result_string)