GithubHelp home page GithubHelp logo

mortgage's Issues

collectMoney does not collectMoney

Mortgage/Code

Line 120 in 0679664

collectMoney(withdrawable[lender], withdrawable[borrower]);

collectMoney seems like a mis-named event. Also - style says capitalize the first letter of the Event as well - else this looks like a function call.

Unclear Magic Number

Mortgage/Code

Line 71 in 0679664

remainingPrincipal = _principal * 1000;

Why is 1000 used here? It seems like you might be trying to turn things into Finney - but this would require a / rather than a *. Comments would be helpful - and declaring and constants as such, with helpful names!

Missing Tests/Truffle Structure

Any/all good contract will have some tests to go along with it. This contract would go well with a Truffle directory (and some tests!).

This would help us catch any rounding issues (which I have yet to look for [and I'll refrain for now]) - as well as any other typos that might exist.

Looking forward to checking a comprehensive test suite out :)

Magic Numbers Unclear

Unclear constants used throughout the contract. Hard to follow. Should define them as constant uints to help reader/auditer follow along (and to stop yourself from forgetting to update in multiple places!).

Closing other issue about this as this is a superset of that.

Here are some examples:

Mortgage/Code

Line 79 in 0679664

uncollectedPayments += msg.value * 1000;

https://github.com/aarondr77/Mortgage/blob/master/Code#L71

https://github.com/aarondr77/Mortgage/blob/master/Code#L84

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.