examples: add nep5 mint function
Add Mint(...) to NEP5 for initial tokens supply.
This commit is contained in:
parent
f64aa201c7
commit
c84c33d398
2 changed files with 20 additions and 0 deletions
|
@ -56,6 +56,10 @@ func Main(operation string, args []interface{}) interface{} {
|
|||
amount := args[2].(int)
|
||||
return token.Transfer(ctx, from, to, amount)
|
||||
}
|
||||
if operation == "mint" && CheckArgs(args, 1) {
|
||||
addr := args[0].([]byte)
|
||||
return token.Mint(ctx, addr)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue