Skip to content

Commit

Permalink
WIP: less code to drive
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrion Lannister committed Jul 5, 2022
1 parent 048396f commit 2d201ee
Show file tree
Hide file tree
Showing 93 changed files with 360 additions and 13,075 deletions.
8 changes: 6 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"recommendations": [
// prettier
"esbenp.prettier-vscode",
// control prettier format flow
"rohit-gohri.format-code-action",
// import sorter
"dozerg.tsimportsorter",
// colorful comments
"aaron-bond.better-comments",
"salbert.comment-ts",
"richie5um2.vscode-sort-json"
// ts comments automate
"salbert.comment-ts"
]
}
33 changes: 16 additions & 17 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,24 @@
"editor.formatOnSave": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2,
// format flow
"editor.codeActionsOnSave": ["source.formatDocument", "source.organizeImports.sortImports"],
"eslint.validate": ["typescript"],
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
// https://marketplace.visualstudio.com/items?itemName=dozerg.tsimportsorter
"tsImportSorter.configuration.groupRules": [
["^@\\w", "^\\w"],
["^@/"],
["^\\.\\."],
["^\\."],
{ "flags": "scripts" }
],
"tsImportSorter.configuration.keepUnused": [".*"],
"tsImportSorter.configuration.wrappingStyle": {
"maxNamesPerWrappedLine": 0,
"maxBindingNamesPerLine": 0,
"maxDefaultAndBindingNamesPerLine": 0
},
// aaron-bond.better-comments
"better-comments.multilineComments": true,
"better-comments.tags": [
{
Expand Down Expand Up @@ -54,19 +67,5 @@
"bold": false,
"italic": false
}
],
// https://marketplace.visualstudio.com/items?itemName=dozerg.tsimportsorter
"tsImportSorter.configuration.groupRules": [
["^@\\w", "^\\w"],
["^@/"],
["^\\.\\."],
["^\\."],
{ "flags": "scripts" }
],
"tsImportSorter.configuration.keepUnused": [".*"],
"tsImportSorter.configuration.wrappingStyle": {
"maxNamesPerWrappedLine": 0,
"maxBindingNamesPerLine": 0,
"maxDefaultAndBindingNamesPerLine": 0
}
]
}
52 changes: 8 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,23 @@

An SDK for building applications on top of Raydium.

## Installation
## Usage Guide

### Yarn
### Installation

```
$ yarn add @raydium-io/raydium-sdk
```

### npm
### Load the Raydium instance

```
$ npm install @raydium-io/raydium-sdk --save
const raydium = await Raydium.load({
connection,
});
```

## Hosting JSON files

### Tokens List

- Solana format: https://api.raydium.io/v2/sdk/token/solana.mainnet.json
- Raydium format: https://api.raydium.io/v2/sdk/token/raydium.mainnet.json

### Token Icons

- /icons/{mint}.png

### Liquidity Pools List

**_Includes all pubkeys that build transaction need_**

- https://api.raydium.io/v2/sdk/liquidity/mainnet.json

### Farm/Staking Pools List

**_Includes all pubkeys that build transaction need_**

- https://api.raydium.io/v2/sdk/farm/mainnet.json

## Program IDs

| Function | Version | Mainnet |
| --------------- | ------- | -------------------------------------------- |
| AMM / Liquidity | 4 | 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 |
| Farm / Staking | 3 | EhhTKczWMGQt46ynNeRX1WfeagwwJd7ufHvCDjRxjo5Q |
| Farm / Staking | 5 | 9KEPoZmtHUrBbhWN1v1KWLMkkvwY6WLtAVUCPRtRjP4z |
| AMM Route | 1 | routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS |
| Serum | 3 | 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin |

## Usage
## Features

### Marshmallow

Expand All @@ -63,14 +32,9 @@ $ npm install @raydium-io/raydium-sdk --save
![](snapshots/marshmallow/1.png)
![](snapshots/marshmallow/2.png)

## Development

```
yarn install && yarn install-peers
```

## Reference

- https://github.com/coral-xyz/anchor/tree/master/ts
- https://github.com/ethers-io/ethers.js/tree/master/packages/bignumber
- https://github.com/pancakeswap/pancake-swap-sdk
- https://github.com/project-serum/serum-ts
Expand Down
7 changes: 3 additions & 4 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/

Expand Down Expand Up @@ -91,7 +90,7 @@ export default {
// notifyMode: "failure-change",

// A preset that is used as a base for Jest's configuration
// preset: undefined,
preset: "ts-jest/presets/default",

// Run tests from one or more projects
// projects: undefined,
Expand All @@ -106,7 +105,7 @@ export default {
// resetModules: false,

// A path to a custom resolver
// resolver: undefined,
resolver: "ts-jest-resolver",

// Automatically restore mock state between every test
// restoreMocks: false,
Expand Down Expand Up @@ -135,7 +134,7 @@ export default {
// snapshotSerializers: [],

// The test environment that will be used for testing
// testEnvironment: "jest-environment-node",
testEnvironment: "node",

// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},
Expand Down
213 changes: 0 additions & 213 deletions misc/farm/build-json.ts

This file was deleted.

Loading

0 comments on commit 2d201ee

Please sign in to comment.