You see the "Choose a nickname" page, as shown below.
Look at the Solidity code at the bottom.
We'll only use the first contract, CaptureTheEther.
This contract has only one function, setNickname, which takes a nickname in "bytes32" format.
On the left side, click the "Begin Challenge" button.
A MetaMask box pops up. Click Confirm.
After a few seconds, the left side of the page shows your contract's address, as shown below.
Note: for this challenge, don't use your contract's address. Use the address shown on the right side, outlined in green in the image below.
Right-click the contracts folder and click "New File".
Name the new file nickname.sol
Paste in the code for the first contract on the "Choose a nickname" page, as shown below.
On the left side of the Remix page, click the Compile icon, outlined in red in the image above.
Click the "Compile nickname.sol" button.
Then click the Deploy icon, outlined in light blue in the image above.
On the "Choose a nickname" page, copy the address on the right side of the page, ending in "4fee".
In the Remix page, in the lower portion of the "DEPLOY & RUN TRANSACTIONS" pane, paste that address into the box next to the "At Address" button, outlined in red in the image below.
Click the "At Address button.
In the field next to the orange setNickname button, enter your name, as outlined in green in the image below.
Click the orange setNickname button.
At the lower right, an error message appears, saying "Error encoding arguments", outlined in green in the image below.
You can convert your name on this page:
https://www.testcoins.io/str-bytes32as shown below:
A Metamask box pops up. Click Confirm.
When the function call succeeds, you'll see a green check mark in the lower right pane of the Remix window, outlined in green in the image below.
A MetaMask box pops up. Click Confirm. You win, and a little dancing figure appears on the lower left, as shown below.
Flag C 602.1 GIF Name (15 pts)In your browser, on the top right, right-click your name, outlined in red in the image above, and click Inspect.
The flag is the filename of this GIF image, covered by a green rectangle in the image below.
Posted 5-20-22 by Sam Bowne