mirror of
https://github.com/Instadapp/dsa-governance.git
synced 2024-07-29 22:27:52 +00:00
fix
This commit is contained in:
parent
6e06fa27d2
commit
6e1a529849
|
@ -25,12 +25,9 @@ contract InstaTimelock {
|
||||||
mapping (bytes32 => bool) public queuedTransactions;
|
mapping (bytes32 => bool) public queuedTransactions;
|
||||||
|
|
||||||
|
|
||||||
constructor(address admin_, uint delay_, address guardian_) {
|
constructor(address admin_, address guardian_) {
|
||||||
require(delay_ >= MINIMUM_DELAY, "Timelock::constructor: Delay must exceed minimum delay.");
|
|
||||||
require(delay_ <= MAXIMUM_DELAY, "Timelock::constructor: Delay must not exceed maximum delay.");
|
|
||||||
|
|
||||||
admin = admin_;
|
admin = admin_;
|
||||||
delay = delay_;
|
delay = 0; // delay set to "0"
|
||||||
guardian = guardian_;
|
guardian = guardian_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +66,7 @@ contract InstaTimelock {
|
||||||
|
|
||||||
function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) {
|
function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) {
|
||||||
require(msg.sender == admin, "Timelock::queueTransaction: Call must come from admin.");
|
require(msg.sender == admin, "Timelock::queueTransaction: Call must come from admin.");
|
||||||
require(eta >= getBlockTimestamp().add(delay), "Timelock::queueTransaction: Estimated execution block must satisfy delay.");
|
require(delay == 0 || eta >= getBlockTimestamp().add(delay), "Timelock::queueTransaction: Estimated execution block must satisfy delay.");
|
||||||
|
|
||||||
bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));
|
bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));
|
||||||
queuedTransactions[txHash] = true;
|
queuedTransactions[txHash] = true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user