Git Product home page Git Product logo

dexag-proxy's Introduction

To Install

Run npm install

To Test

First add a .secret file containing your 12 word mnemonic phrase to the root of the directory. This will be the account that does the transactions. Then add a .infura file containing the url for your infura node (if using infura, if using another node you will need to change how the web3 provider is set up in test/test.js).

Inside test.js in the test folder, change the TRADING_ADDRESS variable and Handler to the contract you wish to test and the contract's ApprovalHandler contract. If it is your first time using the contract, inside the test folder you'll need to run node test.js approve to approve your DAI tokens for trading.

Then, again inside the test folder run node test.js exchange where exchange is the DEX you want to test. This will test a 1 DAI-ETH trade on the DEX. You can add a dry option to see the trade data along with the gas price if the transaction would be succesful without actually sending the transaction (node test.js kyber dry).

Exchange options:

kyber

uniswap

multi (tests a 2 DAI-ETH multi dex trade between Uniswap and Kyber, 1 DAI on each DEX)

dexag-proxy's People

Contributors

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