Title: Blockchain Dev Bootcamp Final Project
Student: Christopher Stone
Table of Contents
- 1. Project Description
- 2. Detailed Project Information
- 3. Directory Structure
- 4. Frontend Access
- 5. Public Ethereum Address for NFT Certificate
- 6. Installing Dependencies
- 7. Accessing the Project
- 8. Unit Testing
- 9. Screencast of Project Walk Through
Project Name: Grant Delivery Workflow
Summary: This project will allow a Contracting Officer (CO) to award a "grant" to a Company. The Company Point of Contact (CPOC) can accept the grant award and submit a monthly report during the period of the grant. The CO reviews the monthly report, and authorizes that month's payment for the work performed.
Steps:
- CO awards grant with:
- Company Name
- Title and Description of contract
- Total funding
- Number of Months
- CLINs and Quantity
-
CO funds smart contract with award value.
-
Company POC receives award notice.
-
CPOC counter signs the contract award to accept.
-
CO countersigns to fully execute the contract.
-
CPOC delivers a MS Word Document. (via IPFS?)
-
CO reviews MS Word doc for acceptance.
-
Upon acceptance, (Total funding/number of months) funding is released to Company wallet address from smart contract.
Additional ideas:
- Independently, an auditor can go to a web page to verify all contract info and TXs.
- Make the Grant Award an NFT? Or create a NFT at grant completion?
-
Avoiding Common Attacks can be found here.
-
Design Pattern Decisions can be found here.
-
Deployed address can be found here.
The dApp and its supporting HTML/CSS/JS files are in the folder "/GrantDapp/"
The solidity code and supporting files are in the folder "/GrantMgmt/"
- 📂 blockchain-developer-bootcamp-final-project
- 📂 GrantDapp
- 📄 AwardGrant.html
- 📄 Onboard.html
- 📄 Security.html
- 📄 Treasury.html
- 📄 ViewGrants.html
- 📂 images
- 📄 index.html
- 📂 src
- 📂 GrantMgmt
- 📂 build
- 📂 contracts
- 📂 contracts
- 📂 migrations
- 📂 test
- 📄 truffle-config.js
- 📂 build
- 📄 README.md
- 📄 avoiding_common_attacks.md
- 📂 bin
- 📂 GrantMgmt
- 📂 contracts
- 📂 GrantMgmt
- 📄 deployed_address.txt
- 📄 design_pattern_decisions.md
- 📄 final-project-checklist.txt
- 📂 GrantDapp
The frontend was developed in HTML/CSS/JS.
This demo is hosted at: GitHub Pages
(ETH, ERC-20s, and Bored Ape Yacht Club NFTs are also accepted.)
Run the following commands to install dependencies needed for this project:
Install MetaMask in your browser (Chrome/Brave/Opera/Edge). Browser specific download instructions are available at MetaMask.io
Install Node.js. Operating specific instructions are available at Nodejs.org
Then install each of the following:
npm install -g npm
npm install -g [email protected]
npm install @openzeppelin/contracts
npm install -g truffle
npm install -g ganache-cli
npm install --save-dev @truffle/hdwallet-provider
npm install bip39 dotenv --save
The Smart Contract is deployed to the Ropsten network at: '0x908E949F7795225c772e9cd61B44cA8CD492C9ca'
The unit tests are contained in the file at: GrantMgmt/test/grant_manager.js.
Ensure the file 'truffle-config.js' has the following settings to set the port to 7545:
networks: {
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 7545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},
...
Also, because I have locked the Pragma at 0.8.10 to ensure that contracts do not accidentally get deployed using, for example, the latest compiler which may have higher risks of undiscovered bugs.
Ensure the file 'truffle-config.js' has the following settings to set the Solidity compiler to 0.8.10:
// Configure your compilers
compilers: {
solc: {
version: "0.8.10", // Fetch exact version from solc-bin
}
},
Spin up an instance of Ganache and select "New Workspace (Ethereum)."
Click "Add Project" and select the truffle-config.js file from the GrantMgmt folder. Then select "Save Workspace" to start the local host.
To run all tests, simply run:
truffle test
Here is the link to a screencast of me walking through the project.