Building smart contracts on the BSV blockchain with sCrypt

sCrypt is a TypeScript framework for BSV smart contracts.

One of the key features that developers and businesses consider when deciding to use a specific blockchain technology is the smart contract capabilities that it offers. The BSV blockchain has had smart contract capability since day one, but it can still be complicated to develop your contracts due to their inherently complex nature, says Xiaohui Liu, Founder and CEO of sCrypt.

sCrypt is a TypeScript framework for BSV smart contracts. The BSV blockchain supports smart contracts with its Forth-like stack-based Script language, but writing smart contracts in native Script is cumbersome and error-prone. sCrypt is designed to facilitate writing complex smart contracts running on-chain.

‘At sCrypt we provide the program language as well as all the tools to help developers to easily develop complicated smart contracts on the BSV blockchain. The objective is to make it as simple as developing web2 applications.’

A full stack of blockchain development tools

Liu added that sCrypt recently updated its product offering to extend beyond just smart contracts to provide a ‘full stack’ – a suite of APIs and tools to help developers easily integrate smart contracts into their applications.

He added that developers who are familiar with Javascript and Typescript will easily be able to transfer their developer skills over to sCrypt which has been designed to make the switch from web2 to web3 as seamless as possible.

‘I think it’s the most potent framework to write a smart contract not only in the BSV space but across the whole blockchain space because you can just pretty much write it in JavaScript,’ he said.

‘I think this is a key missing piece that is necessary for this space to take over the mainstream audience. Because unless you have developer tools and infrastructure, apps just take too long to be built. And then, as a result, you know you don’t have as much opportunity to experiment (compared to a platform) such as iOS.’

New types of blockchain apps and experiences

Liu added that while sCrypt only provided the tools, it was now possible for developers to create several new ideas which are only possible on the BSV blockchain. He gave an example of a game which can be played fully on-chain, the game never goes down due to server issues and can exist perpetually on-chain. ‘And this is just one type of game. If you look at all the past technology, gaming is one of the major sectors to adopt new technology and make it mainstream.’

Another possible application is bounties, said Liu. He noted that most people don’t care about developers or the server power being used in this process – all they care about is that they get a result. ‘Through the usage of smart contracts, you can have a contract saying a miner will only get paid if they have the right solution. You either have the solution and get paid or neither happens, so nobody can cheat.’

Education and learning opportunities via sCrypt

Liu said that a key part of his role is educating developers on the true power of sCrypt and the BSV blockchain. In addition to a forum and educational material, this has extended to a series of workshops where students can get hands-on time and ask questions directly.

The most recent of these workshops took place in Exeter in the United Kingdom from June 5 to 8, 2023. Following their participation in the London conference, Xiaohui Liu and his sCrypt team conducted a boot camp for the University’s students, detailing how to harness sCrypt’s tools for coding smart contracts using the BSV blockchain.