In the repository, we can find the project's report, a video demo, and a presentation of the DApp.
Install MetaMask on your browser and connect it to the Goerli test network. Create an .env
file in the project's root folder with the following structure:
ALCHEMY_API_URL = "https://eth-goerli.g.alchemy.com/v2/OMigXz2SzOnoSvOvI1YXiyDPDYRq6sUr"
WALLET_PRIVATE_KEY = "..."
ETHERSCAN_API_KEY = "..."
CAMPAIGN_CONTRACT_ADDR = "..."
MONGO_DB_ATLAS_USERNAME = "admin"
MONGO_DB_ATLAS_PASSWORD = "UTJtbKxUzoxQ3arP"
PINATA_API_KEY = "..."
PINATA_SECRET_API_KEY = "..."
ALCHEMY_API_URL
which is Alchemy's API HTTPS entrypoint combined with the corresponding API Key.WALLET_PRIVATE_KEY
which is your MetaMask's wallet private key.ETHERSCAN_API_KEY
which is the Etherscan API key.CAMPAIGN_CONTRACT_ADDR
which holds the address of the deployed campaign factory contract, as it will be seen in the next steps.MONGO_DB_ATLAS_USERNAME
is the MongoDB containerMONGO_INITDB_ROOT_USERNAME
variable, as shown in the docker-compose.yml.MONGO_DB_ATLAS_PASSWORD
is the MongoDB containerMONGO_INITDB_ROOT_PASSWORD
variable, as shown in the docker-compose.ymlPINATA_API_KEY
is the Pinata API key.PINATA_SECRET_API_KEY
is the Pinata API key secret.
Welcome the Goerli Faucet.
- Navigate to the
solidity/
folder. - Run
npm install
. - Deploy:
- CampaignFactory.sol using
npx hardhat run scripts/deployCampaign.mjs --network goerli
.
- CampaignFactory.sol using
According to Hardhat's configurations, the deployment already includes verifying the contracts in the Goerli Network, which is an Ethereum Testnet. This means that the code of the Smart Contract is visible to everyone in Etherscan.
docker-compose up
docker-compose up --build
- Material UI which is a library of React UI components that implements Google's Material Design.
- Hardhat which is an Ethereum development environment for professionals. It facilitates performing frequent tasks, such as running tests, automatically checking code for mistakes, or interacting with a Smart Contract.
- OpenZeppelin which provides security products to build, automate, and operate decentralized applications.
- MetaMask which holds the crypto wallet.
- Web3.js.
- Pinata.
- Mongoose.
- Alchemy.
- ReactJS.
- NodeJS.
- IPFS.
References:
- Solidity Documentation;
- Web3 Documentation;
- Alchemy;
- How to Create an NFT on Ethereum Tutorial;
- How to Mint and NFT from Code;
- NatSpec Format.
To generate the Solidity contract's documentation, first install the Solidity Compiler, solc. Then run solc --pretty-json --devdoc /path/to/solidity/file
. Beware that you may have to change the source slightly due to OpenZeppelin dependencies.