2021-02-02 18:34:17 +00:00
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
2021-03-12 12:16:36 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/native/std"
|
2021-02-02 18:34:17 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/storage"
|
|
|
|
)
|
|
|
|
|
|
|
|
// SetSerialized serializes data and puts it into contract storage.
|
|
|
|
func SetSerialized(ctx storage.Context, key interface{}, value interface{}) {
|
2021-03-12 12:16:36 +00:00
|
|
|
data := std.Serialize(value)
|
2021-02-02 18:34:17 +00:00
|
|
|
storage.Put(ctx, key, data)
|
|
|
|
}
|