Post
Topic
Board Development & Technical Discussion
Re: Why don't we have bitcoin smart contract?
by
TechPriest
on 08/12/2019, 12:12:32 UTC
@ETF BTC but that's... the thing. I can't expect my heir to learn multisig, and the whole point was to avoid hiring an escrow =)

It's easy to create such contract without multisig

Code:
OP_CLTV OP_DROP OP_CHECKSIG

With ordinary locktime, your heir must keep signed transaction and also his (recepient) privatekey. In example above he's only need to keep privatekey (if he generate redeem script by himself) or privatekey + redeem script (if it was generated by you).

But in case above you can forget about your money before needed time and even if you don't want to give away your money to your heir. So, we need to create script where you can spend your money in some cases.

pooya87's example is the closest one to such conditions. But without multisig, of course. BUT: his script is for P2PKH address (pub key hash, in P2SH we must provide pubkey), so i woud not recommend to use it. We have such conversation in our local russian topic, and one user, Balthazar, said that most of bitcoin core nodes will reject P2PKH non standard scripts, so without mining powers or at least without friends in a big mining pool you're not will be able to confirm such transaction.