Giter Club home page Giter Club logo

swap-uniswapv2-truffle-web3.js's Introduction

How to swap in with Uniswap v2 with Web3.js and Truffle.

In this repo, you can interact with the Uniswap protocol v2. I'm show an example simple swap between ETH -> WETH -> DAI. Can you find the address exchange for any other token you want to swap.Uniswap v2 Router 02 and using Uniswap v2 Factory Can you find the address exchange for any other token you want to swap.

Will you work with Truffle like development enviroment and the library Web3.js that allow you to interact with remote ethereum node in this case the Kovan test network.

Get Faucet Ether for Kovan Testnet

Prerequsites

Please install or have installed the following:

  • nodejs (v16.13.2) and npm (8.1.2).

Installation

  1. Clone this repo git clone https://github.com/pinajmr/swap-uniswapV2-Truffle-Web3-.git Swap-with-UniswapV2
  2. Then, cd Swap-with-UniswapV2.
  3. Install dependencies using npm install.
  4. update .env_example file for .env and change the information.
  5. Update Public_Key in script files.

Usage

Running Scripts

truffle exec scripts/swap-eth-dai.js --network kovan

Help

You can contact to me in discord like pinajmr#4347 glad to help you.

Remember: Only your work on Kovan testnet.

swap-uniswapv2-truffle-web3.js's People

Contributors

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