Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
v 0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
clbrge committed Aug 28, 2018
1 parent b2c5fca commit 07cfbaa
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion contracts/RougeFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import "./RougeRegistry.sol";

contract RougeFactory is RougeRegistry {

string public version = '0.16.0';
string public version = '0.17.0';

// The Rouge Token contract address
RGETokenInterface public rge;
Expand Down
38 changes: 20 additions & 18 deletions contracts/SimpleRougeCampaign.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ library RougeCampaign {

contract SimpleRougeCampaign {

string public version = '0.16.0';
string public version = '0.17.0';

// The Rouge Token contract address
RGETokenInterface public rge;
Expand All @@ -55,16 +55,20 @@ contract SimpleRougeCampaign {

event AttestorAddition(address indexed attestor, Authorization auth);

function addAttestor(address _attestor, Authorization _auth) isAttestor(Authorization.Role) public {
isAuthorized[_attestor][uint(_auth)] = true;
emit AttestorAddition(_attestor, _auth);
function addAttestor(address _attestor, Authorization[] _auths) isAttestor(Authorization.Role) public {
for (uint i = 0; i < _auths.length; i++) {
isAuthorized[_attestor][uint(_auths[i])] = true;
emit AttestorAddition(_attestor, _auths[i]);
}
}

event AttestorRemoval(address indexed attestor, Authorization auth);

function removeAttestor(address _attestor, Authorization _auth) isAttestor(Authorization.Role) public {
isAuthorized[_attestor][uint(_auth)] = false;
emit AttestorRemoval(_attestor, _auth);
function removeAttestor(address _attestor, Authorization[] _auths) isAttestor(Authorization.Role) public {
for (uint i = 0; i < _auths.length; i++) {
isAuthorized[_attestor][uint(_auths[i])] = false;
emit AttestorRemoval(_attestor, _auths[i]);
}
}

uint32 public issuance;
Expand Down Expand Up @@ -183,12 +187,10 @@ contract SimpleRougeCampaign {
emit Issuance(_scheme, _name, _campaignExpiration);
}

// Authorization is handled bu issue()
// Authorization is handled by issue()
function issueWithAttestor(bytes4 _scheme, string _name, uint _campaignExpiration, address _attestor, Authorization[] _auths) public {
issue(_scheme, _name, _campaignExpiration);
for (uint i = 0; i < _auths.length; i++) {
addAttestor(_attestor, _auths[i]);
}
addAttestor(_attestor, _auths);
}

function getInfo() public view returns (bytes) {
Expand Down Expand Up @@ -245,16 +247,16 @@ contract SimpleRougeCampaign {
return acquisition(_bearer);
}

/* mapping (address => bool) public transferRegister;*/
mapping (address => bool) public transferRegister;

/* low level transfer of a note between bearers
/* low level transfer of a note between bearers */
function transfer(address _from, address _to) CampaignOpen private {
require(_to != issuer); /* RULE issuer and bearer need to be diffrent
require(_to != issuer); /* RULE issuer and bearer need to be different */
require(hasNote(_from));
acquisitionRegister[_from] = false;
transferRegister[_from] = true; /* RULE transfer is not reversible
transferRegister[_from] = true; /* RULE transfer is not reversible */
acquisitionRegister[_to] = true;
} */
}

mapping (address => bool) public redemptionRegister;

Expand Down Expand Up @@ -308,9 +310,9 @@ contract SimpleRougeCampaign {
return redemption(_bearer);
}

/*function getWorkflow(address _bearer) public view returns (bytes) {
function getWorkflow(address _bearer) public view returns (bytes) {
return abi.encodePacked(hasNote(_bearer), hasRedeemed(_bearer));
} */
}

function kill() isAttestor(Authorization.Kill) public {

Expand Down
6 changes: 6 additions & 0 deletions truffle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
module.exports = {
solc: {
optimizer: {
enabled: true,
runs: 2000
}
},
networks: {
// local: {
// host: "localhost",
Expand Down

0 comments on commit 07cfbaa

Please sign in to comment.