0.10.0 • Published 4 months ago

@nexscript/nexc v0.10.0

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
4 months ago

NexScript

Build Status Coverage Status NPM Version NPM Monthly Downloads NPM License

NexScript is a high-level programming language for smart contracts on Nexa Blockchain. It offers a strong abstraction layer over Nexa' native virtual machine, Bitcoin Script. Its syntax is based on Ethereum's smart contract language Solidity, but its functionality is very different since smart contracts on Nexa differ greatly from smart contracts on Ethereum. For a detailed comparison of them, refer to the blog post Smart Contracts on Ethereum, Bitcoin and Nexa.

See the GitHub repository and the NexScript website for full documentation and usage examples.

The NexScript Language

NexScript is a high-level language that allows you to write Bitcoin Cash smart contracts in a straightforward and familiar way. Its syntax is inspired by Ethereum's Solidity language, but its functionality is different since the underlying systems have very different fundamentals. See the language documentation for a full reference of the language.

The NexScript Compiler

NexScript features a compiler as a standalone command line tool, called nexc. It can be installed through npm and used to compile .nex files into .json artifact files. These artifact files can be imported into the NexScript JavaScript SDK (or other SDKs in the future). The nexc NPM package can also be imported inside JavaScript files to compile .nex files without using the command line tool.

Installation

npm install -g @nexscript/nexc

Usage

Usage: nexc [options] [source_file]

Options:
  -V, --version        Output the version number.
  -o, --output <path>  Specify a file to output the generated artifact.
  -h, --hex            Compile the contract to hex format rather than a full artifact.
  -A, --asm            Compile the contract to ASM format rather than a full artifact.
  -c, --opcount        Display the number of opcodes in the compiled bytecode.
  -s, --size           Display the size in bytes of the compiled bytecode.
  -?, --help           Display help
0.10.0

4 months ago

0.9.0

6 months ago

0.8.0

6 months ago

0.7.0

7 months ago

0.6.1

8 months ago

0.6.0

8 months ago

0.5.0

8 months ago

0.4.0

8 months ago

0.3.0

9 months ago

0.1.3

9 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.0

9 months ago