It looks like this is the function that you tried to call
function getVestingSchedules(address account, IERC20 token)
external
override
view
returns (VestingSchedule[] memory schedules)
{
uint256 schedulesLength = accountVestingSchedules[account][token].length;
schedules = new VestingSchedule[](schedulesLength);
for (uint256 i = 0; i < schedulesLength; i++) {
schedules[i] = accountVestingSchedules[account][token].data[i];
}
}
=>
an example of how to call it (same as you did)
x = "0x10ed43c718714eb63d5aa57b78b54704e256024e"
abi2 = [{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"getVestingSchedules","outputs":[{"components":[{"internalType":"uint64","name":"startBlock","type":"uint64"},{"internalType":"uint64","name":"endBlock","type":"uint64"},{"internalType":"uint128","name":"quantity","type":"uint128"},{"internalType":"uint128","name":"vestedQuantity","type":"uint128"}],"internalType":"struct IRewardLocker.VestingSchedule[]","name":"schedules","type":"tuple[]"}],"stateMutability":"view","type":"function"}]
y = await Moralis.executeFunction({
contractAddress: "0xf6d838fDfEcC7153313e080Fb764570302015010",
functionName: "getVestingSchedules",
abi: abi2,
params: {
account: x,
token: x,
},
});
but you will get that error if you are not connected in MetaMask to polygon/matic network when you execute that code, you will need to add polygon/matic network in your MetaMask settings and then select that network and then execute this code.