mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-04 09:02:28 +00:00
core,vm: adjust binary (de-)serialization syscalls
Related #1027. 1. Move System.Runtime.(De)serialize to System.Binary.* 2. Rename compiler stubs. 3. Adjust opcode prices.
This commit is contained in:
parent
b3507d490d
commit
18066143bd
6 changed files with 32 additions and 28 deletions
18
pkg/interop/binary/binary.go
Normal file
18
pkg/interop/binary/binary.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
Package binary provides binary serialization routines.
|
||||
*/
|
||||
package binary
|
||||
|
||||
// Serialize serializes any given item into a byte slice. It works for all
|
||||
// regular VM types (not ones from interop package) and allows to save them in
|
||||
// storage or pass into Notify and then Deserialize them on the next run or in
|
||||
// the external event receiver. It uses `System.Binary.Serialize` syscall.
|
||||
func Serialize(item interface{}) []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deserialize unpacks previously serialized value from a byte slice, it's the
|
||||
// opposite of Serialize. It uses `System.Binary.Deserialize` syscall.
|
||||
func Deserialize(b []byte) interface{} {
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue