mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-27 03:58:06 +00:00
35551282b0
* 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
22 lines
373 B
Go
22 lines
373 B
Go
package vm_test
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestStoragePutGet(t *testing.T) {
|
|
src := `
|
|
package foo
|
|
|
|
import "github.com/CityOfZion/neo-go/pkg/vm/api/storage"
|
|
|
|
func Main() string {
|
|
ctx := storage.GetContext()
|
|
key := []byte("token")
|
|
storage.Put(ctx, key, []byte("foo"))
|
|
x := storage.Get(ctx, key)
|
|
return x.(string)
|
|
}
|
|
`
|
|
eval(t, src, []byte("foo"))
|
|
}
|