Spedn — a smart contract language for BCH

in bitcoin •  6 years ago 

I know you are used to me making typos but not this time its really called Spedn :)

image.png

The website - https://spedn.readthedocs.io/en/latest/ if you wanna try it a bit

And here is base usage.

Intsall Haskell Tool Stack.

Download Spedn sources.

$ git clone https://bitbucket.org/o-studio/spedn.git
Build and install Spedn.

$ cd spedn/spedn
$ stack install
Your first contract
Create a file mycontract.spedn with a following content:

contract ExpiringTip(Ripemd160 alice, Ripemd160 bob) {

challenge receive(Sig sig, PubKey pubKey) {
    verify hash160(pubKey) == bob;
    verify checkSig(sig, pubKey);
}

challenge revoke(Sig sig, PubKey pubKey) {
    verify checkSequence(7d);
    verify hash160(pubKey) == alice;
    verify checkSig(sig, pubKey);
}

}
Compile with command:

$ spedn compile -c mycontract.spedn
You should get a compiled contract template similar to this:

2 PICK TRUE EQUAL IF 3 PICK HASH160 OVER EQUALVERIFY (...)

BCH Markets

image.png


CRYPTO INCOME GUIDE EBOOK - FREE FOR LIMITED TIME - DOWNLOAD HERE

Join My Official Discord Crypto/Steemit Group - https://discord.gg/Ma3VCxj

Follow, Resteem and VOTE UP @kingscrown creator of http://fuk.io blog for 0day cryptocurrency news and tips!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

its sad how bitcoin cash has a big bad bcash image with Ver behind it...
having a fork is awesome, different vision different community but ultimately the same goal

And how can i trust this and when do one get to invest? @kingscrown

So who supports that language? Nchain/Bitcoin SV or Bitmain/Viabtc/Bitcoin ABC?

for now it just launched so has simple opcodes but later you should be able to use it on all. i think it was literally released today

Spedn quite different name

Whatever you are writing is wrong, nothing is wrong but we will not be able to trust Bitcoin on the right side because he can cheat also. I am not saying he will deceive.

He is doing fine, and I do not want to write this.

Hi @kingscrown!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 7.331 which ranks you at #65 across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 244 contributions, your post is ranked at #6.

Evaluation of your UA score:
  • Your follower network is great!
  • The readers appreciate your great work!
  • Good user engagement!

Feel free to join our @steem-ua Discord server