Skip to content

Example of creating a splitable batch with gelato for gas consuming transaction : if one call is not enough to complete the process, subsequent calls will be done immediatly to allow fast completion

Notifications You must be signed in to change notification settings

OlivierGaland/gelato-splitable-batch-example

Repository files navigation

Splitable batch example with gelato

This project shows how to create a job activated by gelato that is able to detect the run will not complete (due to gas consumption) and able to launch subsequent jobs until it is completed.

image

See contracts/GelatoSplitableTimeBatch.sol for a detailed description and technicals informations

Check IGelatoSplitableTimeBatchTarget.sol and TestGelato.sol for trigger/batch functions overview.
Check GelatoSplitableTimeBatch.sol for details 
deploy TestGelato
deploy GelatoSplitableTimeBatch
set access right (AccessControl from openzeppelin)
bind TestGelato to GelatoSplitableTimeBatch
set up job on app.gelato.network with GelatoSplitableTimeBatch (that is the resolver)
  checker() and splitableBatch() functions
use console and setQueueSize to fill manually TestGelato with items to process
  (that should be processed by your job at defined dates) 

About

Example of creating a splitable batch with gelato for gas consuming transaction : if one call is not enough to complete the process, subsequent calls will be done immediatly to allow fast completion

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published