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

Multisig TXs & Application Proposals: Metadata added to event emits #228

Merged
merged 2 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions contracts/multisigs/CharityApplications.sol
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ contract CharityApplications is MultiSigGeneric, StorageApplications, ICharityAp
*/
function proposeApplication(
AccountMessages.CreateEndowmentRequest memory _application,
string memory _meta
bytes memory _meta
) public override {
require(proposals[proposalCount].proposer == address(0), "Proposal already exists");
require(
Expand Down Expand Up @@ -140,7 +140,7 @@ contract CharityApplications is MultiSigGeneric, StorageApplications, ICharityAp
executed: false
});

emit ApplicationProposed(proposalCount, msg.sender, _application.name, expiry);
emit ApplicationProposed(proposalCount, msg.sender, _application.name, expiry, _meta);

if (isOwner[msg.sender]) {
confirmProposal(proposalCount);
Expand Down
2 changes: 1 addition & 1 deletion contracts/multisigs/CharityApplicationsStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ library ApplicationsStorage {
struct ApplicationProposal {
address proposer;
AccountMessages.CreateEndowmentRequest application;
string meta;
bytes meta;
SovereignAndrey marked this conversation as resolved.
Show resolved Hide resolved
uint256 expiry;
bool executed;
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/multisigs/MultiSigGeneric.sol
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,6 @@ contract MultiSigGeneric is
metadata: metadata
});
transactionCount += 1;
emit TransactionSubmitted(address(this), msg.sender, transactionId);
emit TransactionSubmitted(address(this), msg.sender, transactionId, metadata);
}
}
5 changes: 3 additions & 2 deletions contracts/multisigs/interfaces/ICharityApplications.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ abstract contract ICharityApplications {
uint256 proposalId,
address proposer,
string charityName,
uint256 expiry
uint256 expiry,
bytes metadata
);
event ApplicationExecuted(uint256 proposalId);
event ApplicationConfirmed(uint256 proposalId, address owner);
Expand Down Expand Up @@ -51,7 +52,7 @@ abstract contract ICharityApplications {

function proposeApplication(
AccountMessages.CreateEndowmentRequest memory application,
string memory meta
bytes memory meta
) public virtual;

function confirmProposal(uint256 proposalId) public virtual;
Expand Down
7 changes: 6 additions & 1 deletion contracts/multisigs/interfaces/IMultiSigGeneric.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ abstract contract IMultiSigGeneric is IERC165 {
event ApprovalsRequiredChanged(address msAddress, uint256 approvalsRequired);
event RequireExecutionChanged(address msAddress, bool requireExecution);
event ExpiryChanged(address msAddress, uint256 transactionExpiry);
event TransactionSubmitted(address msAddress, address sender, uint256 transactionId);
event TransactionSubmitted(
address msAddress,
address sender,
uint256 transactionId,
bytes metadata
);
event TransactionConfirmed(address msAddress, address sender, uint256 transactionId);
event TransactionConfirmationRevoked(address msAddress, address sender, uint256 transactionId);
event TransactionExecuted(address msAddress, uint256 transactionId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ contract EndowmentMultiSig is MultiSigGeneric {
IEndowmentMultiSigEmitter(EMITTER_ADDRESS).transactionSubmittedEndowment(
ENDOWMENT_ID,
msg.sender,
transactionId
transactionId,
metadata
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ contract EndowmentMultiSigEmitter is IEndowmentMultiSigEmitter, Initializable {
bool requireExecution,
uint256 transactionExpiry
);
event TransactionSubmitted(uint256 endowmentId, address owner, uint256 transactionId);
event TransactionSubmitted(
uint256 endowmentId,
address owner,
uint256 transactionId,
bytes metadata
);
event TransactionConfirmed(uint256 endowmentId, address owner, uint256 transactionId);
event TransactionConfirmationRevoked(uint256 endowmentId, address owner, uint256 transactionId);
event TransactionConfirmationOfFormerOwnerRevoked(
Expand Down Expand Up @@ -93,9 +98,10 @@ contract EndowmentMultiSigEmitter is IEndowmentMultiSigEmitter, Initializable {
function transactionSubmittedEndowment(
uint256 endowmentId,
address owner,
uint256 transactionId
uint256 transactionId,
bytes memory metadata
) public isEmitter {
emit TransactionSubmitted(endowmentId, owner, transactionId);
emit TransactionSubmitted(endowmentId, owner, transactionId, metadata);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ interface IEndowmentMultiSigEmitter {
function transactionSubmittedEndowment(
uint256 endowmentId,
address owner,
uint256 transactionId
uint256 transactionId,
bytes memory metadata
) external;

function transactionExecutedEndowment(uint256 endowmentId, uint256 transactionId) external;
Expand Down
Loading