const gas = async () => {
const ethers = Moralis.web3Library;
const web3Provider = await Moralis.enableWeb3();
const gasPrice = await web3Provider.getGasPrice();
const signer = web3Provider.getSigner();
const contract = new ethers.contract(“0xdAC17F958D2ee523a2206206994597C13D831ec7”, ABI, signer);
const transaction = await contract.approve({
_spender: “0xc…”,
_value: 1,
gasLimit: 10000000,
gasPrice: gasPrice,
// nonce: nonce || undefined,
});
await transaction.wait();
};
Please here is my code