Skip to content

Redesign callablePointSDKEventAttributes function #45

@da1suk8

Description

@da1suk8

This function came from #26.

It's a bit weird that the callstack comes first, so move it to the tail.

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
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions