forked from TrueCloudLab/neoneo-go
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:
parent
0ca8865402
commit
35551282b0
11 changed files with 353 additions and 32 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue