mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-14 11:16:17 +00:00
80fd427517
- Add PushNBytes OPcode
16 lines
427 B
Go
16 lines
427 B
Go
package vm
|
|
|
|
import "github.com/CityOfZion/neo-go/pkg/vm/stack"
|
|
|
|
var opFunc = map[stack.Instruction]func(op stack.Instruction, ctx *stack.Context, istack *stack.Invocation) error{
|
|
stack.ADD: Add,
|
|
stack.SUB: Sub,
|
|
stack.PUSHBYTES1: PushNBytes,
|
|
stack.PUSHBYTES75: PushNBytes,
|
|
}
|
|
|
|
func init() {
|
|
for i := int(stack.PUSHBYTES1); i <= int(stack.PUSHBYTES75); i++ {
|
|
opFunc[stack.Instruction(i)] = PushNBytes
|
|
}
|
|
}
|