/LastWords

A project to allow users have their last words minted as NFTs.

Primary LanguageJavaScript

LastWords-Gallery

LastWords is a project to let people share their last words to the world. The way it works by basically storing the data in Ethereum blockchain then an NFT will be minted with user's data. All the minted NFTs will be shown in the gallery. It may take time for Moralis and front-end to process the new mitned NFTs.

Installation

To install the project in your local machine clone the repository and then go the block then in the blockchain directory run.

yarn install

After that make .env file with your configurations. You can see what configuration you need in the env file from the hardhat config file. Now you can compile and deploy the smart contracts using

yarn hardhat compile
yarn hardhat deploy

in case you want to use in any Ethereum net then deploy using:

yarn hardhat deploy --network "netowrk_name"

But you have to make sure you added the netowrk configuration in the hardhat helper and config files

Usage

There are 2 ways to interact with the project

First way:

The scripts that are written in the scripts directory using:

yarn hardhat run ./scripts/"script_name" --netowrk "network_name"

you can also write your own scripts to interact with the blockchain smart contracts in the same directory

Second way:

Using the front-end that is inside the front-end directory. After cloning the repository go to the directory and run:

yarn install
yarn run dev

Go to the local host and you will see the front-end. You can interact with the blockchain using the visual part. However, it is under development for more functionalities. If you wish to use the one I already deployed in https://last-words-last-words-nextjs-33go.vercel.app/ feel free and follow the Visuals section but make sure you are connected to Goerli testnet.

Visuals

This section is mainly about interacting using my deployed version of the front-end. If your wallet not connected you will be asked to conenct using the conenct button:


After you connect your home page will reload with the recently listed last words:


You can view the last words of anyone by pressing in the button:


To make your own last words go to your-last-words page where you will be asked to enter your data:


After you will make a transaction to store your data on the blockchain before it's minted when the interval passes. Unfortunately, Due to lack of the Link token, I stopped the auto-checking up on the intervals from the chain keepers on my chain-link keeprs account

Future improvements

  • Add the edit part in the front-end your-last-words page
  • Let the user upload his picture instead of providing an IPFS link for it
  • Add more user's info in the last-words NFT card
  • Create data structre to store the users where their last-words NFT's been already minted
  • Adding some require statments in the Last-Words Manager to ensure that the reansaction reverts in case of any suspecious events
  • Use ownable pattern if the project is going to handle ethers transaction matters

License

MIT