Skip to content

Remove sub() from gas() in SemaphoreVerifier.sol #871

Closed
@jimmychu0807

Description

@jimmychu0807

There are lines in SemaphoreVerifier.sol that make gas() calls. GAS opcode is restricted in validateUserOp (along with some other OPCODES). GAS is only allowed if immediately followed by CALL (and similar) opcodes. Semaphore does staticcall(sub(gas(), ...) and there is a SUB in between.

So we need some other way to take the gas cost in consideration.

Metadata

Metadata

Assignees

Labels

refactoring ♻️A code change that neither fixes a bug nor adds a feature

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions