Hello, can someone give an example to send a transaction other than transfer to Phantom
` const createTransferTransaction = async () => {
if (!phantomWalletPublicKey) throw new Error("missing public key from user");
var programId = new PublicKey("5Zcag1obaSA1CXLT6qusdbeiApeG4PVANtzsFmJZUMYj")
let instruction = new TransactionInstruction({
keys: [{ pubkey: phantomWalletPublicKey, isSigner: false, isWritable: true }],
programId,
data: Buffer.alloc(0),
});
let transaction = new Transaction().add( instruction );
Hello, can someone give an example to send a transaction other than transfer to Phantom
` const createTransferTransaction = async () => { if (!phantomWalletPublicKey) throw new Error("missing public key from user"); var programId = new PublicKey("5Zcag1obaSA1CXLT6qusdbeiApeG4PVANtzsFmJZUMYj") let instruction = new TransactionInstruction({ keys: [{ pubkey: phantomWalletPublicKey, isSigner: false, isWritable: true }], programId, data: Buffer.alloc(0), }); let transaction = new Transaction().add( instruction );
I try to send transaction to phantom wallet ,but I got errorMessage "Somthing went wrong" with errorCode:"-32603"