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
When I try to apply the anchor client to the Eliza framework project and test its fetch function,
let program = new anchor.Program(idl as anchor.Idl, anchorProvider);
// bank
const bankInfos = await program.account.bank.fetchMultiple([
rayTokenBank,
wifTokenBank,
]);
It works during the test process but has problems when building.
packages/plugin-solana/src/tests/anchor.test.ts:32:45 - error TS2339: Property 'bank' does not exist on type 'AccountNamespace<Idl>'.
32 const bankInfos = await program.account.bank.fetchMultiple([
~~~~
The text was updated successfully, but these errors were encountered:
It's because of the casting of the idl variable to anchor.Idl. The correct way is to cast it to the IDL type generated by Anchor in target/types, which will give you a full type support for your program.
When I try to apply the anchor client to the Eliza framework project and test its fetch function,
It works during the test process but has problems when building.
The text was updated successfully, but these errors were encountered: