Skip to content

zack-bitcoin/chalang

Folders and files

NameName
Last commit message
Last commit date
Jul 7, 2019
Jul 3, 2018
Mar 9, 2021
Mar 8, 2021
Jul 13, 2018
Oct 13, 2016
Jun 28, 2017
Aug 13, 2019
Aug 13, 2019
Aug 13, 2019
Aug 13, 2019
Aug 13, 2019
Aug 13, 2019
Aug 15, 2020
Nov 17, 2017
Mar 11, 2018
Jul 4, 2019
Jan 30, 2017

Repository files navigation

It is built for blockchain smart contracts.

This is a language make for state channels.

It is deterministic, so that every node of the blockchain gets the same result. the variable types of chalang are: integers, binary, lists. Uses functions instead of gotos. Functions are tail call optimized.

merkelized - functions are called by the hash of the contents of the function. Unused functions don't have to be included, which makes the transaction shorter.

Each operation of the virtual machine consumes a finite resource called gas. If the gas runs out, then the money in the bet is deleted. Has 2 types of gas, one for space, and one for time.

You can read the documentation for the VM's opcodes here.

You can see forth-like example code here, hashlock is especially well documented.

You can see lisp-like example code here

to install:

sh install.sh

to start a node with these libraries loaded:

sh start.sh

to run tests on a node:

1> test_chalang:test().

About

a language optimized for state channels on blockchains.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published