Contract purpose

This smart contract keeps a record of movies you want to see. Also, it has a function that, at every call, gives you the title of a movie you have not seen yet.

Exposed methods and variables

manager address of the list owner

list returns details about the movie the owner specified with a particular id

addMovie called by the owner to add a new movie to the list and returns an id for the movie. The next functions will be called with this id.

parameter nametypedetails
_titlestringtitle of the movie
_lengthintegerlength of the movie
_releaseYearintegerthe release year of the movie

seenMovie called by the owner when he want to mark one of the movies as seen

parameter nametypedetails
idintegerthe unique identifier of the movie

getUnseenMovie this function returns the title and length of the oldest unseen movie the owner added to the list. After watching it, he has to mark it as seen in order to get a different movie from this function. If all the movies are seen, it returns an empty string for the title and length 0.

Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract