Merge pull request #1013 from nspcc-dev/neo3/vm/stackitem_refactoring

vm: move StackItem to a separate package
This commit is contained in:
Roman Khimov 2020-06-08 15:30:44 +03:00 committed by GitHub
commit 795523f5cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 2575 additions and 2466 deletions

View file

@ -4,7 +4,7 @@ import (
"github.com/nspcc-dev/neo-go/pkg/core/state"
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
"github.com/nspcc-dev/neo-go/pkg/util"
"github.com/nspcc-dev/neo-go/pkg/vm"
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
)
// ApplicationLog wrapper used for the representation of the
@ -33,8 +33,8 @@ type NotificationEvent struct {
// StateEventToResultNotification converts state.NotificationEvent to
// result.NotificationEvent.
func StateEventToResultNotification(event state.NotificationEvent) NotificationEvent {
seen := make(map[vm.StackItem]bool)
item := event.Item.ToContractParameter(seen)
seen := make(map[stackitem.Item]bool)
item := smartcontract.ParameterFromStackItem(event.Item, seen)
return NotificationEvent{
Contract: event.ScriptHash,
Item: item,