Hi, could I get some help, please? I’m trying to swap using 1inch plugin and it does not work, using mainnet moralis server, here’s my code:
const serverUrl = "https://nn6ulsjd1ob9.usemoralis.com:2053/server";
const appId = "LjRPQA8jLBlrSRA2UicJMyABhDWy75XCIdIzsBuN";
Moralis.start({ serverUrl, appId });
await Moralis.initPlugins();
await Moralis.enableWeb3();
I tried to change slippage
up to 20 but, there was no difference
const options = {
chain: "eth",
fromTokenAddress: nativeAddress,
toTokenAddress: oneInchAddress,
amount: Number(Moralis.Units.ETH("0.01")),
fromAddress: Moralis.User.current().get("ethAddress"),
slippage: 1
}
let receipt = await Moralis.Plugins.oneInch.swap(options);
The error I get is this: