The project is inspired by the simplicity and the ivy-bitcoin.
The koa project is to create a high-level language that has more expressions
than the bitcoin script and
is simpler and easy to analyze than soldity(ethereum).
A more detailed explanation is given below.
- Lexer
- Parser
- Compiler
- VM
-
Integer
It is expressed in
int
. Integer size is 32 bytes. -
String
It is expressed in
string
. -
Boolean
It is expressed in
true
orfalse
.
-
Arithmetic
We support
+, -, *, /, %
only for integer. -
Comparison
We support
==, !=, >, <, >=, <=
for comparsion. -
Prefix
We support
!, -
for prefix operator.
It is expressed in if(){}
or if(){}else{}
.
return
\n
: All statements should end in\n
.- Assign : It is expressed in
=
.
contract {
func Sig(sig string){
string pubkey = "fvfidBGruUYC+mTw7CusaCOQbBuZBiYduFgH8hRW97KLmHn0xzB1FV++KI7syo8qXGo8Un24WP40IT78XjKO"
if checkSig(pubkey, sig){
return true
}
return false
}
}
Contribution Guide CONTRIBUTION
Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE.
To get started, sign the Contributor License Agreement.