Git Product home page Git Product logo

pancakeswap-sdk-v2's Introduction

Pancakeswap SDK

code style: prettier Actions Status npm version

V2 SDK for the BSC testnet

This is a fork of @pancakeswap-libs/sdk-v2 modified to work on the BSC testnet against PancakeSwap V2 routers coupled with pancake-swap-interface-v1.

Detailed instructions and the modified pancake-swap-interface-v1 code can be found at https://github.com/ibhagwan/pancake-swap-interface-v1.

Building this SDK

Clone either this repository or the official one:

❯ git clone https://github.com/ibhagwan/pancakeswap-sdk-v2
  • Modify FACTORY_ADDRESS & INIT_CODE_HASH in src/constants.ts
  • Modify the testnet WBNB at the end of entities/token.ts:
    [ChainId.BSCTESTNET]: new Token(
        ChainId.BSCTESTNET,
        '0xae13d989dac2f0debff460ac112a837c89baa7cd',
        18,
        'WBNB',
        'Wrapped BNB'
    )
    

Build:

❯ yarn
❯ npm run build

PancaeSwap V2, option #1 (default)

Router: 0xD99D1c33F9fC3444f8101754aBC46c52416550D1

Factory: 0x6725f303b657a9451d8ba641348b6761a6cc7a17

WETH: 0xae13d989dac2f0debff460ac112a837c89baa7cd

INIT_CODE_PAIR_HASH: 0xd0d4c4cd0848c93cb4fd1f498d7013ee6bfb25783ea21593d5834f5d250ece66

PancaeSwap V2, option #2

Router: 0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3

Factory: 0xb7926c0430afb07aa7defde6da862ae0bde767bc

WETH: 0xae13d989dac2f0debff460ac112a837c89baa7cd

INIT_CODE_PAIR_HASH: 0xecba335299a6693cb2ebc4782e74669b84290b6378ea3a3873c7231a8d7d1074

pancakeswap-sdk-v2's People

Contributors

rabbitdoge avatar mooncakehero avatar pancake-swap avatar ibhagwan 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.