Our great sponsors
- Amplication - open-source Node.js backend code generator
- Appwrite - The open-source backend cloud platform
- SurveyJS - A Non-Cloud Alternative to Google Forms that has it all.
- Sonar - Write Clean JavaScript Code. Always.
- InfluxDB - Collect and Analyze Billions of Data Points in Real Time
- Mergify - Updating dependencies is time-consuming.
-
Set and keep our environment variables hidden by using [dotenv](https://www.npmjs.com/package/dotenv)↗️
-
// require the correct libraries require("dotenv").config(); require("@nomiclabs/hardhat-ethers"); // Our contract’s ABI (Application Binary Interface) is the interface enabling our js script to interact with our smart contract. Hardhat generates and stores the ABI version of our contract in the artifacts folder as a JSON file. const contract = require("../artifacts/contracts/AnkrAvalancheNFT.sol/AnkrAvalancheNFT.json"); const contractInterface = contract.abi; let provider = ethers.provider; const tokenURI = "https://ipfs.io/ipfs/bafybeib3skazl2dhjctsmiroc6ug5zketfooovt53ast5pxytcan2n3zba/avaxankr.json"; const privateKey = `0x${process.env.PRIVATE_KEY}`; const wallet = new ethers.Wallet(privateKey); wallet.provider = provider; const signer = wallet.connect(provider); // https://docs.ethers.io/v5/api/contract/contract const nft = new ethers.Contract( process.env.CONTRACT_ADDRESS, contractInterface, signer ); const main = () => { console.log("Waiting 5 blocks for confirmation..."); nft .mint(process.env.PUBLIC_KEY, tokenURI) .then((tx) => tx.wait(5)) .then((receipt) => console.log( `Your transaction is confirmed, its receipt is: ${receipt.transactionHash}` ) ) .catch((e) => console.log("something went wrong", e)); }; main();
-
Amplication
Amplication: open-source Node.js backend code generator. An open-source platform that helps developers build backends without spending time on boilerplate & repetitive coding. Including production-ready GraphQL & REST APIs, DB schema, DTOs, filtering, pagination, RBAC, & more.
Related posts
- Building Trust in a Trustless World: Decentralized Applications Unveiled
- rarbg archive removed from GitHub due to DMCA
- Mirrors or alternatives to e621 on the decentralized / distributed web
- How would you exchange information between places thousands of light years apart? How would "internet" work at such distances?
- Alternative to Youtube Vimeo