I am trying to invokeContractFunction but getting error "trying to write value to a void slot"
I have also tried sample transaction, but still getting the same error: https://developers.stellar.org/docs/data/rpc/api-reference/methods/sendTransaction
I have gone through documentation but still facing issues https://stellar.github.io/js-stellar-sdk/index.html
const transaction = new TransactionBuilder(sourceAccount, {
fee: BASE_FEE,
networkPassphrase: Networks.TESTNET
})
// Add your specific operations here. Example:
.addOperation(Operation.invokeContractFunction({
contract: contractId,
function: "set_discount",
args: [discount_factor],
source: "GCZEAIDXRPLJ5UPINK36M3FG2TP3YJHYQFBPWA6EFYWVBOC5EAWXSVTV",
}))
.setTimeout(180)
.build();
// Sign the transaction to prove you are actually the person sending it
transaction.sign(sourceKeypair);
// Submit the transaction to the Stellar network
console.log("transaction",transaction)
const transactionResult = await server.sendTransaction(transaction);
Any help will be highly appreciated!