The ink! docs state:
In general, you should think twice if you really need String. Smart contracts usually don't use strings; those are typically used for user interactions and should live in your UI and not on the chain.
You could use the @polkadot/api-contract and do the following:
const wsContractsProvider = new WsProvider('ws://localhost:9944');
const contractsApi = await ApiPromise.create({ provider: wsContractsProvider });
const address = "5EYtidretW1FmUjA6hisdq1AZ2GfsDUanDtSEuLghGzvdWau";
const contract = new ContractPromise(contractsApi, abi, address);
const value = 0; // only useful on isPayable messages
const gasLimit = -1;
const keyring = new Keyring({ type: 'sr25519' });
const alicePair = keyring.createFromUri("//Alice");
const value1 = 54;
const value2 = 88;
await contract.query.processSomething(alicePair.address, { value, gasLimit }, value1, value2);
In this case processSomething
is an ink! message...:
/// Do some processing...
#[ink(message)]
pub fn process_something(&self, first: u32, second: u32) {
ink_env::debug_println!("Do some processing... {}, {}", first, second);
}