got error with anchor: Error occurred: Error: Invalid arguments: wallet not provided. It is a problem with my low-level deposit instruction, here is the code:
const depositInstruction = await magicEdenProgram.methods
.deposit({
escrowPaymentBump: 253,
amount: "a6aee6",
})
.accounts({
wallet: keypair.publicKey,
notary: "NTYeYJ1wr4bpM5xo6zx5En44SvJFAd35zTxxNoERYqd",
escrowPaymentAccount: "6CsmuHtBmguufBVnYNG7WrsLz2ud5SnzesPLYhCTx1sZ",
authority: "autMW8SgBkVYeBgqYiTuJZnkvDZMVU2MHJh9Jh7CSQ2",
auctionHouse: "E8cU1WiRWjanGxmn96ewBgk9vPTcL6AEZ1t6F6fkgUWe",
systemProgram: "11111111111111111111111111111111",
})
.instruction();
but i have logged wallet - all is good here is my anchor configuration:
const keypair = getWallet(".private/secretKey.json");
const meidl = readJsonFile("src/magic-eden/m2idl.json");
const wallet: Wallet = new Wallet(keypair);
const connection = new Web3.Connection(
Web3.clusterApiUrl("mainnet-beta"),
"confirmed",
);
const provider = new AnchorProvider(connection, wallet, {});
const magicEdenProgram = new Program(
meidl as Idl,
new PublicKey(MAGIC_EDEN_V2_PROGRAM_ID),
provider,
);
with another instruction i got the same error:
const buyTxInstruction = await magicEdenProgram.methods.
buyV2({ buyerPrice, tokenSize, buyerStateExpiry, buyerCreatorRoyaltyBp })
.accounts(
{
wallet: provider.wallet.publicKey,
notary: "NTYeYJ1wr4bpM5xo6zx5En44SvJFAd35zTxxNoERYqd",
tokenMint: "3TSQxLkHZq3Amy7eDMJYqPZYs8e6izVLdkLt8h1PYwZ4",
metadata: "3xh3JLeBZRU9PwSRJwsYrUT1exCEdRby6aYy24SQ5gQf",
escrowPaymentAccount: "6CsmuHtBmguufBVnYNG7WrsLz2ud5SnzesPLYhCTx1sZ",
authority: "autMW8SgBkVYeBgqYiTuJZnkvDZMVU2MHJh9Jh7CSQ2",
auctionHouse: "E8cU1WiRWjanGxmn96ewBgk9vPTcL6AEZ1t6F6fkgUWe",
buyerTradeState: "FFaxcPjR5QpSDsE1dDU97L6wBGWwUtaB3HYEysdsbGov",
buyerReferral: "C18EicZUfDQ1rzW6fWxzBwRsmF4VzomUeu8Cfuxn6CZx",
tokenProgram: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
systemProgram: "11111111111111111111111111111111",
})
.instruction();