Giter Club home page Giter Club logo

gnosis-protocol-automations's Introduction

Gnosis Protocol | Gelato Automation features

This repository contains scripts that showcase how to automate various use cases such as placing orders on the gnosis protocol and scheduling an automated withdraw on behalf of users using gelato.

Installation

git clone https://github.com/gelatodigital/gnosis-protocol-automations.git
cd gnosis-protocol-automations
npm install

Usage (Rinkeby)

  1. Create an .env file, store a private key in USER_PK and your infura id in INFURA_ID (make sure to put .env in .gitignore)
  2. Make sure to have sufficient ETH in your user account and get some Rinkeby DAI from Compound's Rinkeby UI (Supply DAI => Withdraw => Faucet)
  3. To deploy a gnosis safe, place an order on gnosis protocol (5 DAI for 0.0001 WETH) and schedule an automated withdraw via gelato - all in one transaction - input the following command:
npx buidler place-order-with-automated-withdraw  \
--selltoken 0x5592EC0cfb4dbc12D3aB100b257153436a1f0FEa  \
--buytoken 0xc778417e063141139fce010982780140aa0cd5ab  \
--sellamount 5000000000000000000 --buyamount 100000000000000 --seconds 600  \
--gelatoprovider 0x518eAa8f962246bCe2FA49329Fe998B66d67cbf8  --log
  1. Check your account after 10 minutes and notice gelato automatically called the withdraw function on the gnosis protocol on your behalf

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

gnosis-protocol-automations's People

Contributors

gitpusha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.