Skip to content

ConveyorLabs/automato

Repository files navigation

.#7        J#^                             &Y.              G5.                                
:@@@&&&##G J@@?  ^&&Y #&&&&&&&&.~#&&&&&&&~ @@@&&&&&&&&&&&&Y &@@&&&###:.&&&&&&#&B J&&&&&&&#.    
:@@@   @@@.J@@Y  !@@B YPP@@@GPP 5@@#5YB@@G @@@BGG&@@&PPB@@& &@@   &@@? 55B@@@PPJ &@@B5Y&@@?    
:@@@   @@@.?@@Y  !@@B    @@@    5@@?  ~@@P @@@   P@@?  :@@& &@@   &@@?   .@@#    #@@:  5@@7    
.@@@##B@@@.?@@Y  ~@@B    @@@.   5@@7  ~@@P @@@.  G@@?  ^@@& &@@&BB&@@J   :@@#    &@@.  5@@7    
.@@@   &@@.?@@&YYB@@B    @@@.   5@@#YYB@@G @@@.  G@@J  ^@@& &@@^  J@@?   :@@#    &@@GYY&@@?    
.&&#   #@@.:#&&&&&@@#    &@@.   ^&&&&&&&&! #&#   Y&&7  .@@& P&&^  ?@@J   .@@&    ?&&&&&&&#:    
        ?&.       :GB    .Y&.                           .P&        ~#7    :G#                  
                                                          .                                     
                                                                                                                                                                                             
                                        .^!~:^75GGGP5J!^.                                        
                                     ^YG&&@@@@&GJY&@@@@@@&BP:..                                   
                                 :YB#@@@@@@@@@@@G~G&@@&GBBGB~Y5^                                 
                               .5#&#JG&&&&&&&&&&&B^B@@&!~~~PG^#&G!                               
                              ~#&#B55YP##########&J~###5JJJP#:B##&P.                             
                             ^####BGGB&&&&#########Y555555YYJ7####&B.                            
                            .B######&@@@@@#####&#####&&&&###&&&&###&5                            
                             ^&######&@@@&&##&#PJ??JJ??JP#&&#GP55PB&##.                           
                             !&###G###&&&###&5~JP5J??JY5J~5Y!JYYYY?!G&:                           
                             ^&##BJ?B######&Y^BY^^~!!!~^7B:^G!~~~~J5:G:                           
                              .###B?JP#######.GJ.7???????:~G::^???7 P^~                            
                               ?&##?7P#######:57.????????~:P.?^~~~^~?^^                            
                               .G&#J:!P#&####G:Y~^!7777!^:?^J?7!!!!7YJ                             
                                .B&P!^.~7G###&B77!~^^^^^~!7B&##BGGB&Y                              
                        .....    .G&BJ7~:..!G#&&#P5JJJJYPB&######&#?                               
                   :?PBBB##&&&#BPJ^JBG?~~^^^::YBBB###############G^                                
                 ~GBPY5PPYYB&G5PG#7^????????77?????????????????JJ?:                                
                JB?JY#~?G::5:!7!PJG:YYYJJJJY555YYYY?JYJ7!!!!!7?JJ^.                                
               ~#77J.^          : !~Y5PPGGPY?Y#&##&G#J?PGGGGP5YYY:                                 
               G#Y^           .75#&@@@@@@@@&#?!####&!?#&&@@@@@@@&#P7:^~~^.                         
              !B5^         .7B&@@@&&555YYY5&&G^#BPBB:####&GY5G#&@@@@&BJJG#B57:                     
             :##~         ?&@@@&P#PBG!P#?^GGG~P&P^7B~5&GG&BBBG5YYG&@@@@#??#&&#BJ:                  
