Skip to content

Error using DLMM IDL #221

@Jaybee020

Description

@Jaybee020

I copied the dlmm idl file to use in my code. I decided to initialise the anchor program as seen below.

`
import { BorshCoder, Program } from "@coral-xyz/anchor";
import { PublicKey } from "@solana/web3.js";
import MeteoraIDL from "../../../../../config/IDL/meteora.json";
import { rpcConnection } from "../../../../../config/constants";

export const METEORA_DLMM_PROGRAM_ID = new PublicKey(
"LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo"
);

export const program = new Program(MeteoraIDL, { connection: rpcConnection });

`

But I keep on getting the following error

IdlError: Type not found: ixData
at Function.fieldLayout (/Users/jaybee/Documents/Coding/Coding Projects/solana-txn-coder/node_modules/@coral-xyz/anchor/src/coder/borsh/idl.ts:113:19)
at /Users/jaybee/Documents/Coding/Coding Projects/solana-txn-coder/node_modules/@coral-xyz/anchor/src/coder/borsh/instruction.ts:35:18
at Array.map ()
at /Users/jaybee/Documents/Coding/Coding Projects/solana-txn-coder/node_modules/@coral-xyz/anchor/src/coder/borsh/instruction.ts:34:36
at Array.map ()
at new BorshInstructionCoder (/Users/jaybee/Documents/Coding/Coding Projects/solana-txn-coder/node_modules/@coral-xyz/anchor/src/coder/borsh/instruction.ts:32:40)
at new BorshCoder (/Users/jaybee/Documents/Coding/Coding Projects/solana-txn-coder/node_modules/@coral-xyz/anchor/src/coder/borsh/index.ts:40:24)
at new Program (/Users/jaybee/Documents/Coding/Coding Projects/solana-txn-coder/node_modules/@coral-xyz/anchor/src/program/index.ts:294:28)
at Object. (/Users/jaybee/Documents/Coding/Coding Projects/solana-txn-coder/services/blockchain/solana/coder/meteora/constants.ts:11:24)
at Module._compile (node:internal/modules/cjs/loader:1504:14)

My anchor version is "^0.31.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions