Coder Social home page Coder Social logo

simple-bank-exercise's Introduction

Simple Bank Exercise

SimpleBank is a Truffle project that contains a starter contract, migration and Truffle JavaScript test files. In this exercise you are going to implement the SimpleBank.sol contract.

Setting The Stage

We want to create a depository institution on the Ethereum blockchain, and we need your help!
The bank should be able to enroll new users and allow them to make deposits / widthdrawals!

Files

  • contracts/SimpleBank.sol : the partial implementation of a Solidity Contract you will complete.
  • test/simpleBank.test.js : the Truffle test file that describes the behavior of a correct SimpleBank contract.

Requirements

  1. Latest truffle version.
    npm -g uninstall truffle && npm -g install truffle
  2. Install dependencies.
    npm install
  3. Your preferred code editor.
  4. Familiarity with terminals.

Instructions

Follow the comments outlined in SimpleBank.sol to implement its functionality. The test are there to determine correct contract behavior as well as guide you through the implementation.

The general workflow is to use Test Drive Development's red green process:

  1. Run truffle test from a terminal.
  2. Use the failed test output along with the hints in contracts/SimpleBank.sol to make the test pass.

Note: Truffle will default to use a Solidity 0.5.x compiler with this contract as-is. To use the latest 0.8.x compiler, please comment out lines 9-14 in truffle-config.js.

Note on testing

Check out the testing files to see how tests are implemented in JavaScript. We will go over the details of implementing tests later in the curriculum. Of course, if you have questions, do reach out in Discord, or schedule an Office Hour session with one of our mentors.

simple-bank-exercise's People

Contributors

cds-amal avatar cooganb avatar jimlynchcodes avatar shih-yu 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

Watchers

 avatar  avatar  avatar

simple-bank-exercise's Issues

Provide a "finished version" branch for reference

As a beginner following the on-demand developer program, it is very hard to complete this exercise.

One needs to verify code against a "correct finished version" of the smart contract.

Could you please provide a branch/tag with the final code?

Looking forward to hearing from you

Thanks

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.