From 0d5da91468c69ef726a4fd47b462b392c267c762 Mon Sep 17 00:00:00 2001 From: Assaf Morami Date: Sun, 24 Jan 2021 22:08:26 +0200 Subject: [PATCH] ParseEvents code comments --- x/wasm/internal/types/types.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/wasm/internal/types/types.go b/x/wasm/internal/types/types.go index 41d2c9ac7d2..ebc82e3ad9f 100644 --- a/x/wasm/internal/types/types.go +++ b/x/wasm/internal/types/types.go @@ -224,7 +224,7 @@ func ParseEvents(wasmOutputAttrs []wasmvmtypes.EventAttribute, contractAddr sdk. // we always tag with the contract address issuing this event attrs := []sdk.Attribute{sdk.NewAttribute(AttributeKeyContractAddr, contractAddr.String())} - // append attributes to the + // append attributes from wasm to the sdk.Event for _, l := range wasmOutputAttrs { // and reserve the contract_address key for our use (not contract) if l.Key != AttributeKeyContractAddr { @@ -233,6 +233,7 @@ func ParseEvents(wasmOutputAttrs []wasmvmtypes.EventAttribute, contractAddr sdk. } } + // each wasm invokation always returns one sdk.Event return sdk.Events{sdk.NewEvent(CustomEventType, attrs...)} }