(Shown on cover: Gavin Wood & Vitalik Buterin)
In this assignment, you will put your Solidity skills to the test. Feel free to reference the numerous contracts we’ve been through in lectures.
As with all assignments, don’t hesitate to Google, but do not copy verbatim or directly from your peers. Your code must compile and run to receive any credit.
Submission guidelines: Submit a single Solidity source file: HW3.sol
GitHub Classroom invite for HW3: https://classroom.github.com/a/g7l-jKhm
Deadline: Oct 6, 2022 at 16:00
HW3doMathint256 as parametersgetMaxuint256hashStringArraystringbytes32 that represent the hashes of the input strings
keccak256(abi.encode(str)) returns a bytes32 hash of string strbytes32 and of the same length as the input string arrayYou will build a contact book where anyone can hold a list of addresses as their contacts. There is no need to give each contact a nickname, as this will make things a bit more complicated.
In computer science, an interface often refers to a set of functions that you intend to expose to the outside world for people to interact with. In Solidity, an interface refers to a set of external functions. Only external functions can be a part of an interface.
The great thing about interfaces is that as a user, you don’t need to know the inner workings of the program. You only need to concern yourself with correctly calling the exposed functions. Similarly, in this assignment, we don’t care how the details are implemented (e.g. what types of variables to use, how they are named, etc.) — that is completely up to you. However, when we call a function it is expected to behave in a certain way, which is described to you in comments above each function.