GithubHelp home page GithubHelp logo

massun-onibakuchi / sol-challenge Goto Github PK

View Code? Open in Web Editor NEW
63.0 3.0 13.0 164 KB

CTF-like challenges of smart contracts

JavaScript 1.19% Solidity 57.65% TypeScript 41.07% Shell 0.09%
ctf smartcontracts solidity

sol-challenge's Introduction

Sol Challenge

CTF-Like Challenges of smart contracts

Installing

Prerequisites

  • node
  • yarn

Setup

Type on a terminal:

yarn

Compiling

Type:

yarn compile

Running Challenges

  1. Copy this template to ./test/<*Challenge>.test.ts file.
  2. Each <*Challenge.sol> file contains a description of the challenge.
  3. Make isSovled() returns true. Write tests to prove the solution works correctly.

Order of Challenges

  1. GuessTheNumberChallenge.sol
  2. WeirdVaultChallenge.sol
  3. OpenValutChallenge.sol
  4. NftSaleChallenge.sol
  5. BankChallenge.sol
  6. WrappedERC20Challenge.sol
  7. HodlChallenge.sol (state of the mainnet needs to be forked)
  8. GuessTheHashChallenge.sol

Testing

To run a test type:

# run test against local network
yarn test test/<*Challenge>.test.ts

Some of the challenges are required to be run on a forked network. You need access to an archive node like the free ones from Alchemy. Create .env file and paste the API key.

Type:

cp .env.example .env

Then set the environment variable.

ALCHEMY_API_KEY=<Your Alchemy api key>

Solutions

Slide - Solutions[en]

Slide - introduction[ja]

sol-challenge's People

Contributors

massun-onibakuchi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.