Skip to content

Commit

Permalink
fix: VPB-06 TimelockV8 checks
Browse files Browse the repository at this point in the history
  • Loading branch information
GitGuru7 committed Feb 14, 2024
1 parent 4f3940a commit d4108b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/Governance/TimelockV8.sol
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ contract TimelockV8 {
);

bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));
require(!queuedTransactions[txHash], "Timelock::queueTransaction: transaction already queued.");
queuedTransactions[txHash] = true;

emit QueueTransaction(txHash, target, value, signature, data, eta);
Expand All @@ -196,6 +197,7 @@ contract TimelockV8 {
require(msg.sender == admin, "Timelock::cancelTransaction: Call must come from admin.");

bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));
require(queuedTransactions[txHash], "Timelock::queueTransaction: transaction is not queued yet.");
delete (queuedTransactions[txHash]);

emit CancelTransaction(txHash, target, value, signature, data, eta);
Expand Down

0 comments on commit d4108b4

Please sign in to comment.