Git Product home page Git Product logo

openzeppelin_defender_scripts's Introduction

Openzeppelin Defender Scripts

This repository collect fun scripts that run on openzeppelin defender autotask

Note: these scripts are experimental, use at your own risk.

Lon Staking

This script will lookup the user's current staking and calculate how many Lon token will earn if redeem at the execution time. Instead showing the total income in token, you can find the total income in USD which calculate from the Uniswap token information. You can also set the threshold value to notify if the earning exceeds the value (in token not in USD).

$ npm run start_lonstaking

Watch Uniswap V2 Pair

This script will fetch uniswap v2 pair information from TheGraph, including tokens name and tokens price.

$ npm run start_watchuniswappair

FTX lend automatically

This script will lend tokens in FTX Exchange automatically. When execute this script, it fetch balances, loop through all tokens, and submit spot margin offers for these tokens.

Remember to open a subaccount and enable option orders.

$ npm run start_ftxlending

Running Locally

You can run the scripts locally, instead of in an Autotask, via a Defender Relayer. Create a Defender Relayer on mainnet, write down the API key and secret, and create a .env file in this folder with the following content:

lon=0x0000000000095413afc295d19edeb1ad7b71c952
user=
thresholdLon=1
tgToken=
chatID=
uniswapPair=
ftxAccount=
ftxAPIKey=
ftxSecret=

Watch Git history

This script will fetch and check whether git history had been modified with the given google sheets, remember to create a service account and google sheets before.

  • build
$ npm run prebuild
$ npm run build
  • execute bundled script
$ npm run start_watchgit

openzeppelin_defender_scripts's People

Contributors

sc0vu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.