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 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
1 change: 0 additions & 1 deletion contracts/core/accounts/message.sol
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ library AccountMessages {
address registrarContract;
uint256 nextAccountId;
uint256 maxGeneralCategoryId;
LibAccounts.FeeSetting earlyLockedWithdrawFee;
}

struct StateResponse {
Expand Down
1 change: 0 additions & 1 deletion contracts/core/accounts/storage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ library AccountStorage {
uint32 nextAccountId;
uint256 maxGeneralCategoryId;
bool reentrancyGuardLocked;
LibAccounts.FeeSetting earlyLockedWithdrawFee;
}

struct Endowment {
Expand Down
8 changes: 4 additions & 4 deletions contracts/multisigs/CharityApplications.sol
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ contract CharityApplications is MultiSigGeneric, StorageApplications, ICharityAp
* @notice propose a charity to be opened on Accounts
* @dev propose a charity to be opened on Accounts
* @param _application.Charity application
* @param _meta Meta (URL of Metadata)
* @param _metadata Metadata
*/
function proposeApplication(
AccountMessages.CreateEndowmentRequest memory _application,
string memory _meta
bytes memory _metadata
) public override {
require(proposals[proposalCount].proposer == address(0), "Proposal already exists");
require(
Expand All @@ -135,12 +135,12 @@ contract CharityApplications is MultiSigGeneric, StorageApplications, ICharityAp
proposals[proposalCount] = ApplicationsStorage.ApplicationProposal({
proposer: msg.sender,
application: _application,
meta: _meta,
meta: _metadata,
expiry: expiry,
executed: false
});

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

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 metadata;
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 metadata
) 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