OlivierGaland / gelato-splitable-batch-example

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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


Languages

Language:Solidity 79.2%Language:TypeScript 20.8%