I have a code that uses keypair from file to sign transactions.
const payer = Keypair.fromSecretKey(BufferJs.from(keypair));
const wallet = new anchor.Wallet(payer);
////
////
const tx = await rewardPoolProgram.rpc.initializePool(
nonce,
rewardDuration,
lockPeriod,
{
accounts: {
authority: wallet.publicKey,
stakingMint: tokenMint.publicKey,
stakingVault,
rewardMint: tokenMint.publicKey,
rewardVault,
poolSigner: poolSigner,
pool: pool.publicKey,
tokenProgram: TOKEN_PROGRAM_ID,
},
signers: [pool],
instructions: [
await rewardPoolProgram.account.pool.createInstruction(pool),
],
}
);
It used to work fine months ago, today I tried it again and have this error:
Uncaught (in promise) Error: Invalid arguments: authority not provided.
at common.ts:50:1
at Array.forEach (<anonymous>)
at validateAccounts (common.ts:45:1)
at ix (instruction.ts:28:1)
at txFn (transaction.ts:17:1)
at Object.rpc [as initializePool] (rpc.ts:16:1)
at createPool (createPool.ts:34:1)
at async onFinish (CreatePool.tsx:22:1)
Does Solana no longer allow to sign transaction by keypair anymore?
rewardPoolProgram
this will be difficult for most to answer. I'm voting to close this question unless we can get a more complete picture of the problem.