[#59] Update to pre-released version of neo-go v0.94.0

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-03-12 15:16:36 +03:00 committed by Alex Vanin
parent 7ba5d50fd4
commit 97a5e27403
10 changed files with 99 additions and 44 deletions

View file

@ -1,14 +1,14 @@
package common
import (
"github.com/nspcc-dev/neo-go/pkg/interop/binary"
"github.com/nspcc-dev/neo-go/pkg/interop/native/std"
"github.com/nspcc-dev/neo-go/pkg/interop/storage"
)
func GetList(ctx storage.Context, key interface{}) [][]byte {
data := storage.Get(ctx, key)
if data != nil {
return binary.Deserialize(data.([]byte)).([][]byte)
return std.Deserialize(data.([]byte)).([][]byte)
}
return [][]byte{}
@ -16,6 +16,6 @@ func GetList(ctx storage.Context, key interface{}) [][]byte {
// SetSerialized serializes data and puts it into contract storage.
func SetSerialized(ctx storage.Context, key interface{}, value interface{}) {
data := binary.Serialize(value)
data := std.Serialize(value)
storage.Put(ctx, key, data)
}