'Testing NFT contract on polygon
I am following the steps of the tutorial in the OpenSea tutorial below:
https://docs.opensea.io/docs/setting-up-your-smart-contract-project
It looks like this is based on Ethereum and requires some payment. The script hardhat.config.js is as follows:
/**
* @type import('hardhat/config').HardhatUserConfig
*/
require('dotenv').config();
require("@nomiclabs/hardhat-ethers");
const { ALCHEMY_KEY, ACCOUNT_PRIVATE_KEY } = process.env;
module.exports = {
solidity: "0.8.0",
defaultNetwork: "rinkeby",
networks: {
hardhat: {},
rinkeby: {
url: `https://eth-rinkeby.alchemyapi.io/v2/${ALCHEMY_KEY}`,
accounts: [`0x${ACCOUNT_PRIVATE_KEY}`]
},
ethereum: {
chainId: 1,
url: `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_KEY}`,
accounts: [`0x${ACCOUNT_PRIVATE_KEY}`]
},
},
}
I just wanted to test this solution without paying any money. What are the changes to make or is there any source where to read more about an alternative implementation that is free for testing?
Solution 1:[1]
If you are looking to test the Smart Contract, you may use Rinkeby Testnet to test. You could deploy the contract to Rinkeby chain and check the status of the transaction here: https://rinkeby.etherscan.io/
In order to test, you would need test ethers and you could get these ethers from: https://faucet.rinkeby.io/
However, if you want to deploy it to mainnet, you would have to pay gas fees.
You may try to deploy on polygon chain for lower gas fee if that's the case. Take a look at this article in order to deploy your contract on polygon chain:
https://coinsbench.com/erc-721-nft-smart-contract-deployment-using-hardhat-97c74ce1362a
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Rohan Dhar |