Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
b87dff4c7a
commit
d3d6912590
@ -137,6 +137,15 @@ contract Gatekeeper is IGatekeeper, Weaver, ReentrancyGuard {
|
|||||||
bool validSignature = Verifier.verifyGhost(call, px, rx, s);
|
bool validSignature = Verifier.verifyGhost(call, px, rx, s);
|
||||||
if (!validSignature) revert BadSignature();
|
if (!validSignature) revert BadSignature();
|
||||||
|
|
||||||
|
bytes4 selector = bytes4(call[:4]);
|
||||||
|
if (
|
||||||
|
selector != this.recall.selector &&
|
||||||
|
selector != this.rotate.selector &&
|
||||||
|
selector != this.govern.selector
|
||||||
|
) {
|
||||||
|
revert InvalidSelector();
|
||||||
|
}
|
||||||
|
|
||||||
(bool success,) = address(this).call(call);
|
(bool success,) = address(this).call(call);
|
||||||
if (!success) revert ExecutionReverted();
|
if (!success) revert ExecutionReverted();
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ interface IGatekeeper {
|
|||||||
error BadSignature();
|
error BadSignature();
|
||||||
error NotGatekeeper();
|
error NotGatekeeper();
|
||||||
error AlreadyExecuted();
|
error AlreadyExecuted();
|
||||||
|
error InvalidSelector();
|
||||||
error InvalidCalldata();
|
error InvalidCalldata();
|
||||||
error InvalidPublicKey();
|
error InvalidPublicKey();
|
||||||
error NonExistentAmount();
|
error NonExistentAmount();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user