CryptoFly.us | CRYPTOCURRENCY BITCOIN SHIRTS CLOTHING APPAREL HATS

CRYPTO NEWS

Price analysis 10/15: BTC, ETH, BNB, ADA, XRP, SOL, DOT, DOGE, LUNA, UNI

Hopes of a BTC ETF approval sent Bitcoin charging toward a new all-time high and several altcoins are also breaking out of bullish setups.

Mint NFT on Polygon using WETH instead of MATIC

I have a ERC721 smart contract deployed on polygon test network mumbai. I’m calling the mint function directly on my website, using ethers.js, to create a NFT: const provider = new ethers.providers.Web3Provider(window.ethereum); const signer = await provider.getSigner(); const accountSigner = await signer.getAddress(); const contractInstanceWrite = new ethers.Contract(myContractAddress, abi, signer); mint = await contractInstanceWrite.mint(accountSigner, 1, {::Listen

I have a ERC721 smart contract deployed on polygon test network mumbai.

I’m calling the mint function directly on my website, using ethers.js, to create a NFT:

const provider = new ethers.providers.Web3Provider(window.ethereum); const signer = await provider.getSigner(); const accountSigner = await signer.getAddress(); const contractInstanceWrite = new ethers.Contract(myContractAddress, abi, signer); mint = await contractInstanceWrite.mint(accountSigner, 1, { gasPrice: gas_price, gasLimit: gas_limit, value: cost }); 

It prompts MetaMask to pay the cost with MATIC, but I want to prompt it to directly pay with WETH (As I know, the fees must be paid with MATIC but the cost of the NFT can be with another token).

How to do this?

Thank you very much!

Price analysis 10/15: BTC, ETH, BNB, ADA, XRP, SOL, DOT, DOGE, LUNA, UNI

Shopping cart
There are no products in the cart!
Continue shopping
0