BLOG — Developer Tutorials

408 days ago

Gelato Automate Logs

Task logs can be found on any task page and provide a live update of what Gelato executors are seeing.

You'll be able to view all your existing tasks under the "My Tasks" tab, as well as a list of top tasks with their owner address, contract address, and function name under the "Leaderboard" tab.

Clicking on one of these tasks will bring you to the task details page. Scroll down and select “Task Logs”, and you’ll be able to view a record of each simulation check — Gelato’s Checkers simulating execution to see if appropriate conditions have been met to run the task.

Custom Log Messages

A resolver is a smart contract where you can write your logic for when an execution should occur.

Resolvers are handy to use if you want to define more specific conditions for when execution can occur, or you want to have dynamic arguments passed to the function on each execution. Gelato will query these resolvers periodically to do a check if it’s time to run!

Important note: you don’t need a resolver if you want to call a smart contract function that has no arguments (or the same arguments) every time at set time intervals.

By using custom messages in the return block of your resolver code, you can give yourself a clue as to where the logic is not returning true.

For example, if you were checking the time in your resolver, you could use the following to display a custom message (“Time not up yet!”) in your task logs:

return(false, bytes("Time not up yet!"))

This will let you know that the check is returning false as expected because it’s not yet time for the execution.

The full function might look a little something like this:

About Gelato

Gelato is a Web3 Cloud Platform empowering developers to create automated, gasless, and off-chain-aware Layer 2 chains and smart contracts. Over 400 web3 projects rely on Gelato for years to facilitate millions of transactions in DeFi, NFTs, and gaming.

  • Gelato RaaS: Deploy your own tailor-made ZK or OP L2 chains in a single click with native Account Abstraction and all Gelato middleware baked in.

  • Web3 Functions: Connect your smart contracts to off-chain data & computation by running decentralized cloud functions.

  • Automate: Automate your smart contracts by executing transactions automatically in a reliable, developer-friendly & decentralized manner.

  • Relay: Give your users access to reliable, robust, and scalable gasless transactions via a simple-to-use API.

  • Account Abstraction SDK: Gelato has partnered with Safe, to build a fully-fledged Account Abstraction SDK, combining Gelato's industry's best gasless transaction capabilities, with the industry's most secure smart contract wallet.

Subscribe to our newsletter and turn on your Twitter notifications to get the most recent updates about the Gelato ecosystem! If you are interested in being part of the Gelato team and building the future of the Internet browse the open positions and apply here.