Git Product home page Git Product logo

automatedtrading's Introduction

automatedtrading

automatedtrading

Welcome to yet another Blocktools Learn2Earn Task! This time, we try to build an automated trader that does not require pesky wallet approvals and allows you to set custom gas!

Strongly recommended! Complete at least 5 of the 7 prior Learn2Earn Tasks here: https://medium.com/@blocktoolbox

In the below task you will:

  1. Deploy the swapper contract that allows you to interact with Uniswap Router

  2. Deploy a simple HTML UI that allows the user to interact with it

  3. Deploy a JS that executes the contract functions

How:

Step1: Deploy Swapper.sol (INSERT WETH CA WHERE APPLICABLE, MENTIONED IN CODE)

Step 2: Download the html and js files to a local folder

Step 3: Open the UI via VS Code -> Live server extension (it's free) -> Go-Live

Step 4: Get a free node URL From Infura or Quicknode - Insert it in the code where mentioned

Step 5: If you are on goerli testnet (recommended), keep the WETH Contract address and its ABI handy - Insert it in the code where mentioned

Step 6: Setup a Wallet with testnet ETH on it and insert the Private Key in the code where mentioned

Step 7: Convert ETH to some amount of WETH to be used for the automated trading (leave some ETH as you will need gas)

Step 8: Insert the swapper CA, it's ABI, WETH CA and its ABI in the code where mentioned

That's it, you are ready to go!

To try it out: Deploy a token on Goerli (covered in prior Learn2Earn Tasks), Add liquidity and enjoy!

Play with:

  • Gas
  • Trying multiple swaps
  • Enhancing code to include a swarm (right now set at 1 wallet, expand this to 30 for best results!)
  • Add a reverse swap (Sell)

Disclaimers:

  • This is provided for testnet use only, anyone attempting this on mainnet is going to be risking real $
  • Do NOT use your regular wallet private key in the code, setup a fresh one with testnet ETH and hide it
  • Blocktools is not responsible for the result of any actions performed outside of following the basic security guidelines listed above

automatedtrading's People

Contributors

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