Skip to content

edgeandnode/contracts-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

Smart Contract Challenge

Challenge 1

Setup a project and create a contract

DAIPool provides a service where people can deposit DAI and they will receive weekly rewards. Users must be able to take out their deposits along with the accrued rewards at any time. Rewards are deposited into the pool by the DAIPool team each week (i.e. it is a trusted setup).

Design and code a contract for DAIPool, take all the assumptions you need to move forward.

You can use any development tools you prefer: Hardhat, Truffle, Brownie.

You can find testnet versions of DAI at the following addresses:

  • Goerli at 0xF2D1F94310823FE26cFa9c9B6fD152834b8E7849
  • Kovan at 0x7d669A64deb8a4A51eEa755bb0E19FD39CE25Ae9
  • Rinkeby at 0xc3dbf84Abb494ce5199D5d4D815b10EC29529ff8
  • Ropsten at 0x2D69aD895797C880abce92437788047BA0Eb7fF6

Deploy your contract

Deploy the contract to any Ethereum testnet of your preference. Keep record of the deployed address.

Interact with the contract

Create a script to query the total amount of tokens held in the contract and the deposited rewards.

You can use any library you prefer: Ethers.js, Web3.js, Web3.py

Challenge 2

Review a contract from the Graph Protocol

The Graph Protocol is comprised of a number of core contracts that coordinates multiple stakeholders, providing them economic incentives for their participation.

In this link https://github.com/graphprotocol/contracts you will find the full set of core Graph Protocol contracts.

For the purpose of the interview we will discuss the following contract: https://github.com/graphprotocol/contracts/blob/master/contracts/curation/Curation.sol

Take some time to review the code, understand what the contract is doing and be prepared to discuss it during the interview.

Setup and organization

You can work on a private GitHub repo in and then share it with [email protected].

About

Smart Contracts Interview Challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published