forked from TrueCloudLab/frostfs-contract
[#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:
parent
7ba5d50fd4
commit
97a5e27403
10 changed files with 99 additions and 44 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue