Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contracts/PaymentSplitters.sol/Owner.TRIFECTA #177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions contracts/PaymentSplitter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
*
* Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
*/

pragma solidity ^0.4.18;

/**
* @dev Forward Ethereum payments to two or more parties.
*
* Allows splitting payments between parties.
*/
contract PaymentSplitter {

struct Part {
address who;
uint shares;
}

uint totalShares;
Part[] public parts;

function PaymentSplitter(address[] addresses, uint[] shares) public {
for(uint i=0; i<addresses.length; i++) {
parts.push(Part(addresses[i], shares[i]));
totalShares += shares[i];
}
}

function feedMe() external {

}

function() public {
for(uint i=0; i<parts.length; i++) {
parts[0].who;
}
}
}