Hello friends, I hope you are well, I am trying to execute a contract function, but in each attempt I get [CANCELLED] , specifically the reason seems to be âvalue transfer did not complete from a contract revertedâ, at first everything seems to be going well, the call to the function, then confirm, pending, but in the end it doesnât go any further and I get this
failed transaction, [CANCELLED]
const getItem = async () => {
const ethers = Moralis.web3Library;
const web3Provider = await Moralis.enableWeb3();
const signer = web3Provider.getSigner();
const address = "0x7o345...";
const contract = new ethers.Contract(address, ABI, signer);
async function transation() {
try {
const tx = await contract.functions.buyItem(props.item, {value: props.askingPrice, gasLimit: 30000000})
const result = await tx.wait();
} catch (error) {
throw new Error(error);
}
}
const receipt = await transation();
console.log(receipt);
};
error:
I would appreciate any suggestions on what I might be doing wrong.