๐น You must have an active app on Alchemy
Get and save the
app key
๐น You must have a crypto wallet, recommended Metamask
Get and save the
private keyandpublic address key
๐น Host front-end API (ngrok, vercel, etc)
Get and save the
URLapi endpoint
๐น Change the Solidity Contract baseURI value with URL of API
function _baseURI() internal pure override returns (string memory) {
return "<URL>/api/erc721/";
}๐น Compile with HardHat to generate the artifacts
npx hardhat compile > artifacts/
> @openzeppelin/contracts/
> build-info/
> contracts/Contract.sol๐น Change the hardhat.config.js value KEYs to Alchemy and Metamask keys
require("@nomiclabs/hardhat-ethers");
module.exports = {
solidity: "0.8.0",
defaultNetwork: "ropsten",
networks: {
hardhat: {},
ropsten: {
url: <ALCHEMY_KEY>,
accounts: [`0x${<METAMASK_PRIVATE_KEY>}`]
}
}
};๐น Run npm deploy and see the magic happen ๐
