Compiler (#37)

* refactored structs so the scope is not needed anymore + fix passing struct in func arguments.

* implemented byte arrays and added runtime tests

* Added sc examples in compiler README + added quick nested if test.

* Updated README

* Changed import paths to interop layer
This commit is contained in:
Anthony De Meulemeester 2018-03-02 16:49:10 +01:00 committed by GitHub
parent 16ab1d524f
commit b6b8542caf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 21 additions and 12 deletions

View file

@ -6,7 +6,7 @@ var runtimeTestCases = []testCase{
`
package foo
import "github.com/CityOfZion/neo-go/pkg/smartcontract/runtime"
import "github.com/CityOfZion/neo-go/pkg/vm/smartcontract/runtime"
func Main() bool {
runtime.Notify("hello")
@ -20,7 +20,7 @@ var runtimeTestCases = []testCase{
`
package foo
import "github.com/CityOfZion/neo-go/pkg/smartcontract/runtime"
import "github.com/CityOfZion/neo-go/pkg/vm/smartcontract/runtime"
func Main() bool {
runtime.Log("hello you there!")
@ -34,7 +34,7 @@ var runtimeTestCases = []testCase{
`
package foo
import "github.com/CityOfZion/neo-go/pkg/smartcontract/runtime"
import "github.com/CityOfZion/neo-go/pkg/vm/smartcontract/runtime"
func Main() int {
t := runtime.GetTime()
@ -48,7 +48,7 @@ var runtimeTestCases = []testCase{
`
package foo
import "github.com/CityOfZion/neo-go/pkg/smartcontract/runtime"
import "github.com/CityOfZion/neo-go/pkg/vm/smartcontract/runtime"
func Main() int {
trigger := runtime.GetTrigger()
@ -68,7 +68,7 @@ var runtimeTestCases = []testCase{
`
package foo
import "github.com/CityOfZion/neo-go/pkg/smartcontract/runtime"
import "github.com/CityOfZion/neo-go/pkg/vm/smartcontract/runtime"
func Main() int {
owner := []byte{0xaf, 0x12, 0xa8, 0x68, 0x7b, 0x14, 0x94, 0x8b, 0xc4, 0xa0, 0x08, 0x12, 0x8a, 0x55, 0x0a, 0x63, 0x69, 0x5b, 0xc1, 0xa5}
@ -86,7 +86,7 @@ var runtimeTestCases = []testCase{
`
package foo
import "github.com/CityOfZion/neo-go/pkg/smartcontract/runtime"
import "github.com/CityOfZion/neo-go/pkg/vm/smartcontract/runtime"
func Main() int {
block := runtime.GetCurrentBlock()