In this project, you will develop, deploy, and interact with a simple collateralized loan contract on the Ethereum blockchain using Solidity. This contract will manage loans backed by Ethereum as collateral, offering hands-on experience with real-world financial smart contracts.
Use the following command to clone the repo:
git clone Getting https://github.com/udacity/cd13282-blockchain-with-solidity-project
cd cd13282-blockchain-with-solidity-project
Once you have the starter code, head over to the starter
directory. You will notice one folder: hardhat-js
. We have mostly been using Hardhat with JavaScript.
We will mostly use Hardhat for this project to write, deploy, and test the smart contract.
If you are using Udacity's workspace, you do NOT need to install any software packages.
If you are using your local environment, head over to hardhat-js
and install the necessary dependencies using the following command.
npm install
You will also find a file .env.example
, you will need to create a .env
file similar to that.
INFURA_API_KEY=
ACCOUNT_PRIVATE_KEY=
Add your wallet private key and infura API key.
Head over to test
folder and create a new file to write the tests.
- Successfully deploy your Collateralized Loan smart contract to the Sepolia testnet.
- Develop and finalize the Solidity code for the Collateralized Loan contract.
- Write comprehensive test scripts using Hardhat to validate the contract's functionalities.
- Provide a link to the Sepolia Etherscan page confirming the successful deployment of your contract.
- The Etherscan link should display the contract address and transaction details on the Sepolia testnet.
- Submit the link to your GitHub repository containing the project.
- The repository should include:
- The Solidity smart contract code.
- Hardhat test scripts.
- A README file containing the Sepolia Etherscan link of the deployed contract
- Ensure that the GitHub repository is public and accessible.
- Double-check the Etherscan link to ensure it directs to the correct contract and network.
- The smart contract code should be well-commented for clarity and understanding.
- Hardhat Test Scripts should cover all critical paths and edge cases in the contract functionality.
- The README must contain the Sepolia Etherscan link of the deployed contract.