Skip to content

jenny07007/alchemy-uni

Repository files navigation

  • week 1 project

    The solution involves creating a login page to obtain the sender's private key. Once logged in, a random private key is generated and associated with the sender. The client signs the transaction with the private key, amount, and recipient address, which is validated on the server by recovering the public key from the signature. Input validations and component styling are also implemented.

  • week 2 project

    The solutions involves generating the Merkle root that represents the whole nice list, when the client tries to send one name to the server, the server then takes the client's proof to verify the name is actually in the nice list.

  • week 3 project

    Here's a demo of the block explorer. I haven't implemented the API on the server-side, and since I don't want to expose my Alchemy API key, there's no link to share. 🙂

  • week 4 assignment

    The assignment asks how we could possibly make tx.origin (the EOA who originated the transaction) unequal to msg.sender in the target contract. As it turns out, we can create a proxy contract to trigger the attempt function in the target contract. This meets the condition where msg.sender and tx.origin are not equal, and subsequently triggers the 'Winner' event in the target contract. Therefore, the main concept here is that msg.sender can be either an EOA or a contract, depending on who or what initiated the function call. On the other hand, tx.origin is always the address that initiated the transaction.

    proxy contrast

  • week 4 unit test challenge

    The destroyFaucet function, as well as the withdrawAll function, should be callable by the contract owner.

  • week 5 group activity

    The challenge involved passing five tests from the corresponding contracts without altering the contract code. Each test had to successfully call the win function. The fifth test proved more difficult because, in Ethereum, addresses are typically randomly generated. As a result, the likelihood of generating an address smaller than the specified threshold is quite low. To overcome this, I used brute force to create new accounts until I found one that met the criteria.