Coder Social home page Coder Social logo

hopbridge's Introduction

HopBridge

version 0.3.0

Program that screens https://hop.exchange for arbitrage and etherscan networks for contract transactions of specified contract addresses. Alerts via a Telegram message if something of interest is found. Currently supports the following L2 networks: Optimism, Arbitrum, Polygon, Gnosis.

Installation

This project uses Python 3.9 and requires a Chromium WebDriver installed.

Clone the project:

git clone https://github.com/ivandimitrovkyulev/HopBridge

cd HopBridge

Activate virtual environment:

poetry shell

Install all third-party project dependencies:

poetry install

You will need to apply for API access and save the following variables in a .env file in .../HopBridge/:

CHROME_LOCATION=<your/web/driver/path/location> 

TOKEN=<telegram-token-for-your-bot>
CHAT_ID_ALERTS=<id-of-telegram-chat-for-alerts>
CHAT_ID_DEBUG=<id-of-telegram-chat-for-debugging>

WEB3_INFURA_PROJECT_ID=<project-id-from-node>
PROJECT_ID=<project-id-from-node>

OPTIMISM_API_KEY=<etherscan-optimism-api-key>
ARBITRUM_API_KEY=<etherscan-arbitrum-api-key>
POLYGON_API_KEY=<etherscan-polygon-api-key>
GNOSIS_API_KEY=<etherscan-gnosis-api-key>

Running the script

To screen the hop-bridge website for arbitrage:

var="$(cat input.json)"
python3 main.py "$var"

Where input.json are variables for screening:

{
    "USDC": {
        "start": 50000,
        "end": 60000,
        "step": 10000,
        "min_arb": 50,
        "decimals": 6
    },
    "USDT": {
        "start": 30000,
        "end": 40000,
        "step": 10000,
        "min_arb": 50,
        "decimals": 6
    },
    "settings": {
        "sleep_time": 5
    }
}

To screen network etherscan for Erc20 Token Transactions:

var="$(cat contracts.json)"
python3 etherscan.py -e "$var"

Or to screen for a contract transaction:

python3 etherscan.py -t "$var"

Where contracts.json are Network and screening variables of the following schema:

{
    "optimism_usdt": {
        "token": "USDT",
        "url": "https://optimistic.etherscan.io/address/0x7D269D3E0d61A05a0bA976b7DBF8805bF844AF3F",
        "address": "0x7D269D3E0d61A05a0bA976b7DBF8805bF844AF3F",
        "network": "Optimism",
        "decimals": 6,
        "min_amount": 30000
    },
    "arbitrum_usdc": {
        "token": "USDC",
        "url": "https://arbiscan.io/address/0xe22d2bedb3eca35e6397e0c6d62857094aa26f52",
        "address": "0xe22D2beDb3Eca35E6397e0C6D62857094aA26F52",
        "network": "Arbitrum",
        "decimals": 6,
        "min_amount": 50000
    },
    "filter_by": ["to", "0x0000000000000000000000000000000000000000"]
}

For help:

python3 etherscan.py --help

Email: [email protected]

hopbridge's People

Contributors

ivandimitrovkyulev avatar

Watchers

 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.