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);
|
||||
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);
|
||||
if (!success) revert ExecutionReverted();
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ interface IGatekeeper {
|
||||
error BadSignature();
|
||||
error NotGatekeeper();
|
||||
error AlreadyExecuted();
|
||||
error InvalidSelector();
|
||||
error InvalidCalldata();
|
||||
error InvalidPublicKey();
|
||||
error NonExistentAmount();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user