Create Market

Harcoded addresses

triangle-exclamation
const config = new PublicKey("LFJxVxETTXwoxuuFCpqj3KihrYxmJc7maQFg4UjHZ3r");

The official config is using WSOL as the quote token.

const wSol = new PublicKey("So11111111111111111111111111111111111111112");

We will use the Metaplex Metadata program for the token metadata.

const metaplexMetadata = new PublicKey(
  "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
);

Some creation parameters that can be customized.

const name = "Test Market";
const symbol = "TEST";
const uri = "https://example.com/metadata.json";
// - Swap authority: Swaps can be restricted, requiring the signature of the swap authority to execute swaps
const swapAuthority = null;

Metadata upload helpers are provided in the SDKs if needed.

Token address

The token address can be generated randomly or mined using solana-keygen grind.

The token metadata account address needs to be computed.

Anchor will compute for us all the required ATAs.

Transaction

Last updated