.^.         .BBP!       .B@@@&5JG#77P~!!. ...~JJ?7JYY^!::5.?Y!#BGGYB&&@@@G~5##&&#P^                
 :?Y?!. ..^?BG5.     .^.#@@@#7GY~P7~^^.              :55Y55:!!?.~Y?&G#@@@@&:^?YB&&&5.          :.  
  .~JJ7^?J7P..    .J#7Y@@@#!5JG^                     !#YYPG!5##G7^^7&&&@@@&^ ^~7##&B.      :7P!   
        ..       .G&#:#@@&~GB?.                      .##?5&5 ^G&&#5~:5BP&@@G.~.7Y##&5 :~?5BBB^    
                 J&##:&@@P!5!7                       :#PBP&?   ^YB&&7^5?5@@@~P?:!###B:#&BGP!      
                  P&#&~5&&7Y#G:                       Y&:G&B.      ^JG.JYJ@@@?J&.^P#&P:^Y:         
                  !&##G^####Y!^                     ^YB&B#G:           :^5&&&!~!.P#&#:             
                   7##&J~#&##P.                   !PJJGGJ^             ^J##&B.:?7G&G:              
                    7##&^:G&##B:                ^B&##5:               ^#&#&G.:~#&B!                
                    P#&?  !G&#PP:             :#&##!                ~B#&#7.^#&#?.                 
                     5&B.    J##&P!            Y&#&J               .PB&#J. ?&##^                   
                    7#5.      Y&B5P.           7&#&!             .?B&B?.  ?B&&7                    
               ..:~?7:        :##^57            7B&G.            !#&J.    7~B&!                    
                 .            ~&&^!~             .!PG~           J&B       ~7P#~                   
                             ^B&#Y^                 .~~:         J&B.       .~YGP?~:...            
                          .~P&##?.                               .G&P.          ..::::..           
              .......:^7YG##PJ!.                                  .Y&#7.                           
              .:~7?JJYJ?!^.                                        :JBBJ^                         
                                                                      :!??!:.                     
                                                                           ...                    

----------- more information available on https://internal.conveyorlabs.org/automato/ -----------

Automato is a simple to use framework that enables customizable smart contract automation through lightweight .yaml files. Automato is written in Golang and can be compiled for mac, windows, and linux. Automato works with any EVM compatible blockchain, side-chain or Layer 2. To automate a smart contract, you can set up triggers and actions in the automation.yaml file. You can set up the trigger to execute every "x" blocks, at a specific block or when a specific event is emitted. After adding triggers, you can add actions, which are transactions to send after the trigger is met

Automato can be used to automate tasks like harvesting/compounding on protocols that generate yield, dollar cost averaging into a token, or buying NFTs from a newly dropped collection.

Automation.yaml File Syntax

To use Automato, you will need to set up the automation.yaml file. There are a few very simple triggers that enable Automato to know when to execute actions. Below are examples for each trigger type.

Trigger Conditions

EVERY "X" BLOCKS

Execute an action every "x" blocks.

EVERY 10 BLOCKS:
	TX: 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984(approve(address,uint256), 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984, 1000)

EVERY 5 BLOCKS:
	TX: 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984(approve(address,uint256), 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984, 1000)

EVERY BLOCK:
	TX: 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984(approve(address,uint256), 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984, 1000)

WHEN BLOCK == "X"

Execute an action when the block number == "x"


WHEN BLOCK == 15029001:
	TX: 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984(approve(address,uint256), 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984, 1000)

WHEN BLOCK == 15029030:
	TX: 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984(approve(address,uint256), 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984, 1000)

ON EVENT

Execute an action when a specific event is emitted. The syntax is as follow. The ON EVENT keyword marks the beginning of the condition, followed by contractAddress(eventSignature). This means that when the specified contract address emits the event signature, the trigger condition will be met.


ON EVENT 0x000000000000000000000000000000000000dEaD(0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c):
	TX: 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984(approve(address,uint256), 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984, 1000)

Creating Actions

Actions consist of user defined transactions to execute when trigger conditions are met. The syntax for an action is as follows. The TX keyword marks the beginning of the transaction, followed by contractAddress(functionSignature, arg1, arg2, arg3, ect...). This means that the action will send a transaction to the contract address, with calldata consisting of the function signature and arguments. You do not have to enter the hashed function signature but rather a plain text version of the function definition that will be hashed by Automato. For example: approve(address,uint256).

Multiple actions can be declared as a result of one trigger. For example:


ON EVENT 0x000000000000000000000000000000000000dEaD(0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c):
	TX: 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984(approve(address,uint256), 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984, 1000)
	TX: 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984(approve(address,uint256), 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984, 1000)
	TX: 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984(approve(address,uint256), 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984, 1000)
	TX: 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984(approve(address,uint256), 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984, 1000)
	TX: 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984(approve(address,uint256), 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984, 1000)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •