Switch to new program ID, update order placement instruction

This commit is contained in:
Gary Wang 2020-08-29 06:41:31 -07:00
parent 2078a39ea2
commit 87c25716c0
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ import { PublicKey, TransactionInstruction } from '@solana/web3.js';
import { TOKEN_PROGRAM_ID } from './token-instructions';
export const DEX_PROGRAM_ID = new PublicKey(
'3v9kjrBLN7Awr9BGC2qmFnWLM1EgMAdNm2rXLQFUcQ2d',
'9JipvuvjcirpYf8mzYQtozXeYtQLWY67LaZCiANSMNgs',
);
export const INSTRUCTION_LAYOUT = new VersionedLayout(
@ -124,7 +124,7 @@ export class DexInstructions {
}) {
return new TransactionInstruction({
keys: [
{ pubkey: market, isSigner: false, isWritable: false },
{ pubkey: market, isSigner: false, isWritable: true },
{ pubkey: openOrders, isSigner: false, isWritable: true },
{ pubkey: requestQueue, isSigner: false, isWritable: true },
{ pubkey: payer, isSigner: false, isWritable: true },

View File

@ -889,7 +889,7 @@ function divideBnToNumber(numerator: BN, denominator: BN): number {
return quotient + rem.div(gcd).toNumber() / denominator.div(gcd).toNumber();
}
const MINT_LAYOUT = struct([blob(36), u8('decimals'), blob(3)]);
const MINT_LAYOUT = struct([blob(44), u8('decimals'), blob(37)]);
export async function getMintDecimals(
connection: Connection,