import { constructCall, constructUiCommand } from 'lib/offchain';

import { AddWordArgs, FEE, PUBLIC_METHODS } from './shared';

export const constructAddWordUiCommand = ({ word, contractId }: { word: string; contractId: string }) => {
  return constructUiCommand([
    constructCall({
      contractId,
      methodName: PUBLIC_METHODS.ADD_WORD,
      methodArgs: [[word] satisfies AddWordArgs],
      cost: FEE.ADD_WORD,
      withQueue: false,
    }),
  ]);
};
