
Product
Announcing Socket Certified Patches: One-Click Fixes for Vulnerable Dependencies
A safer, faster way to eliminate vulnerabilities without updating dependencies
@project-serum/serum-dev-tools
Advanced tools
A developer tooling SDK for building on serum-dex.
You will need to use the FileKeypair class that extends the Keypair class from @solana/web3.js to provide easy file-based keypair management, which is required for the market making features provided by this package.
const owner = FileKeypair.generate("./scripts/keys/owner.json");
const airdropSig = await connection.requestAirdrop(
owner.keypair.publicKey,
10 * LAMPORTS_PER_SOL,
);
await connection.confirmTransaction(airdropSig);
You need to have a serum-dex program deployed on the cluster you wish to interact with.
You can either,
Use the serum-dev-tools CLI to deploy the program.
use the already deployed serum-dex programs, 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin on mainnet-beta and DESVgJVGajEgKGXhb6XmqDHGz3VjdgP7rEVESBgxmroY on devnet.
yarn add @project-serum/serum-dev-tools
Dexconst connection = new Connection("http://localhost:8899", "confirmed");
const dexAddress = new PublicKey(
"7zo7HCQAZPRb4pYiQQ6fLjC8ssN3E8LkavVs8JUA5NMn",
);
const dex = new Dex(dexAddress, connection);
Coin instances for your Marketconst baseCoin = await dex.createCoin(
"SAYA",
9,
owner.keypair,
owner.keypair,
owner.keypair,
);
const quoteCoin = await dex.createCoin(
"SRM",
9,
owner.keypair,
owner.keypair,
owner.keypair,
);
// Fund the FileKeypair object to place orders.
await baseCoin.fundAccount(1000000, owner.keypair, connection);
await quoteCoin.fundAccount(2000000, owner.keypair, connection);
Marketconst market = await dex.initDexMarket(owner.keypair, baseCoin, quoteCoin, {
lotSize: 1e-3,
tickSize: 1e-2,
});
dex.runMarketMaker(market, owner, {
durationInSecs: 30,
orderCount: 3,
initialBidSize: 1000,
baseGeckoSymbol: "solana",
quoteGeckoSymbol: "usd",
});
dex.runCrank(market, owner, {
durationInSecs: 20,
verbose: true,
});
FAQs
developer tooling suite for building on serum
We found that @project-serum/serum-dev-tools demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.