# Alchemy week 8 optimism

By [Vilagra](https://paragraph.com/@vilagra) · 2022-11-21

---

**Github Code:**

[https://github.com/Vilagra/alchemy-week8/tree/alchemy-week8/LogRocket/20220615-random](https://github.com/Vilagra/alchemy-week8/tree/alchemy-week8/LogRocket/20220615-random)

**Deployed Contract:**

contract without homework:

[https://optimistic.etherscan.io/address/0xd7b83d2bab47382d4dddf5dc21f6b8eb0d59e4b3](https://optimistic.etherscan.io/address/0xd7b83d2bab47382d4dddf5dc21f6b8eb0d59e4b3)

with homework:

[https://optimistic.etherscan.io/address/0xff5b58c1558370724e78c846bb948cfcea385465](https://optimistic.etherscan.io/address/0xff5b58c1558370724e78c846bb948cfcea385465)

**Wallet Address:** 0xbe065A817a5Dfc49D878BE3f499C95e0e51Aaa57

**High Level Implementation:**

Player B provides hashB in acceptBet function instead his number so player A can’t know his number and can’t cheat because he didn’t see player B number. Then they can reveal their numbers. In revealFirst and revealSecond methods we check if hash provided earlier is ok and check if opposite player already revealed his number, if so we invoke defineWinner method to find a winner.

**Who are you, and what is your software development background?**

I worked as a frontend developer for android OS 3 years. Now crypto enthusiast and little bit investor.

**Why did you want to complete this lesson?**

I do all lesson in a row. So I finished 7 lesson and started 8:)

**When did you complete the project?**

I completed some day in oсtober but pushed on github 21.11.2022

**What technologies did you use?**

Optimism mainnet, Solidity, Etherscan, Metamask, Github, SourceTree, VS Code

**What did you enjoy about the tutorial?**

This lesson was the toughest one for me and I didn't enjoy. I describe some my issue in this section prefer writing versions but for this lesson only video exist. Also I wasted long time with mnemonic(in pervious lessons we used private key), I inserted private key and couldn’t understand why it doesn’t work:) I spent some time to understand task. And I finally I forgot to add .env to gitignore and pushed to github, afte 1 minutes someone stole my ETH. It was only $18 but it was unpleasant:(

**How do you think you can use this technology to build useful applications in the future? What are some specific example applications?**

The main topic was optimism, so you can recreate any Ethereum application on Optimism

**Who would you recommend this project to?**

To newbie Web3 developers as I:)

---

*Originally published on [Vilagra](https://paragraph.com/@vilagra/alchemy-week-8-optimism)*
