frostfs-node/pkg/morph/event/neofs/unbind.go
Evgenii Stratonikov 07465849a4 [#1637] go.mod: Update neo-go to v0.99.1
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
2022-07-28 20:11:45 +03:00

33 lines
550 B
Go

package neofs
import (
"fmt"
"github.com/nspcc-dev/neo-go/pkg/core/state"
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
)
type Unbind struct {
bindCommon
}
func ParseUnbind(e *state.ContainedNotificationEvent) (event.Event, error) {
var (
ev Unbind
err error
)
params, err := event.ParseStackArray(e)
if err != nil {
return nil, fmt.Errorf("could not parse stack items from notify event: %w", err)
}
err = parseBind(&ev.bindCommon, params)
if err != nil {
return nil, err
}
ev.txHash = e.Container
return ev, nil
}