remove unused params for init market, bump sdk to 0.0.6

This commit is contained in:
Sayantan Karmakar 2022-06-02 20:56:14 +05:30
parent 04cdcf839f
commit 4bd45646ff
3 changed files with 12 additions and 16 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@project-serum/serum-dev-tools",
"version": "0.0.5",
"version": "0.0.6",
"description": "developer tooling suite for building on serum",
"repository": {
"type": "git",
@ -20,7 +20,8 @@
"prepare": "cd .. && husky install ts/.husky",
"lint": "eslint --fix",
"docs": "typedoc --entryPoints src/index.ts",
"deploy": "yarn build && yarn test && npm publish"
"deploy": "yarn build && yarn test && npm publish",
"deploy:no-test": "yarn build && npm publish"
},
"lint-staged": {
"src/**/*.ts": [

View File

@ -1,5 +1,4 @@
import { Connection, LAMPORTS_PER_SOL, PublicKey } from "@solana/web3.js";
import BN from "bn.js";
import { Dex, FileKeypair } from "../src";
process.on("beforeExit", () => console.log("Parent process exiting..."));
@ -40,8 +39,6 @@ const main = async () => {
const market = await dex.initDexMarket(owner.keypair, baseCoin, quoteCoin, {
lotSize: 1e-3,
tickSize: 1e-2,
feeRate: 10,
quoteDustThreshold: new BN(100),
});
console.log(

View File

@ -17,22 +17,20 @@ import { FileKeypair } from "./fileKeypair";
/**
* @param lotSize This is the smallest representable amount of the base coin .
* @param tickSize This is the smallest representable amount of the quote coin.
* @param feeRate
* @param quoteDustThreshold
*/
export type MarketParams = {
lotSize: number;
tickSize: number;
feeRate: number;
quoteDustThreshold: BN;
// feeRate: number;
// quoteDustThreshold: BN;
};
/**
* @param durationInSecs
* @param orderCount
* @param initialBidSize
* @param baseGeckoSymbol
* @param quoteGeckoSymbol
* @param durationInSecs The duration in seconds for which the market maker will run.
* @param orderCount The number of orders to place per side in each iteration.
* @param initialBidSize The initial bid size for the market maker.
* @param baseGeckoSymbol The symbol used by CoinGecko for the base coin.
* @param quoteGeckoSymbol The symbol used by CoinGecko for the quote coin.
*/
type MarketMakerOpts = {
// unref: boolean;
@ -209,8 +207,8 @@ export class Dex {
quoteMint: quoteCoin.mint,
baseLotSize: new BN(baseLotSize),
quoteLotSize: new BN(quoteLotSize),
feeRateBps: marketParams.feeRate,
quoteDustThreshold: marketParams.quoteDustThreshold,
feeRateBps: 150, // Unused in v3
quoteDustThreshold: new BN(500), // Unused in v3
vaultSignerNonce: vaultOwnerNonce,
programId: this.address,
});