From a9494412daf46628e7043f73077c793d8c6f08ad Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 12 Oct 2021 17:42:04 +0300 Subject: [PATCH] [#907] morph/event/container: Define PutNamed event Define `PutNamed` structure of notary notification from `putNamed` method of Container contract. Embed `Put` type in order to inherit methods and parsing of common parts with `put` method. Signed-off-by: Leonard Lyubich --- pkg/morph/event/container/put.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkg/morph/event/container/put.go b/pkg/morph/event/container/put.go index c5af119c..9cfdf455 100644 --- a/pkg/morph/event/container/put.go +++ b/pkg/morph/event/container/put.go @@ -47,6 +47,23 @@ func (p Put) NotaryRequest() *payload.P2PNotaryRequest { return p.notaryRequest } +// PutNamed represents notification event spawned by PutNamed method from Container contract of NeoFS Morph chain. +type PutNamed struct { + Put + + name, zone string +} + +// Name returns "name" arg of contract call. +func (x PutNamed) Name() string { + return x.name +} + +// Zone returns "zone" arg of contract call. +func (x PutNamed) Zone() string { + return x.zone +} + // ParsePut from notification into container event structure. func ParsePut(params []stackitem.Item) (event.Event, error) { var (