GithubHelp home page GithubHelp logo

punnkam / solidity_takehome Goto Github PK

View Code? Open in Web Editor NEW

This project forked from delvtech/solidity_takehome

0.0 0.0 0.0 154 KB

License: Apache License 2.0

JavaScript 1.95% TypeScript 79.35% Solidity 18.70%

solidity_takehome's Introduction

Element Takehome Solidity Test

This trial project is designed to test basic and intermediate solidity knowledge. In this folder we have pre-initialized a development and testing environment called hardhat and created an example test. Please fork this repo, download a local copy, and develop a set of solutions to the problems. Please do not make your forked repo or solutions public. We look forward to learning more about your skills!

Tasks

The following tasks test solidity fluency and fluency with the solidity testing. They do not need to be completed in order and it is possible to be a successful candidate without completing all of them, please address them in whatever way you think demonstrates your best work.

Beginner Tasks

The following are designed to be solvable by all candidates.

  1. We have created a basic ERC20 contract (contracts/ERC20.sol) and a partially complete test file for it (tests/ERC20.ts) which currently only tests the transfer functionality. Please add more tests to this file to increase the coverage level. Some examples of functions which may need more testing are transferFrom and approve.
  2. Please create a grant funding contract which allows the account which deployed it to:
    1. Create new grants which transfer a variable amount of ERC20 tokens into the contract and store the amount and recipient with an unlock timestamp.
    2. Allows the funder to remove a grant before it unlocks for collection by the recipient.
    3. Allows the recipient to claim a grant after the unlock timestamp and transfer the funds out of the contract.
  3. Please create a testing file and test the smart contract you wrote.
    • Hint - we have added a convenience method increaseBlockTimestamp which fast forwards the block timestamp for the locally deployed test ethereum network.

Intermediate tasks

The following are intermediate tasks and are optional for candidates for Junior roles.

  1. Please review ‘contracts/Market.sol’ for security vulnerabilities and write a small amount of text explaining any you find.
  2. Please design a new feature or set of features for the grant contract which extend on the functionality of the contract. This is intentionally open ended, creative and ux improving features will be highly appreciated.

Build and Testing

Please note that we want to see your coding ability, and not your ability to solve weird deployment installation or environment configuration problems for this reason if you encounter any problems unrelated to your code please reach out to your point of contact for support.

1. Getting Started (Prerequisites)

2. Setup

git clone https://github.com/element-fi/solidity_takehome.git
cd solidity_takehome
npm install

3. Build

npm run build

4. Test

npm run test

solidity_takehome's People

Contributors

aleph-v avatar akshaynexus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.