Skip to content

Commit

Permalink
test de nouvelles regles - issue #15
Browse files Browse the repository at this point in the history
  • Loading branch information
SamR1 committed May 10, 2017
1 parent 963030e commit 218be7f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions smartcontracts/daisee.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ contract Daisee {

// variables
//// tarif de l'énergie en DaiseeCoin
uint private rate;
uint public rate;
bool private transactionOK;

//// utilisateurs
Expand Down Expand Up @@ -44,20 +44,20 @@ contract Daisee {
}


function nbSellers() returns (uint) {
function nbSellers() public constant returns (uint) {
return sellerIndex.length;
}


function isSeller(address sellerAddress) returns(bool isSeller) {
function isSeller(address sellerAddress) public constant returns(bool isSeller) {
if(sellerIndex.length == 0) return false;
return (sellerIndex[sellersList[sellerAddress].index] == sellerAddress);
}


function addSeller(address sellerAddress) private returns (uint nbSellers) {
if(!isSeller(sellerAddress)) {
sellersList[sellerAddress].index = sellerIndex.push(sellerAddress)-1;
sellersList[sellerAddress].index = sellerIndex.push(sellerAddress)-1;
}
}

Expand Down

0 comments on commit 218be7f

Please sign in to comment.