Environment Set Up
Last updated
Last updated
MVC smart contract development uses the sCrypt development suite. The sCrypt language is divided into two major versions.
Smart contracts are written in scrypt classic with contract source files ending in .scrypt. They are compiled to bvm bytecode using scryptc, and instantiated, tested, and deployed on-chain using scryptlib. The official recommendation is to not use it anymore.
Smart contracts are written in TypeScript with contract source files ending in .ts. The process involves scrypt-ts-transpiler transpiling .ts to .scrypt, scryptc compiling to bvm bytecode, and scrypt-ts instantiating, constructing transactions, testing contracts, and deploying them on-chain.
Log bvm runtime variables
Write only in TypeScript, facilitating front-end and back-end integration
Package as npm packages, facilitating contract reuse and distribution
The mvc contracts were developed using scrypt classic as scrypt was not yet fully developed. Below are the development types and project addresses for several contracts.
scrypt classic
scrypt classic
scrypt classic
scrypt classic + scrypt
The token-core-ts project translates MVC's original token and NFT contracts into scrypt, but the test cases still use scrypt classic, so the development type is a mix of both. Since the scrypt-ts library is primarily for BSV and cannot be directly used on the MVC chain, it is adapted for MVC using patch-package, as detailed below.
Add the patch command to package.json