-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create contracts to test onchain calculations #11678
Conversation
I see that you haven't updated any CHANGELOG files. Would it make sense to do so? |
I see that you haven't updated any README files. Would it make sense to do so? |
Go solidity wrappers are out-of-date, regenerate them via the |
Go solidity wrappers are out-of-date, regenerate them via the |
Go solidity wrappers are out-of-date, regenerate them via the |
Go solidity wrappers are out-of-date, regenerate them via the |
Go solidity wrappers are out-of-date, regenerate them via the |
Go solidity wrappers are out-of-date, regenerate them via the |
Go solidity wrappers are out-of-date, regenerate them via the |
Go solidity wrappers are out-of-date, regenerate them via the |
Go solidity wrappers are out-of-date, regenerate them via the |
Go solidity wrappers are out-of-date, regenerate them via the |
Go solidity wrappers are out-of-date, regenerate them via the |
|
||
/** | ||
* @notice modifier that allows it to be simulated via eth_call by checking | ||
* that the sender is the zero address. | ||
*/ | ||
modifier cannotExecuteExcept(address allowedOrigin) { | ||
_preventExecutionExcept(allowedOrigin); | ||
_; | ||
} | ||
|
||
/** | ||
* @notice method that allows it to be simulated via eth_call by checking that | ||
* the sender is the zero address. | ||
*/ | ||
function _preventExecutionExcept(address allowedOrigin) internal view { | ||
// solhint-disable-next-line avoid-tx-origin | ||
if (tx.origin != allowedOrigin) { | ||
revert OnlySimulatedBackend(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be ok if we removed this contract from our inheritance chain, and defined our own cannotExecute
modifier in AutomationBase
- the code would probably be cleaner that way.
import {IScrollL1GasPriceOracle} from "./../../vendor/@scroll-tech/contracts/src/L2/predeploys/IScrollL1GasPriceOracle.sol"; | ||
import {ArbGasInfo} from "../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol"; | ||
|
||
contract ChainCostTester { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick - test contracts don't need to go in the dev/
folder
Go solidity wrappers are out-of-date, regenerate them via the |
Go solidity wrappers are out-of-date, regenerate them via the |
1 similar comment
Go solidity wrappers are out-of-date, regenerate them via the |
SonarQube Quality Gate |
No description provided.