I have written the following code to try to mint an NFT based on some git repos I saw. The code runs successfully and outputs a transaction hash, but the hash never resolves to anything on Rinkeby Etherscan. What am I doing wrong?

const abi = ...

const ethers = require('ethers');

const provider = new ethers.providers.JsonRpcProvider("https://rinkeby.infura.io/v3/...");

const wallet = new ethers.Wallet("0x97332958d5acbd80aafc0c7c724e25cc09cca2251b9c38e81dc2442ad7130943", provider);

const contractAddress = "0x95E4fa42CD4f5B6a80ba3ED1ee3aD363dd8Bf7D3";

const contract = new ethers.Contract(contractAddress, abi, wallet);

async function main() {
    var options = { gasPrice: 1000000000, gasLimit: 850000, nonce: 54, value: 0 };
    let txn = await contract.mint(wallet.address, "/", options);


1 Answer 1


I just changed options to:

var options = { gasLimit: 850000 };

And it works now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.