Oasis Riddle

Developers at Oasis Network prepared a short riddle that unlocks the path to a ROSE treasure. They hid it on the  blockchain and your job now is to write a script that will connect to the smart contract deployed on Sapphire and obtain a secret question. If you manage to answer it correctly, you'll be able to collect your ROSE treasure!

I like blockchains, but I'm not a skilled programmer and I haven't really written any smart contracts yet

Don't worry! If you have some programming basics in Javascript, Python, C, or other programming languages, you have all the basics covered. You'll quickly learn everything else on the go.

Generally, blockchains are not easy to understand and developing dApps has some limitations compared to desktop or web apps. That is why one needs an open mind while also having understanding of the algorithms, data structures, writing efficient code, bug hunting skills, thorough understanding of the programs from a cryptographic and security point of view, etc.

OK. What do I need to do?

1

First, join our #dev-sapphire channel on the official Oasis Discord server so if you get stuck, you can ask for help. Even if you don't need help, stop by and say hi, everybody will be happy to meet you.

2

If this is your first time developing a dApp, you can watch a short video on Ethereum smart contracts.

3

When you're ready to move further, check out our quickstart guide to Sapphire confidential smart contracts.

4

After you're done with both tutorials, it's time to solve the riddle! You can find it on Oasis Sapphire Testnet at the address 0x532Bd3Ec7Df3d8587FC8B4218F18f387Bf86917C. Use the following contract ABI:

function getQuestion(string memory coupon) external view returns (string memory)

function submitAnswer(string memory coupon, string memory answer) external

function claimReward(string memory coupon) external view returns (string memory)

5

With the help of the newly obtained skills and tools, your task is to write a script that communicates with the riddle's smart contract. First, use a confidential call getQuestion() to get the secret questions tied to your unique ID. Then, create a secret answer and send it back with a confidential transaciton via submitAnswer(). If the answer is correct, you'll be able to send a confidential claimReward() call in the next block to obtain the private key to your ROSE treasure on Oasis Sapphire Mainnet.

6

Congratulations, you've unlocked your ROSE treasure! You can now use your ROSE to create new dApps on Oasis and be among the first to utilize confidential smart contracts. Or you can try to cash them in for a beer with your friends!

Latest Blogposts

Get Involved

How we use cookies?

At Oasis Foundation we believe in your privacy, so you can choose to browse our site without any tracking or by clicking “Accept”, you help us to improve our site and help us grow our ecosystem. View our Privacy Policy for more information.