Skip to content

Commit

Permalink
Chore/update readme (#161)
Browse files Browse the repository at this point in the history
* chore: update readme

* update readme
  • Loading branch information
00xSam authored Sep 13, 2024
1 parent 241c3fa commit 103f3d3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Security

## @mercurial-finance/dynamic-amm-sdk [1.1.3] - PR[#161](https://github.com/mercurial-finance/mercurial-dynamic-amm-sdk/pull/161)

### Changed

- update readme

## @mercurial-finance/dynamic-amm-sdk [1.1.2] - PR[#158](https://github.com/mercurial-finance/mercurial-dynamic-amm-sdk/pull/158)

### Changed
Expand Down
24 changes: 4 additions & 20 deletions ts-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,12 @@ const provider = new AnchorProvider(mainnetConnection, mockWallet, {
});
// Alternatively, to use Solana Wallet Adapter

// https://station.jup.ag/blog/jupiter-token-list-api#endpoints
const tokenList = await fetch('https://token.jup.ag/all').then(res => res.json());
const USDC = tokenList.find(token => token.address === <USDC_ADDRESS>);
const USDT = tokenList.find(token => token.address === <USDT_ADDRESS>);
const SOL = tokenList.find(token => token.address === <SOL_ADDRESS>);
const constantProductPool = await AmmImpl.create(connection, MAINNET_POOL.USDC_SOL, USDC, SOL);
const stablePool = await AmmImpl.create(connection, MAINNET_POOL.USDT_USDC, USDT, USDC);
const constantProductPool = await AmmImpl.create(connection, MAINNET_POOL.USDC_SOL);
const stablePool = await AmmImpl.create(connection, MAINNET_POOL.USDT_USDC);

// If you need to create multiple, can consider using `createMultiple`
const pools = [
{
pool: MAINNET_POOL.USDC_SOL,
tokenInfoA: USDC,
tokenInfoB: SOL
},
{
pool: MAINNET_POOL.USDT_USDC,
tokenInfoA: USDT,
tokenInfoB: USDC
}
]
const [constantProductPool, stablePool] = await AmmImpl.createMultiple(connection, pools)
const pools = [MAINNET_POOL.USDC_SOL, MAINNET_POOL.USDT_USDC];
const [constantProductPool, stablePool] = await AmmImpl.createMultiple(connection, pools);
```

3. To interact with the AmmImpl
Expand Down
2 changes: 1 addition & 1 deletion ts-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mercurial-finance/dynamic-amm-sdk",
"version": "1.1.2",
"version": "1.1.3",
"description": "Mercurial Vaults SDK is a typescript library that allows you to interact with Mercurial v2's AMM.",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand Down

0 comments on commit 103f3d3

Please sign in to comment.