πŸ“Getting tokens

Specific devnet SPL tokens are required to test fermi

First, create and initialise your associated token account, and your openorders account:

const authorityPCTokenAccount = await spl.getAssociatedTokenAddress(  
      new anchor.web3.PublicKey(pcMint),
        connectedPublicKey,
        false,
      );
    
      console.log(authorityPCTokenAccount.toString());
      let openOrdersPda;
      let openOrdersPdaBump;
      [openOrdersPda, openOrdersPdaBump] =
      await anchor.web3.PublicKey.findProgramAddress(
        [
          Buffer.from('open-orders', 'utf-8'),
          new anchor.web3.PublicKey(marketPda).toBuffer(),
          connectedPublicKey.toBuffer(),
        ],
        program.programId,
      );

Next, ask the admin to mint some spl tokens to your accounts. Alternatively, if you're testing on your own deployment, you can use the adapted code in branch 'wallet-admin' to give yourself airdrops of SPL tokens

That's it! You're all set up. Head on over to the Fermi DEX UI at https://www.fermilabs.xyz/ and start trading!

Last updated