1inch plug-in help

Hello please is there anyway I can write a function like this using moralis, new to this thank you

You can use something like the below function to do ERC20 transfers.

// sending 0.5 tokens with 18 decimals
const options = {
  type: "erc20",
  amount: Moralis.Units.Token("0.5", "18"),
  receiver: "0x..",
  contractAddress: "0x..",
let result = await Moralis.transfer(options);

Read more at: https://docs.moralis.io/moralis-dapp/sending-assets