Getting more developers to build on the BSV blockchain with sCrypt

sCrypt aims to help address these issues by allowing more developers, who have previously worked in other ecosystems, to get on board and start coding.

The BSV blockchain offers governments, enterprises and developers a powerful feature set to bring their projects into the realm of web3. However, developers still need to have an understanding of programming languages to build apps and businesses and help them reach their full potential.

sCrypt aims to help address these issues by allowing more developers, who have previously worked in other ecosystems, to get on board and start coding, 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.

A full-stack blockchain offering

Liu said that he and his team are upgrading their product to provide not only a standalone smart contrast solution but also a so-called ‘full-stack’, a suite of APIs and tools to help developers easily integrate smart contracts into their applications.

‘So if you have a smart contract now, it is very easy to develop it thanks to the sCrypt framework. So for anybody who knows Javascript or its close sibling Typescript – which is some 25 million developers – they can come and start building contracts with sCrypt immediately. They don’t have to learn anything (else) – no new languages or new tools.

‘It is the most potent framework not only in BSV but across the whole blockchain space – as all other blockchains require knowledge of other more esoteric languages. You also have to learn a whole new set of tools.’

Liu noted that this full-stack platform applies not only to smart contracts but also all the related toolings such as authenticating users, reading and writing to the blockchain, and broadcasting events. ‘So we have all this infrastructure, plus the toolings, so developers can develop any apps on Bitcoin faster and easier.’

Bringing in more developers to BSV

Another way that sCrypt is helping more developers build on the BSV blockchain is by offering a transpiler tool. With the BSV Transpiler, you can 1:1 convert many of the most popular Ethereum smart contracts directly into BSV scripts.

The transpiler converts Solidity code into equivalent sCrypt code, making it easier for Solidity developers to migrate code and quickly learn sCrypt. Before introducing the inner workings of the transpiler, let us review the main differences between Ethereum’s account model and Bitcoin’s UTXO model:

The account model of Ethereum maintains a separate state for each contract and updates it through contract calls. The advantage of this is that a globally unique address can be used for fast lookup of a contract and it is closer to the model of traditional databases. But its biggest disadvantage is contracts can only be processed sequentially, hindering performance.

The UTXO model used by Bitcoin maintains a set of UTXOs for each contract and uses the aggregated set to represent the state of the contract. The advantage of this is that transactions can be processed as independently as possible, maximising parallelization. The downside is that the inability to use a single fixed address for addressing makes writing certain contracts more difficult.

The transpiler aims to be an automatic conversion tool from Solidity to sCrypt smart contracts. It provides a good starting point for developers who are less familiar with smart contracts based on the UTXO model. On the one hand, it allows developers to intuitively see different implementations of the same business logic in two languages. On the other hand, it saves them from writing equivalent sCrypt contracts from scratch.