GithubHelp home page GithubHelp logo

titan-pathfinder / whirlpools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from orca-so/whirlpools

0.0 0.0 0.0 2.24 MB

Open source concentrated liquidity AMM contract on Solana

License: Other

JavaScript 0.02% Rust 20.07% TypeScript 79.91%

whirlpools's Introduction

Whirlpools

Whirpools is an open-source concentrated liquidity AMM contract on the Solana blockchain. This repository contains the Rust smart contract as well as the Typescript SDK (@orca-so/whirlpools-sdk) to interact with a deployed program.

The contract has been audited by Kudelski and Neodyme.

The contract has been deployed using verifiable build, so that you can ensure that the hash of the on-chain program matches the hash of the program of the given codebase.

Requirements

  • Anchor 0.29.0
  • Solana 1.17.22
  • Rust 1.68.0

Setup

Install Anchor using instructions found here.

Set up a valid Solana keypair at the path specified in the wallet in Anchor.toml to do local testing with anchor test flows.

$NODE_PATH must be set to the node_modules directory of your global installs. For example, using Node 16.10.0 installed through nvm, the $NODE_PATH is the following:

$ echo $NODE_PATH
/Users/<home_dir>/.nvm/versions/node/v16.10.0/lib/node_modules

Usage

Instructions on how to interact with the Whirlpools contract is documented in the Orca Developer Portal.

Tests

  • Run "cargo test --lib" to run Rust unit tests

Whirlpool SDK

Use the SDK to interact with a deployed Whirlpools program via Typescript.

Installation

In your package, run:

yarn add "@orca-so/whirlpools-sdk"
yarn add "@orca-so/common-sdk"
yarn add "@coral-xyz/[email protected]"
yarn add "@solana/web3.js"
yarn add "@solana/spl-token"
yarn add "decimal.js"

Usage

Read instructions on how to use the SDK on the Orca Developer Portal.

Run Typescript tests via local validator

In the whirlpools/sdk folder, run:

anchor test

Generate TypeDoc

In the sdk folder, run yarn run docs

You can also see the generated TypeDoc.

Sample Codes

You can find sample code covering basic operations here.


Support

Questions

Have problems integrating with the SDK? Pop by over to the Orca Discord #dev-questions channel and chat with one of our engineers.

Feedback

Got ideas on how to improve the system? Open up an issue on github with the prefix [FEEDBACK] and let's brainstorm more about it together!

License

Apache 2.0

whirlpools's People

Contributors

odcheung avatar yugure-orca avatar terranmoccasin avatar wjthieme avatar philcchen avatar fuzzyyeti avatar rawfalafel avatar atamari-orca avatar andtan91 avatar rhovian avatar socksrust avatar prasoonpratham avatar 10xsebastian avatar sohrab- avatar skrrb avatar solbricklayer avatar everlastingsong 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.