Open 0xJamesBong opened 2 weeks ago
const initializeExtraAccountMetaListInstruction = await program.methods
.initializeExtraAccount()
.accounts({
payer: wallet.publicKey,
mint,
extraAccountMetaList: extraAccountMetaListPDA,
latestWhaleAccount: whalePDA,
systemProgram: anchor.web3.SystemProgram.programId,
tokenProgram: TOKEN_2022_PROGRAM_ID,
associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID,
})
.instruction();
for the tutorial I run into problems : `TSError: ⨯ Unable to compile TypeScript: client/client.ts:44:13 - error TS2353: Object literal may only specify known properties, and 'extraAccountMetaList' does not exist in type 'ResolvedAccounts<{ name: "payer"; writable: true; signer: true; } | { name: "extraAccountMetaList"; writable: true; pda: { seeds: [{ kind: "const"; value: [101, 120, 116, 114, 97, 45, 97, 99, 99, 111, 117, ... 7 more ..., 115]; }, { ...; }]; }; } | ... 4 more ... | { ...; }>'.
44 extraAccountMetaList: extraAccountMetaListPDA,
at createTSError (/Users/hou/Documents/workspace/rust/transfer-hook-whale/node_modules/ts-node/src/index.ts:859:12)
at reportTSError (/Users/hou/Documents/workspace/rust/transfer-hook-whale/node_modules/ts-node/src/index.ts:863:19)
at getOutput (/Users/hou/Documents/workspace/rust/transfer-hook-whale/node_modules/ts-node/src/index.ts:1077:36)
at Object.compile (/Users/hou/Documents/workspace/rust/transfer-hook-whale/node_modules/ts-node/src/index.ts:1433:41)
at Module.m._compile (/Users/hou/Documents/workspace/rust/transfer-hook-whale/node_modules/ts-node/src/index.ts:1617:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1518:10)
at Object.require.extensions.<computed> [as .ts] (/Users/hou/Documents/workspace/rust/transfer-hook-whale/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1249:32)
at Function.Module._load (node:internal/modules/cjs/loader:1065:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:158:12) {
diagnosticCodes: [ 2353 ]
}`
Any ideas about it? Which is different from yours. @0xJamesBong
I've been playing around with this repo and the transfer-hook-whale repo by following this tutorial
it seems to me that in the initialize.ts one has to replace the
.accounts({...})
with.accountsPartial({...})
But then after having moved the idl and the TransferHookWhale.tsx, when I run the command
yarn run initialize
, I keep running into either the following erroror this error
This happens when I try to replace the address in the Itransfer_hook_whale.json and the transfer_hook_whale.ts with the program-id or the address of the deployed contract.
I would really appreciate if I can be offered some help! Thanks so much!