Skip to content

fribas84/lime_1_library

Repository files navigation

Lime Academy Task 1 - Library

Description

This project is the delivery for Task 1 for Lime Academy Web 3 development course.

Requierements

  • 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.

To do list

V1

  • 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

V2

  • 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

Week 2 tasks:

  • 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.

Week 3 tasks:

Task 1: Interact with the Book Library contract running on the local node

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

Task 2: Interact with the Library contract on Goerli

  • Create a copy of your script and perform the same interactions but on Goerli testnet.

About

Lime Academy Task 1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published