I want to reward the top 10 users from the leaderboard at the end of every month. I have written a Job on moralis cloud function, to get all 10 users from the database. I have written a separate cloud function ( not as a job) for sending the reward by calling the polygon contract function.
The problem is how I can call the ‘normal’ cloud function with two parameters, from the ‘Job’ cloud function.
Moralis.Cloud.job(“TopTenRewardJob”, async (request) => {
// logic for getting top 10 users logic
// how to call below ‘transfer’ function with two parameters( walletAddress, amount)
return ;
});
Moralis.Cloud.define(“transfer”, async (request) => {
//logic to call contract method with two parameters ;
});