Porting the NEX ICO template to neo-go as first class smart contract example (#78)

* Initial draft of the ICO template ported from NEX.

* filled in token configuration

* added kyc storage prefix

* fixed byte array conversion + added tests

* fixed broken test + made 1 file for the token sale example.

* implemented the NEP5 handlers

* bumped version
This commit is contained in:
Anthony De Meulemeester 2018-05-06 08:03:26 +02:00 committed by GitHub
parent 0ca8865402
commit 35551282b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 353 additions and 32 deletions

View file

@ -395,6 +395,13 @@ func (c *codegen) Visit(node ast.Node) ast.Visitor {
if !ok {
log.Fatalf("could not resolve function %s", fun.Sel.Name)
}
case *ast.ArrayType:
// For now we will assume that there is only 1 argument passed which
// will be a basic literal (string kind). This only to handle string
// to byte slice conversions. E.G. []byte("foobar")
arg := n.Args[0].(*ast.BasicLit)
c.emitLoadConst(c.typeInfo.Types[arg])
return nil
}
// Handle the arguments