Rename contributor to recipient

And remove addedBy entry.
This commit is contained in:
2020-12-01 10:23:49 +01:00
parent 7dba0e4501
commit eadca6904a
2 changed files with 9 additions and 12 deletions

View File

@@ -8,8 +8,7 @@ contract Reimbursement is AragonApp {
bytes32 public constant VETO_REIMBURSEMENT_ROLE = keccak256("VETO_REIMBURSEMENT_ROLE");
struct ReimbursementData {
address recordedBy;
uint32 contributorId;
uint32 recipientId;
uint256 amount;
address token;
bytes32 hashDigest;
@@ -44,13 +43,12 @@ contract Reimbursement is AragonApp {
}
}
function get(uint32 reimbursementId) public view returns (uint32 id, address recordedBy, uint32 contributorId, uint256 amount, address token, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, uint256 confirmedAtBlock, bool exists, bool vetoed) {
function get(uint32 reimbursementId) public view returns (uint32 id, uint32 recipientId, uint256 amount, address token, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, uint256 confirmedAtBlock, bool exists, bool vetoed) {
id = reimbursementId;
ReimbursementData storage r = reimbursements[id];
return (
id,
r.recordedBy,
r.contributorId,
r.recipientId,
r.amount,
r.token,
r.hashDigest,
@@ -62,14 +60,13 @@ contract Reimbursement is AragonApp {
);
}
function add(uint256 amount, address token, uint32 contributorId, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize) public isInitialized auth(ADD_REIMBURSEMENT_ROLE) {
function add(uint256 amount, address token, uint32 recipientId, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize) public isInitialized auth(ADD_REIMBURSEMENT_ROLE) {
uint32 reimbursementId = reimbursementsCount + 1;
ReimbursementData storage r = reimbursements[reimbursementId];
r.recordedBy = msg.sender;
r.exists = true;
r.amount = amount;
r.token = token;
r.contributorId = contributorId;
r.recipientId = recipientId;
r.hashDigest = hashDigest;
r.hashFunction = hashFunction;
r.hashSize = hashSize;