forked from CosmWasm/wasmd
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
Description
This function came from #26.
It's a bit weird that the callstack comes first, so move it to the tail.
wasmd/x/wasmplus/keeper/events.go
Lines 42 to 50 in d6ea9ec
func callablePointSDKEventAttributes(customAttributes []wasmvmtypes.EventAttribute, contractAddr sdk.AccAddress, callstack []byte) ([]sdk.Attribute, error) { | |
attrs, err := wasmkeeper.ContractSDKEventAttributes(customAttributes, contractAddr) | |
if err != nil { | |
return nil, err | |
} | |
// attrs[0] is addr | |
attrs = append([]sdk.Attribute{attrs[0], sdk.NewAttribute(wasmplustypes.AttributeKeyCallstack, string(callstack))}, attrs[1:]...) | |
return attrs, nil | |
} |