-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
For tuple-like enum variants, the types are incorrectly generated.
Example:
enum ExecuteMsg {
UpdateOwnership(::cw_ownable::Action),
}should generate msg-composer:
export interface AnsHostMessage {
...
updateOwnership: (funds?: Coin[]) => MsgExecuteContractEncodeObject
...
}
export class AnsHostMessageComposer implements AnsHostMessage {
...
updateOwnership = (action: Action, funds?: Coin[]): MsgExecuteContractEncodeObject => {
return {
typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract',
value: MsgExecuteContract.fromPartial({
sender: this.sender,
contract: this.contractAddress,
msg: toUtf8(
JSON.stringify({
update_ownership: action,
})
),
funds,
}),
}
}
...
}and msg-builder:
static updateOwnership = (action: Action): ExecuteMsg => {
return {
update_ownership: action,
}
}Technically it should generate the parameter as:
updateOwnership: (action: CamelCasedProperties<Action>, funds?: Coin[])And the clients:
updateOwnership = async (
action: Action,
fee: number | StdFee | 'auto' = 'auto',
memo?: string,
funds?: Coin[]
)Metadata
Metadata
Assignees
Labels
No labels