-
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.
-
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.
-
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. 🙂
-
The assignment asks how we could possibly make
tx.origin
(the EOA who originated the transaction) unequal tomsg.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 wheremsg.sender
andtx.origin
are not equal, and subsequently triggers the 'Winner' event in the target contract. Therefore, the main concept here is thatmsg.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. -
The
destroyFaucet
function, as well as thewithdrawAll
function, should be callable by the contract owner. -
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.
-
Notifications
You must be signed in to change notification settings - Fork 0
Learn blockchain on Alchemy University
jenny07007/alchemy-uni
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Learn blockchain on Alchemy University
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published