You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current queryMode relies now in 2 conditions, vaultState.isQueryDisabled and EVMCallModeHelpers.isStaticCall() (which checks tx.origin == 0, as proof of static call). The reason for isQueryDisabled is that, on a shady EVM in which tx.origin could in fact be address(0), it can be disabled to avoid rugs.
Query mode is not even testable in foundry, since mocking the tx.origin is tricky, then it creates the must of having Hardhat tests (which imo, should not be there and save us hrs of compiling + running tests).
The idea I've got is: just one more proxy implementation bro, one more.. Vault -> Extension -> Admin -> ActivateQueryMode
Why? because we don't care about the gas consumption of activating vaultState.isQueryEnabled.
In this way, we can replace ActivateQueryMode contract with anything, for tests for example, we skip the require, for shady EVMs, we add requirement conditions, we allow this contract to be different from implementation to implementation, w/o having to change the core codebase (or even adding logic to it).
The text was updated successfully, but these errors were encountered:
Query mode is not even testable in foundry, since mocking the tx.origin is tricky, then it creates the must of having Hardhat tests (which imo, should not be there and save us hrs of compiling + running tests).
The current queryMode relies now in 2 conditions,
vaultState.isQueryDisabled
andEVMCallModeHelpers.isStaticCall()
(which checkstx.origin == 0
, as proof of static call). The reason forisQueryDisabled
is that, on a shady EVM in whichtx.origin
could in fact beaddress(0)
, it can be disabled to avoid rugs.Query mode is not even testable in foundry, since mocking the
tx.origin
is tricky, then it creates the must of having Hardhat tests (which imo, should not be there and save us hrs of compiling + running tests).The idea I've got is: just one more proxy implementation bro, one more..
Vault -> Extension -> Admin -> ActivateQueryMode
Why? because we don't care about the gas consumption of activating
vaultState.isQueryEnabled
.In this way, we can replace
ActivateQueryMode
contract with anything, for tests for example, we skip the require, for shady EVMs, we add requirement conditions, we allow this contract to be different from implementation to implementation, w/o having to change the core codebase (or even adding logic to it).The text was updated successfully, but these errors were encountered: