I have been trying to write some custom contract in solana using Rust but always ending up with below error:
Catch the SendTransactionError and call getLogs() on it for full details.at Connection.sendEncodedTransaction (/home/user1/smart_client/node_modules/@solana/web3.js/lib/index.cjs.js:8152:13)at process.processTicksAndRejections (node:internal/process/task_queues:95:5)at async Connection.sendRawTransaction (/home/user1/smart_client/node_modules/@solana/web3.js/lib/index.cjs.js:8117:20)at async sendAndConfirmRawTransaction (/home/user1/smart_client/node_modules/@project-serum/anchor/dist/cjs/provider.js:200:23)at async AnchorProvider.sendAndConfirm (/home/user1/smart_client/node_modules/@project-serum/anchor/dist/cjs/provider.js:89:20)at async MethodsBuilder.rpc [as _rpcFn] (/home/user1/smart_client/node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.js:15:24) {signature: '',transactionMessage: 'invalid transaction: Transaction failed to sanitize accounts offsets correctly',transactionLogs: undefined