You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const coder = new RaydiumAmmCoder(idl as Idl);
const result = coder.instruction.decode(
Buffer.from("0bf70a9c01000000006417427900000000", "hex")
);
console.log(result);
$ ts-node src/index.ts
TypeError: fields must be array of Layout instances
at new Structure (/Users/ben/projects/polaris/monitor/node_modules/@native-to-anchor/buffer-layout/node_modules/@solana/buffer-layout/src/Layout.ts:1107:13)
at Object.exports.struct (/Users/ben/projects/polaris/monitor/node_modules/@native-to-anchor/buffer-layout/node_modules/@solana/buffer-layout/src/Layout.ts:2615:5)
at Object.<anonymous> (/Users/ben/projects/polaris/monitor/src/raydium/coder/accounts.ts:109:32)
at Module._compile (node:internal/modules/cjs/loader:1368:14)
at Module.m._compile (/Users/ben/projects/polaris/monitor/node_modules/ts-node/src/index.ts:1618:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1426:10)
at Object.require.extensions.<computed> [as .ts] (/Users/ben/projects/polaris/monitor/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1205:32)
at Function.Module._load (node:internal/modules/cjs/loader:1021:12)
at Module.require (node:internal/modules/cjs/loader:1230:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The text was updated successfully, but these errors were encountered:
instantiating coder
seems like issue with layout here
https://github.com/raydium-io/raydium-idl/blob/master/raydium_amm/src/coder/accounts.ts#L109
The text was updated successfully, but these errors were encountered: