Created
June 1, 2017 14:21
-
-
Save base698/253286fd3026a5d6a8324d3f48cf3344 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.10; | |
contract Stock { | |
mapping (address => shares) stockHolders; | |
uint numShares; | |
function Stock() { | |
numShares = 100; | |
} | |
function payDividend(uint amount) { | |
// get num stock holders | |
// divide amount by num_stock_holders | |
// pay out amount to all stock_holders | |
} | |
function buyStock() { | |
// check total shares | |
// add to mapping the number of shares owner has | |
} | |
function getShares() constant returns (uint) { | |
return stockHolders[msg.sender]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment