Skip to content

Commit

Permalink
ParseEvents code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
assafmo authored Jan 24, 2021
1 parent 09bca64 commit 0d5da91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/wasm/internal/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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...)}
}

Expand Down

0 comments on commit 0d5da91

Please # to comment.