compiler: update and move README to the docs folder

Refs. #339.
This commit is contained in:
Roman Khimov 2019-09-17 19:09:02 +03:00
parent acb25fb880
commit 778d29f543
2 changed files with 32 additions and 20 deletions

View file

@ -25,7 +25,7 @@ A complete toolkit for the NEO blockchain, including:
- [RPC node & client](https://github.com/nspcc-dev/neo-go/tree/master/pkg/rpc/README.md) - [RPC node & client](https://github.com/nspcc-dev/neo-go/tree/master/pkg/rpc/README.md)
- [RPC client](https://github.com/nspcc-dev/neo-go/blob/master/pkg/rpc/README.md) - [RPC client](https://github.com/nspcc-dev/neo-go/blob/master/pkg/rpc/README.md)
- [CLI tool](https://github.com/nspcc-dev/neo-go/blob/master/docs/cli.md) - [CLI tool](https://github.com/nspcc-dev/neo-go/blob/master/docs/cli.md)
- [Smart contract compiler](https://github.com/nspcc-dev/neo-go/blob/master/pkg/vm/compiler/README.md) - [Smart contract compiler](https://github.com/nspcc-dev/neo-go/blob/master/docs/compiler.md)
- [NEO virtual machine](https://github.com/nspcc-dev/neo-go/blob/master/pkg/vm/README.md) - [NEO virtual machine](https://github.com/nspcc-dev/neo-go/blob/master/pkg/vm/README.md)
# Getting started # Getting started

View file

@ -23,32 +23,41 @@ The neo-go compiler compiles Go programs to bytecode that the NEO virtual machin
- append - append
### VM API (interop layer) ### VM API (interop layer)
- storage Compiler translates interop function calls into NEO VM syscalls or (for custom
- runtime functions) into NEO VM instructions. [Refer to GoDoc](https://godoc.org/github.com/nspcc-dev/neo-go/pkg/interop) for full API documentation.
- block
- header #### Standard NEO Smart Contract API
- transaction - account
- asset - asset
- attribute
- block
- blockchain - blockchain
- contract
- engine
- header
- input
- iterator
- output
- runtime
- storage
- transaction
### VM utility helper functions #### Custom VM utility helper functions
- SHA1 - crypto:
- SHA256 - `SHA1`
- Hash256 - `SHA256`
- Hash160 - `Hash256`
- other.. - `Hash160`
- enumerator
### Custom utility functions - util:
- `FromAddress(address string) []byte` - `Equals` (to emit `EQUALS` opcode, not needed usually)
- `FromAddress(address string) []byte`
## Not yet implemented
- very small part of the interop layer (VM API)
## Not supported ## Not supported
Due to the limitations of the NEO virtual machine, features listed below will not be supported. Due to the limitations of the NEO virtual machine, features listed below will not be supported.
- channels - channels
- goroutines - goroutines
- multiple returns - returning multiple values from functions
## Quick start ## Quick start
@ -125,8 +134,12 @@ Will output something like:
``` ```
At the moment this is implemented via RPC call to the remote server.
## Smart contract examples ## Smart contract examples
Some examples are provided in the [examples directory](https://github.com/nspcc-dev/neo-go/tree/master/examples).
### Check if the invoker of the contract is the owning address ### Check if the invoker of the contract is the owning address
```Golang ```Golang
@ -214,4 +227,3 @@ func Main(operation string, args []interface{}) bool {
2. Create an issue on Github 2. Create an issue on Github
3. Make a PR with a reference to the created issue, containing the testcase that proves the bug 3. Make a PR with a reference to the created issue, containing the testcase that proves the bug
4. Either you fix the bug yourself or wait for patch that solves the problem 4. Either you fix the bug yourself or wait for patch that solves the problem