Bitcoin Forum
May 04, 2024, 02:12:14 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What's the structure of script  (Read 664 times)
esuncloud (OP)
Member
**
Offline Offline

Activity: 98
Merit: 10


View Profile
July 27, 2013, 09:41:33 PM
 #1

I am working on the fork of p2pool to a new coin, and it seems that the donation script in the original could only accept BTC, etc.
How to change this script to a new address? It looks like something below:
DONATION_SCRIPT = '51210241b8aba0994f320a8b438c627dbf31fbdd7dc722dd8418d829d67a9c6e4fd69021036fbd9 d0a34a569f10b0431c8aeecf74ad796b99838b7272ef35ded130a794f9b52ae'.decode('hex')
I dig for a while, and could see that DONATION_SCRIPT[2:35] is pubkey of donation address, but what's the rest of them?
Any comments will be appreciated, thanks a lot.
1714831934
Hero Member
*
Offline Offline

Posts: 1714831934

View Profile Personal Message (Offline)

Ignore
1714831934
Reply with quote  #2

1714831934
Report to moderator
1714831934
Hero Member
*
Offline Offline

Posts: 1714831934

View Profile Personal Message (Offline)

Ignore
1714831934
Reply with quote  #2

1714831934
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714831934
Hero Member
*
Offline Offline

Posts: 1714831934

View Profile Personal Message (Offline)

Ignore
1714831934
Reply with quote  #2

1714831934
Report to moderator
esuncloud (OP)
Member
**
Offline Offline

Activity: 98
Merit: 10


View Profile
July 28, 2013, 04:00:56 AM
 #2

bump. Thanks.
etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
July 28, 2013, 05:09:58 AM
 #3

Using armoryengine.py:

Code:
>>> from armoryengine import *
>>> opList = convertScriptToOpStrings(hex_to_binary('51210241b8aba0994f320a8b438c627dbf31fbdd7dc722dd8418d829d67a9c6e4fd69021036fbd9d0a34a569f10b0431c8aeecf74ad796b99838b7272ef35ded130a794f9b52ae'))
>>> for op in opList:
...     print op
...

OP_1
[PUSHDATA -- 33 BYTES:]
0241b8aba0994f320a8b438c627dbf31fbdd7dc722dd8418d829d67a9c6e4fd690
[PUSHDATA -- 33 BYTES:]
036fbd9d0a34a569f10b0431c8aeecf74ad796b99838b7272ef35ded130a794f9b
OP_2
OP_CHECKMULTISIG

So, it's a 1-of-2 multisig script.  There are two 33-byte public keys, and you need a signature from either one of them to move those funds.

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!