{"id":37412,"date":"2019-08-26T09:01:16","date_gmt":"2019-08-26T09:01:16","guid":{"rendered":"https:\/\/www.cryptocabaret.com\/?p=37412"},"modified":"2019-08-26T09:01:16","modified_gmt":"2019-08-26T09:01:16","slug":"bitcoin-cash-innovation-accelerates-with-cashscript-high-level-language","status":"publish","type":"post","link":"https:\/\/www.cryptocabaret.com\/?p=37412","title":{"rendered":"Bitcoin Cash Innovation Accelerates With Cashscript High-Level Language"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" width=\"696\" height=\"469\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2019\/08\/zerp-1520x1024-768x517.jpg\" alt=\"Bitcoin Cash Innovation Accelerates With the High-Level Language Cashscript\" srcset=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2019\/08\/zerp-1520x1024-768x517.jpg 768w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/zerp-1520x1024-300x202.jpg 300w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/zerp-1520x1024-1024x690.jpg 1024w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/zerp-1520x1024-696x469.jpg 696w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/zerp-1520x1024-1392x938.jpg 1392w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/zerp-1520x1024-1068x719.jpg 1068w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/zerp-1520x1024-623x420.jpg 623w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/zerp-1520x1024-190x128.jpg 190w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/zerp-1520x1024-380x256.jpg 380w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/zerp-1520x1024-760x512.jpg 760w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/zerp-1520x1024.jpg 1520w\" sizes=\"auto, (max-width: 696px) 100vw, 696px\"><\/p>\n<p><strong>Software developers Rosco Kalis and Gabriel Cardona have been steadily working on Cashscript, a high-level programming language for Bitcoin Cash. When the language is tied to certain opcodes, specific schemes can be built that allow for autonomous and decision-based transactions. While testing Cashscript&rsquo;s capabilities, the two engineers recently deployed an oracle, forfeits, an onchain wager, and a recurring payments contract. <\/strong><\/p>\n<p><em><strong>Also read: <a href=\"https:\/\/news.bitcoin.com\/send-token-payouts-with-ease-using-bitcoin-coms-slp-dividend-calculator\/\">Send Token Payouts With Ease Using Bitcoin.com&rsquo;s SLP Dividend Calculator<\/a><\/strong><\/em><\/p>\n<h2><a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> Developers Are Innovating With Cashscript<\/h2>\n<p>Bitcoin Cash (<a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a>) development is in full swing and over the last six months the tempo has really started to pick up. Things like the <a href=\"https:\/\/simpleledger.cash\/\">Simple Ledger Protocol<\/a>, Schnorr signatures, opcodes, <a href=\"https:\/\/cashshuffle.com\/\">Cashshuffle<\/a>, the programming language <a href=\"https:\/\/news.bitcoin.com\/meet-spedn-a-smart-contract-programming-language-for-bitcoin-cash\/\">Spedn<\/a>, and <a href=\"https:\/\/news.bitcoin.com\/send-token-payouts-with-ease-using-bitcoin-coms-slp-dividend-calculator\/\">token dividend payments <\/a>have galvanized the network&rsquo;s versatility. Another project that&rsquo;s seeing steady development is <a href=\"https:\/\/github.com\/Bitcoin-com\/cashscript\">Cashscript<\/a>, a high-level language for <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> created by the software developer Rosco Kalis.<\/p>\n<blockquote data-width=\"550\" data-dnt=\"true\">\n<p lang=\"en\" dir=\"ltr\">I was asked by <a href=\"https:\/\/twitter.com\/cgcardona?ref_src=twsrc%5Etfw\">@cgcardona<\/a> to wrap up a checkdatasig example for CashScript. So yesterday I put together a contract utilising CDS and oracles to enforce HODLing until a certain <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a>\/USD price has been reached. CDS opens the doors to awesome functionality!<a href=\"https:\/\/t.co\/upTvNB9SmB\">https:\/\/t.co\/upTvNB9SmB<\/a><\/p>\n<p>&mdash; Rosco Kalis (@RoscoKalis) <a href=\"https:\/\/twitter.com\/RoscoKalis\/status\/1165685374754201600?ref_src=twsrc%5Etfw\">August 25, 2019<\/a><\/p>\n<\/blockquote>\n<p>News.Bitcoin.com <a href=\"https:\/\/news.bitcoin.com\/cashscript-is-coming-bringing-ethereum-like-smart-contracts-to-bitcoin-cash\/\">reported<\/a> on Cashscript in May, when Kalis discussed the number of innovative concepts that can stem from using Cashscript. The main focus for Cashscript developers is to make it easier for other engineers to plug a Cashscript contract into any web application. &ldquo;For this workflow as well as the syntax of the language we took a lot of inspiration from Ethereum&rsquo;s Solidity language and Web3.js \/ Truffle libraries,&rdquo; Kalis told our newsdesk at the time.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Bitcoin Cash Innovation Accelerates With Cashscript High-Level Language \" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2019\/08\/cs.jpg\" alt=\"Bitcoin Cash Innovation Accelerates With Cashscript High-Level Language \" width=\"2700\" height=\"1600\" srcset=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2019\/08\/cs.jpg 2700w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/cs-300x178.jpg 300w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/cs-768x455.jpg 768w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/cs-1024x607.jpg 1024w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/cs-696x412.jpg 696w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/cs-1392x825.jpg 1392w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/cs-1068x633.jpg 1068w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/cs-709x420.jpg 709w\" sizes=\"auto, (max-width: 2700px) 100vw, 2700px\"><\/p>\n<p>Since then, Kalis and other developers like Gabriel Cardona, the creator of Bitbox, have been eagerly showing the <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> community what <a href=\"https:\/\/github.com\/Bitcoin-com\/cashscript\">Cashscript<\/a> is capable of doing. &ldquo;Cashscript is a paradigm shift in expressiveness for <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> contracts,&rdquo; Cardona <a href=\"https:\/\/twitter.com\/cgcardona\/status\/1165374851202203648\">explained<\/a> this week while highlighting a bunch of experiments. For instance, Cardona showed the <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> community on Twitter how the <a href=\"https:\/\/github.com\/KarolTrzeszczkowski\/Mecenas-recurring-payment-EC-plugin#contract-details\">Mecenas contract<\/a> was <a href=\"https:\/\/gist.github.com\/cgcardona\/a5d7481fd9b07a6cafa9909ac95b8751\">replicated in Cashscript<\/a>. Mecenas was a contract developed by Karol Trzeszczkowski that allows for recurring <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> payments. After redesigning the covenant-based smart contract solution in Cashscript, the developer <a href=\"https:\/\/twitter.com\/cgcardona\/status\/1165400004686516224\">asserted<\/a> that &ldquo;Large contracts like this is where Cashscript really shines.&rdquo; On August 24, Cardona also tweeted that last year in Milan at the Satoshi&rsquo;s Vision Conference, <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> engineer Awemany <a href=\"https:\/\/news.bitcoin.com\/zero-confirmation-forfeits-adding-security-to-unconfirmed-bch-transactions\/\">revealed<\/a> a solution to the zero-confirmation problem by using a concept called &ldquo;Zero-Confirmation Forfeits.&rdquo; So the developer decided to <a href=\"https:\/\/twitter.com\/cgcardona\/status\/1165439129343033344\">replicate<\/a> the zero-confirmation forfeit idea using the Cashscript language.<\/p>\n<figure aria-describedby=\"caption-attachment-330582\"><img loading=\"lazy\" decoding=\"async\" title=\"Bitcoin Cash Innovation Accelerates With Cashscript High-Level Language \" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2019\/08\/decsionbased.jpg\" alt=\"Bitcoin Cash Innovation Accelerates With Cashscript High-Level Language \" width=\"1500\" height=\"600\" srcset=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2019\/08\/decsionbased.jpg 1500w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/decsionbased-300x120.jpg 300w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/decsionbased-768x307.jpg 768w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/decsionbased-1024x410.jpg 1024w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/decsionbased-696x278.jpg 696w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/decsionbased-1392x557.jpg 1392w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/decsionbased-1068x427.jpg 1068w, https:\/\/news.bitcoin.com\/wp-content\/uploads\/2019\/08\/decsionbased-1050x420.jpg 1050w\" sizes=\"auto, (max-width: 1500px) 100vw, 1500px\"><figcaption><span>Are you a developer looking to build on Bitcoin Cash? Head over to our <\/span><a href=\"https:\/\/developer.bitcoin.com\/\"><span>Bitcoin Developer<\/span><span> page<\/span><\/a><span> where you can get <\/span><span>Bitcoin Cash developer guides<\/span><span> and start using the <\/span><span>Bitbox<\/span><span>, SLP, Cashscript, and <\/span><span>Badger Wallet<\/span><span> SDKs. <\/span><\/figcaption><\/figure>\n<h2>&lsquo;<a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> Supports Hodling Better Than <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BTC\" target=\"_blank\">BTC<\/a>&rsquo;<\/h2>\n<p>While showing the ported Cashscript examples on Twitter, Cardona also tipped his hat to developers who helped initiate these ideas like Tendo Pein, Karol Trzeszczkowski, Rosco Kalis, Emil Oldenburg, Chris Pacia, and Tobias Ruck. The next day on August 25, Cardona showed the public a <a href=\"https:\/\/twitter.com\/cgcardona\/status\/1165494781457256449\">wager contract<\/a> from Emil Oldenburgs&rsquo;s onchain bet example from &ldquo;Taking OP_Checkdatasig out for a test drive.&rdquo; The new <a href=\"https:\/\/t.co\/k0SLOPcWzV?amp=1\">wager contract<\/a> was written in Cashscript, which executes an onchain bet between two parties and can only be settled by block height and price signed by an oracle. &ldquo;Noncustodial financial services are about to change everything,&rdquo; Cardona exclaimed. In another example, Kalis and Cardona produced an oracle using Cashscript and OP_Checkdatasig. The contract forces holding onto the asset until a certain price target has been reached. The &ldquo;Hodl-Vault&rdquo; contract specifications state:<\/p>\n<blockquote>\n<p><em><strong>A minimum block is provided to ensure that oracle price entries from before this block are disregarded: When the <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> price was $1,000 in the past, an oracle entry with the old block number and price can not be used. Instead, a message with a block number and price from after the minBlock needs to be passed. This contract serves as a simple example of OP_Checkdatasig-based contracts.<\/strong><\/em><\/p>\n<\/blockquote>\n<p>After the contract was created, Spedn creator Tendo Pein tweeted: &ldquo;<a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> supports hodling better than <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BTC\" target=\"_blank\">BTC<\/a>.&rdquo; &ldquo;Anything <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BTC\" target=\"_blank\">BTC<\/a> can do, <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> can do better,&rdquo; Cardona <a href=\"https:\/\/twitter.com\/cgcardona\/status\/1165329731610267648?s=21\">replied<\/a>. On the Reddit forum r\/btc, <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> supporters <a href=\"https:\/\/www.reddit.com\/r\/btc\/comments\/cv02st\/gabriel_cardona_got_a_cashscript_example_working\/\">welcomed<\/a> the innovation stemming from the Cashscript language. Cashscript can allow for many types of autonomous and decision-based transactions like oracles, zero-conf forfeits, digital good purchases via PGP signature, Pay to ID, cold wallet timeout, enforced multi-signature signing order, stablecoins, covenants, secure multi-party computation, blind escrows and spending constraints. &ldquo;[It&rsquo;s] going to be exciting to see what people can come up with using these new features,&rdquo; one <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> supporter said after reading about the innovations Cashscript could prime in the future.<\/p>\n<blockquote data-width=\"550\" data-dnt=\"true\">\n<p lang=\"en\" dir=\"ltr\">Non Custodial Financial Services are about to change everything.<\/p>\n<p>&mdash; Gabriel Cardona (@cgcardona) <a href=\"https:\/\/twitter.com\/cgcardona\/status\/1165501334209982465?ref_src=twsrc%5Etfw\">August 25, 2019<\/a><\/p>\n<\/blockquote>\n<h2>Oracles and Decision-Based Transactions Without the Need for a Custodian&rsquo;s Decision<\/h2>\n<p>One of the biggest conversations stemming from the r\/btc post about Cashscript was the use of oracles. Many cryptocurrency enthusiasts and blockchain developers believe that the <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> blockchain could provide verifiable multi-sourced facts, so people can use a trustless oracle for better decisions. Oracles are neutral by design and can allow the <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> chain to verify enough valid data to prove something is true or false, which then would essentially trigger decision-based transactions based on the outcome.<\/p>\n<p>Since ancient times, humans have used oracles to make hard decisions, execute bets and wagers, and provide validated reports. The opcode OP_Checkdatasig has brought the idea of blockchain oracle concepts using the <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> chain to the forefront. The opcode can check the validation of certain signatures, and return two different outcomes in an autonomous fashion. This means BCH-powered oracles can provide a definitive outcome for things like sporting events, election results, and prediction markets. But it would do so in a way that removes the need for a third party or custodian&rsquo;s decision.<\/p>\n<blockquote data-width=\"550\" data-dnt=\"true\">\n<p lang=\"en\" dir=\"ltr\">Why <a href=\"https:\/\/twitter.com\/hashtag\/CashScript?src=hash&amp;ref_src=twsrc%5Etfw\">#CashScript<\/a>? Which would you rather write?<\/p>\n<p>1. CashScript<br \/>2. Raw Bitcoin Cash Script<\/p>\n<p>CashScript is a paradigm shift in expressiveness for <a href=\"https:\/\/twitter.com\/search?q=%24BCH&amp;src=ctag&amp;ref_src=twsrc%5Etfw\">$BCH<\/a> Contracts. <a href=\"https:\/\/t.co\/9Ot3Irgndv\">pic.twitter.com\/9Ot3Irgndv<\/a><\/p>\n<p>&mdash; Gabriel Cardona (@cgcardona) <a href=\"https:\/\/twitter.com\/cgcardona\/status\/1165374851202203648?ref_src=twsrc%5Etfw\">August 24, 2019<\/a><\/p>\n<\/blockquote>\n<p>Developers have already proven these types of decision-based transactions can work without changing the current <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> rule set. People have built onchain wagers, oracles, digital currency inheritance schemes and even a game of <a href=\"https:\/\/news.bitcoin.com\/new-bitcoin-cash-opcode-shows-an-onchain-game-of-chess-is-possible\/\">onchain chess<\/a>. It&rsquo;s still very early, but Cashscript is maturing fast and <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> developers can utilize the language right now to execute these types of decision-based transactions into their workflow. As Cardona highlighted earlier this week, noncustodial financial services will decimate the current way we deal with money. Innovations like OP_Checkdatasig, Cashscript, Spedn, and Schnorr help to realize this goal.<\/p>\n<p><em><strong>What do you think about the <a href=\"https:\/\/github.com\/Bitcoin-com\/cashscript\">Cashscript language<\/a> and developers creating unique types of decision-based transactions with Cashscript and OP_Checkdatasig? Let us know what you think about this subject in the comments section below.<\/strong><\/em><\/p>\n<hr>\n<p><em>Image credits: Shutterstock, Jamie Redman, Github, Cashscript, and Twitter. <\/em><\/p>\n<hr>\n<p><em><span>Are you a <\/span><span>Bitcoin developer<\/span><span>? You can create your own Bitcoin Cash app with the <\/span><a href=\"https:\/\/developer.bitcoin.com\/bitbox\/\"><span>Bitbox<\/span><\/a><span> and <\/span><a href=\"https:\/\/developer.bitcoin.com\/badger\/\"><span>Badger Wallet<\/span><\/a><span> SDKs, get started with <a href=\"https:\/\/markets.bitcoin.com\/crypto\/BCH\" target=\"_blank\">BCH<\/a> tokens through the <\/span><a href=\"https:\/\/developer.bitcoin.com\/slp\/\"><span>SLP<\/span><\/a><span> SDK, and build your knowledge base with our <\/span><a href=\"https:\/\/developer.bitcoin.com\/\"><span>Bitcoin Cash developer guides<\/span><\/a><span>.<\/span><\/em><\/p>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/news.bitcoin.com\/bitcoin-cash-innovation-accelerates-with-cashscript-high-level-language\/\">Bitcoin Cash Innovation Accelerates With Cashscript High-Level Language<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/news.bitcoin.com\/\">Bitcoin News<\/a>.<\/p>\n<p><ins class=\"adbladeads\" data-cid=\"24663-3514371590\" data-host=\"web.adblade.com\" data-tag-type=\"4\" style=\"display:none\"><\/ins><br \/>\n<script async src=\"http:\/\/web.adblade.com\/js\/ads\/async\/show.js\" type=\"text\/javascript\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Software developers Rosco Kalis and Gabriel Cardona have been steadily working on Cashscript, a high-level programming language for Bitcoin Cash. When the language is tied to certain opcodes, specific schemes can be built that allow for autonomous and decision-based transactions. While testing Cashscript&rsquo;s capabilities, the two engineers recently deployed an oracle, forfeits, an onchain wager, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":37413,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[309],"tags":[],"class_list":["post-37412","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cryptocurrency"],"_links":{"self":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/37412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=37412"}],"version-history":[{"count":0,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/37412\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/media\/37413"}],"wp:attachment":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=37412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=37412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=37412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}