forked from TrueCloudLab/frostfs-node
[#770] pkg/morph/event: Add notary request preparator
Add preparator for notary requests. Is parses raw notary requests, checks if it should be handled by Alphabet node. If handling is required, returns `NotaryEvent` that contains information about contract scripthash, method name and arguments of the call. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
8d1f2e66e6
commit
8f2924d6cf
2 changed files with 343 additions and 0 deletions
21
pkg/morph/event/opcodes.go
Normal file
21
pkg/morph/event/opcodes.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package event
|
||||
|
||||
import "github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
||||
|
||||
// Op is wrapper over Neo VM's opcode
|
||||
// and its parameter.
|
||||
type Op struct {
|
||||
code opcode.Opcode
|
||||
param []byte
|
||||
}
|
||||
|
||||
// Code returns Neo VM opcode.
|
||||
func (o Op) Code() opcode.Opcode {
|
||||
return o.code
|
||||
}
|
||||
|
||||
// Param returns parameter of wrapped
|
||||
// Neo VM opcode.
|
||||
func (o Op) Param() []byte {
|
||||
return o.param
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue