This project is the delivery for Task 1 for Lime Academy Web 3 development course.
- The administrator (owner) of the library should be able to add new books and the number of copies in the library.
- Users should be able to see the available books and borrow them by their id.
- Users should be able to return books.
- A user should not borrow more than one copy of a book at a time. The users should not be able to borrow a book more times than the copies in the libraries unless copy is returned.
- Everyone should be able to see the addresses of all people that have ever borrowed a given book.
- Basic smart contract that fullfills requirements.
- Deployment unit tests
- Borrow unit tests
- Return unit tests
- History tests
- 100% test coverage
- Contract Verification
Contract is deployed in Goerli at 0x666379BfF98DA138Dd8E6677215074FDd0d0B084
-
Improved Data Structure
-
Now instead of storing a String for the book, uses a bytes6, so is needed to add a hex represantion of an ISBN.
-
Basic smart contract that fullfills requirements.
-
Deployment unit tests
-
Borrow unit tests
-
Return unit tests
-
History tests
-
100% test coverage
-
Contract Verification
Contract is deployed in Goerli at 0x6a7667E68A8A02Af2aCD543F384F4a99F36D8018
- Create HardHat Project.
- Use OpenZeppelin Ownable.
- Local Node deployable scripts.
- Deployment in Goerli.
- Testing scenarios.
- Added use cases.
- Tests Coverage report at 100%.
- HH deployement task.
- Reading sensitive data from .env.
- Etherscan verification.
Create a script interacting with your library on your local node that:
- Creates a book
- Checks all available books
- Rents a book
- Checks that it is rented
- Returns the book
- Checks the availability of the book
- Create a copy of your script and perform the same interactions but on Goerli testnet.