标签:
There is a payment called P2SH( pay to script hash) in bitcoin. With this feature, you can compile many interesting scripts( the original form of contract) like this wiki and this.
Here more sample for P2SH:
OP_SHA256
<Y> OP_EQUAL
OP_IF
<Seller Pubkey>
OP_ELSE
<block_height+100> OP_CHECKLOCKTIMEVERIFY OP_DROP
<Buyer Pubkey>
OP_ENDIF
OP_CHECKSIG
But for more complex logical control on contract, such as colored bitcoin, and stake IPO, Bitcoin has no these abilities.
Powerful script: a Turing-Complete VM and interperter
State stroage: MPT as a database
Protection of network from abusing of the powerful script: Gas
what happens on block-chain
Install a script interpreter: Solidity for example
Fund a EOA with ether
Create Contract from this EOA
what happens on block-chain
what happens on block-chain
标签:
原文地址:http://blog.csdn.net/hacode/article/details/52241745