Skip to content

Dont enforce passing functionArguments and/or typeArguments for a Move function that does not expect these #198

@0xmaayan

Description

@0xmaayan

Consider this move function which does not expect functionArguments or typeArguments

#[view]
public fun exist_message(): bool {
  exists<Message>(get_board_obj_address())
}

We should be able to call it with Surf like that

surfClient.view.exist_message();

Instead, Surf requires to pass in empty functionArguments and typeArguments

surfClient.view.exist_message({
  functionArguments: [],
  typeArguments: [],
});

Can see the @aptos-labs/ts-sdk makes both arguments optional
https://github.com/aptos-labs/aptos-ts-sdk/blob/main/src/internal/view.ts#L17
https://github.com/aptos-labs/aptos-ts-sdk/blob/main/src/transactions/types.ts#L175-L179

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions