PerpetualProtectionSuiteBase
Inherits: ForkUtils, IPerpetualProtectionSuite
Title: PerpetualProtectionSuiteBase
Author: Phylax Systems
Shared default implementations for perpetual protection suites.
Functions
enabledCheckKinds
Default suites populate no optional check families.
Override this when implementing any get*Checks(...) family so the assertion can
avoid calling base methods that only allocate empty arrays.
function enabledCheckKinds()
external
view
virtual
override
returns (IPerpetualProtectionSuite.EnabledCheckKinds memory enabled);
getExecutionPriceChecks
Default execution-price implementation for suites with no shared execution check.
function getExecutionPriceChecks(
TriggeredCall calldata triggered,
OperationContext calldata operation,
PhEvm.ForkId calldata beforeFork,
PhEvm.ForkId calldata afterFork
) external view virtual override returns (ExecutionPriceCheck[] memory checks);
getLiquidityCoverageChecks
Default liquidity-coverage implementation for suites with no shared coverage check.
function getLiquidityCoverageChecks(
TriggeredCall calldata triggered,
OperationContext calldata operation,
PhEvm.ForkId calldata beforeFork,
PhEvm.ForkId calldata afterFork
) external view virtual override returns (LiquidityCoverageCheck[] memory checks);
getFundingDeltaChecks
Default funding-delta implementation for suites with no shared funding check.
function getFundingDeltaChecks(
TriggeredCall calldata triggered,
OperationContext calldata operation,
PhEvm.ForkId calldata beforeFork,
PhEvm.ForkId calldata afterFork
) external view virtual override returns (FundingDeltaCheck[] memory checks);
getLiquidationChecks
Default liquidation implementation for suites with no shared liquidation checks.
function getLiquidationChecks(
TriggeredCall calldata triggered,
OperationContext calldata operation,
PhEvm.ForkId calldata beforeFork,
PhEvm.ForkId calldata afterFork
) external view virtual override returns (LiquidationCheck[] memory checks);
getOracleAnchorChecks
Default oracle-anchor implementation for suites with no shared oracle check.
function getOracleAnchorChecks(
TriggeredCall calldata triggered,
OperationContext calldata operation,
PhEvm.ForkId calldata beforeFork,
PhEvm.ForkId calldata afterFork
) external view virtual override returns (OracleAnchorCheck[] memory checks);
getAccountingConservationChecks
Default accounting-conservation implementation for suites with no shared accounting check.
function getAccountingConservationChecks(
TriggeredCall calldata triggered,
OperationContext calldata operation,
PhEvm.ForkId calldata beforeFork,
PhEvm.ForkId calldata afterFork
) external view virtual override returns (AccountingConservationCheck[] memory checks);
getPostMutationSnapshot
Default post-mutation snapshot implementation for suites with account-only risk reads.
function getPostMutationSnapshot(
TriggeredCall calldata triggered,
OperationContext calldata operation,
PhEvm.ForkId calldata fork
) external view virtual override returns (AccountSnapshot memory snapshot);
getAccountSnapshot
Composes a full account snapshot from the step-oriented suite functions.
function getAccountSnapshot(address account, PhEvm.ForkId calldata fork)
external
view
virtual
override
returns (AccountSnapshot memory snapshot);
_viewFailureMessage
Returns the suite-specific revert string for failed fork-time static calls.
function _viewFailureMessage() internal pure virtual override returns (string memory);