Git Product home page Git Product logo

stock-market-solidity's Introduction

Feel Free to Add changes and Point Out Bugs :)

Share-Market-Smart-Contract

Github: aliimran2000

  • The words share and stock have been used interchangeabliy throughout this project

Working

Main Working :

  • users (all members of the network) can purchase stocks from the stock market
  • users can post stocks for sale which other users can buy and/or buy directly from the company.
  • Each seller can set their own Cost for the transaction
  • the currency for the system is StockToken (STT)

Governence

  • the initial governer is the contract owner
  • can add other governers to the list of governers
  • governers control :
    1. Company Approval
    2. Add Other Governers to the list of governers

Company

A company can be created by any user

process :

    • user request a company creation in which they are required to enter
    • Name
    • num of stocks
    • stock price
  1. a governer then approves the company request , before that the company is not elligable to sell its stocks

Stock Token

  • Simple ERC20 Token with top up facility
  • initial supply is provided to the contract address

Contracts

Share Market

146e705d22e2e3a89fcd524e82e48e75.png

  • 793a1a06 => getNewSaleID()
  • 07498ab5 => requestRegisterMyCompany(string,uint256,uint256)
  • 3cf079f0 => approveCompany(address)
  • 408bf4c3 => getAllCompanies()
  • 56ea04a3 => isCompanyRegistered(address)
  • 62f0dc3f => isCompanyApproved(address)
  • 3d3325e0 => getStockPrice(address)
  • 97f24f9c => buyStockFromCompany(address,uint256)
  • 5ca779e5 => postStocksforSale(address,uint256,uint256)
  • a6dcd15b => buyPostedStock(uint256)

Stock Token

19074200c871d91a2288286500f08193.png

0c922ff5 => TopUP()


CompaniesContract

b83efb02eca330fae096663702325871.png

  • 0558d3e9 => getCompanyDetails(address)
  • 408bf4c3 => getAllCompanies()
  • 673448dd => isApproved(address)
  • c3c5a547 => isRegistered(address)
  • bf9c2a4c => _requestRegisterMyCompany(address,string,uint256,uint256)
  • a5bdfed9 => _approveCompany(address)
  • 3d3325e0 => getStockPrice(address)
  • aff9afcb => reduceStock(address,uint256)

Governable

4e36e33a8324459b15e4ce2e4e375c62.png

  • 3fbbc7e9 => getGoverners()
  • a5068c98 => addGoverner(address,string)
  • 31ecd8ee => isGoverner(address)

Interaction

MyContract.png

stock-market-solidity's People

Contributors

aliimran2000 avatar

Stargazers

 avatar  avatar

Watchers

 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.