automation-lb

command module
v0.0.0-...-0264a13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

README

Automation-lb

go-version chainlink-automation

license

Documentation

Documentation

chainlink-view.png

sample-log.png

Motivation

Nobody likes out-of-gas.

In Cexles we need to scale Chainlink Automation to perform a huge number of on-chain operations in a single block and distribute their execution between multiple Chainlink Nodes without manual user intervention. This software will allow us to unlock the full potential of Chainlink Automation.

Current stage

We started an initial development of MVP with smart contracts deployed on Goerli Ethereum testnet. MVP PoC version. Needs refactor & minor bug fixing.

Desired result

Hassle-free automated scaling for any Chainlink Automation compatible contract.

TODO

  • Initial research
  • Initial project skeleton
  • Sample test smart contract
  • Multiple contracts support
  • Automated upkeeps creating
  • Upkeeps load metrics
  • Automated on-condition upkeeps scaling
  • Upkeeps scailing prediction
  • Automated Upkeep's balance top-up
  • API
  • Dashboard
  • Tests
  • Reference contract implementation
  • Public Docs

Setup config

  • Create and fill config.yaml file
    cp ./goerli.example.config.yaml ./config.yaml
    
  • Config
      account:
      # Your private key with Link balance (https://faucets.chain.link/ free testnet faucet)
      private_key: ""
    network:
      rpc_url: "wss://"   # Node websocket (Quicknode best choice)
      chain_id: 5 # goerli chain_id, change to needed
    contracts:
      sample_test: # key of your contract
        name: "Sample test contract" # contract name, used just for logging
        short_name: "sampletest" # short contract name, used for creating new upkeep
        address: "0xCb1Ad0A9D12993CB614533Cd19e7f9f555F13816" # sepolia
        version: "0_1" # version of contract, used for creating new upkeep
        gas_limit: 5000000 # upkeep's gasLimit used for creating new upkeep
        execution_limit: 5 # max upkeep execution limit, check Scale Policy docs section https://docs.cexles.finance/architecture/scale-policy
    chainlink:
      registry_version: "2_0"
      topup_amount: "5000000000000000000" # amount in WEI of LINK to topup on Keepup creation
      upkeep_controller_address: "0x09970ef6d0E46F71E568538fD88B44127739D892" # upkeep controller, deploy your own
      token_address: "0x779877A7B0D9E8603169DdbD7836e478b4624789" # LINK token address, check Chainlink docs
      min_controller_approve: "300000000000000000000" # lower allowance threshold in WEI to execute IncreaseAllowance
    app:
      log_level: -1   # Log level from -1 (more logs) to 5 (fewer logs)
      active_contract_key: "sample_test" # put the key from contracts config section
    

Installing

  • Install Docker and Docker Compose

  • Copy config file

    cp goerli.example.config.yaml config.yaml
    
  • Set config values according to docs

  • Run build

    docker-compose build
    
  • Run balancer

    docker-compose up -d
    
  • Check program logs. If everything is fine you will see something similar to:

    INF upkeep controller found address=0x3911d7499d72dd5f4ea88270af6dfeced1a1bef6
    INF logic contract found name="Cexles platform contract" short_name=cexles_platform version=1_0
    INF subscribed to NewHead event func=StartBlockListener module=service.ChainService
    

    If you have any questions about installing/usage feel free to create an issue

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL