frostfs-contract/common/invoke.go
Leonard Lyubich dd0768aaeb [#42] Share InvokeID between contracts
Replace invokeID to common package and export it.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-02-04 10:31:24 +03:00

12 lines
250 B
Go

package common
import "github.com/nspcc-dev/neo-go/pkg/interop/crypto"
func InvokeID(args []interface{}, prefix []byte) []byte {
for i := range args {
arg := args[i].([]byte)
prefix = append(prefix, arg...)
}
return crypto.SHA256(prefix)
}