Skip to content

Commit 9a7d82d

Browse files
committed
Merge branch 'main' into dev
2 parents e6577fa + 0e1e673 commit 9a7d82d

File tree

7 files changed

+205
-0
lines changed

7 files changed

+205
-0
lines changed

.github/workflows/test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
push:
77
branches: [main, master, staging, dev]
88

9+
permissions: {}
10+
911
env:
1012
FOUNDRY_PROFILE: ${{ github.event_name == 'push' && 'ci' || 'pr' }}
1113

@@ -20,6 +22,7 @@ jobs:
2022
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
2123
with:
2224
submodules: recursive
25+
persist-credentials: false
2326

2427
- name: Install Foundry
2528
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1

.github/workflows/trufflehog.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
2525
with:
2626
fetch-depth: 0
27+
persist-credentials: false
2728

2829
- name: TruffleHog OSS
2930
id: trufflehog

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Fully backwards compatible with Liquidity Launcher v1.0.0 deployments. Contains
3030
| Unichain | 0xCCccCcCAE7503Cac057829BF2811De42E16e0bD5 | 8508f332c3daf330b189290b335fd9da4e95f3f0 | v1.1.0 |
3131
| Base | 0xCCccCcCAE7503Cac057829BF2811De42E16e0bD5 | 8508f332c3daf330b189290b335fd9da4e95f3f0 | v1.1.0 |
3232
| Sepolia | 0xCCccCcCAE7503Cac057829BF2811De42E16e0bD5 | 8508f332c3daf330b189290b335fd9da4e95f3f0 | v1.1.0 |
33+
| Unichain Sepolia | 0xCCccCcCAE7503Cac057829BF2811De42E16e0bD5 | 8508f332c3daf330b189290b335fd9da4e95f3f0 | v1.1.0 |
3334

3435
## v1.0.0
3536

CIPs/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CCA Improvement Proposals (CIPs)
2+
3+
The goal of the CIP project is to standardize and provide high-quality documentation for teams building on the Continuous Clearing Auction (CCA) protocol. Standards around LBPStrategies and periphery contracts are included.
4+
5+
**All CIPs are optional.** CIPs are and will always remain optional standards for teams building on CCA.

CIPs/cip-1.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: Validation hook interface standard
3+
description: An interface standard for validation hooks used in the Continuous Clearing Auction (CCA) protocol.
4+
author: Eric Zhong (@zhongeric)
5+
discussions-to: https://github.com/Uniswap/continuous-clearing-auction/discussions/319
6+
status: Draft
7+
type: Standards Track
8+
category: CCA
9+
created: 2026-02-04
10+
requires: ERC165
11+
---
12+
13+
## Abstract
14+
15+
Validation hooks are powerful extensions to CCA auctions that allow for custom validation logic to be applied to bids. This standard defines the interface for validation hooks to improve interoperability and composability.
16+
17+
## Motivation
18+
19+
While there is a standard interface for validation hooks, it is underspecfied in terms of the shape of the `hookData` parameter, and does not support ERC165 introspection which makes it difficult for offchain interfaces to trustlessly interact with them.
20+
21+
## Specification
22+
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.
23+
24+
Validation hooks MUST implement the `IValidationHook` interface as defined in [IValidationHook.sol](../src/interfaces/IValidationHook.sol).
25+
26+
```solidity
27+
interface IValidationHook {
28+
/// @notice Validate a bid
29+
/// @dev MUST revert if the bid is invalid
30+
/// @param maxPrice The maximum price the bidder is willing to pay
31+
/// @param amount The amount of the bid
32+
/// @param owner The owner of the bid
33+
/// @param sender The sender of the bid
34+
/// @param hookData Additional data to pass to the hook required for validation
35+
function validate(uint256 maxPrice, uint128 amount, address owner, address sender, bytes calldata hookData) external;
36+
}
37+
```
38+
39+
Implementing contracts MUST revert to prevent a bid from being submitted into the auction.
40+
41+
Hooks MUST also implement the `IERC165` interface as defined in [IERC165.sol](https://github.com/ethereum/ERCs/blob/master/ERCS/erc-165.md).
42+
43+
```solidity
44+
interface IERC165 {
45+
function supportsInterface(bytes4 interfaceId) external view returns (bool);
46+
}
47+
```
48+
49+
For simplicity, hooks MAY inherit the OPTIONAL contract [ValidationHookIntrospection](../src/periphery/validationHooks/ValidationHookIntrospection.sol). This provides out of the box support for callers to query support for the `IERC165` and `IValidationHook` interfaces.
50+
51+
## Rationale
52+
53+
ERC165 is a widely adopted standard for discovering the interfaces implemented by a contract. This standard defines the `IValidationHook` interface for validation hooks, and the `IERC165` interface for introspection.
54+
55+
## Backwards Compatibility
56+
57+
No backward compatibility issues found.
58+
59+
## Reference Implementation
60+
61+
See:
62+
- [IValidationHook.sol](../src/interfaces/IValidationHook.sol)
63+
- [ValidationHookIntrospection.sol](../src/periphery/validationHooks/ValidationHookIntrospection.sol)
64+
65+
## Security Considerations
66+
67+
Inherits the security considerations of the [ERC165](https://github.com/ethereum/ERCs/blob/master/ERCS/erc-165.md) standard.
68+
69+
## Copyright
70+
71+
Copyright and related rights waived via [MIT](../LICENSE.md).

CIPs/example-cip.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: <The EIP title is a few words, not a complete sentence>
3+
description: <Description is one full (short) sentence>
4+
author: <a comma separated list of the author's or authors' name + GitHub username (in parenthesis), or name and email (in angle brackets). Example, FirstName LastName (@GitHubUsername), FirstName LastName <foo@bar.com>, FirstName (@GitHubUsername) and GitHubUsername (@GitHubUsername)>
5+
discussions-to: <URL>
6+
status: Draft
7+
type: <Standards Track, Meta, or Informational>
8+
category: <CCA, LBP, Interface, or Periphery>
9+
created: <date created on, in ISO 8601 (yyyy-mm-dd) format>
10+
requires: <EIP number(s)> # Only required when you reference an EIP in the `Specification` section. Otherwise, remove this field.
11+
---
12+
13+
<!--
14+
READ EIP-1 (https://eips.ethereum.org/EIPS/eip-1) BEFORE USING THIS TEMPLATE!
15+
16+
This is the suggested template for new EIPs. After you have filled in the requisite fields, please delete these comments.
17+
18+
Note that an EIP number will be assigned by an editor. When opening a pull request to submit your EIP, please use an abbreviated title in the filename, `eip-draft_title_abbrev.md`.
19+
20+
The title should be 44 characters or less. It should not repeat the EIP number in title, irrespective of the category.
21+
22+
TODO: Remove this comment before submitting
23+
-->
24+
25+
## Abstract
26+
27+
<!--
28+
The Abstract is a multi-sentence (short paragraph) technical summary. This should be a very terse and human-readable version of the specification section. Someone should be able to read only the abstract to get the gist of what this specification does.
29+
30+
TODO: Remove this comment before submitting
31+
-->
32+
33+
## Motivation
34+
35+
<!--
36+
This section is optional.
37+
38+
The motivation section should include a description of any nontrivial problems the EIP solves. It should not describe how the EIP solves those problems, unless it is not immediately obvious. It should not describe why the EIP should be made into a standard, unless it is not immediately obvious.
39+
40+
With a few exceptions, external links are not allowed. If you feel that a particular resource would demonstrate a compelling case for your EIP, then save it as a printer-friendly PDF, put it in the assets folder, and link to that copy.
41+
42+
TODO: Remove this comment before submitting
43+
-->
44+
45+
## Specification
46+
47+
<!--
48+
The Specification section should describe the syntax and semantics of any new feature. The specification should be detailed enough to allow competing, interoperable implementations for any of the current Ethereum platforms (besu, erigon, ethereumjs, go-ethereum, nethermind, or others).
49+
50+
It is recommended to follow RFC 2119 and RFC 8174. Do not remove the key word definitions if RFC 2119 and RFC 8174 are followed.
51+
52+
TODO: Remove this comment before submitting
53+
-->
54+
55+
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.
56+
57+
## Rationale
58+
59+
<!--
60+
The rationale fleshes out the specification by describing what motivated the design and why particular design decisions were made. It should describe alternate designs that were considered and related work, e.g. how the feature is supported in other languages.
61+
62+
The current placeholder is acceptable for a draft.
63+
64+
TODO: Remove this comment before submitting
65+
-->
66+
67+
TBD
68+
69+
## Backwards Compatibility
70+
71+
<!--
72+
73+
This section is optional.
74+
75+
All EIPs that introduce backwards incompatibilities must include a section describing these incompatibilities and their severity. The EIP must explain how the author proposes to deal with these incompatibilities. EIP submissions without a sufficient backwards compatibility treatise may be rejected outright.
76+
77+
The current placeholder is acceptable for a draft.
78+
79+
TODO: Remove this comment before submitting
80+
-->
81+
82+
No backward compatibility issues found.
83+
84+
## Test Cases
85+
86+
<!--
87+
This section is optional for non-Core EIPs.
88+
89+
The Test Cases section should include expected input/output pairs, but may include a succinct set of executable tests. It should not include project build files. No new requirements may be be introduced here (meaning an implementation following only the Specification section should pass all tests here.)
90+
If the test suite is too large to reasonably be included inline, then consider adding it as one or more files in `../assets/eip-####/`. External links will not be allowed
91+
92+
TODO: Remove this comment before submitting
93+
-->
94+
95+
## Reference Implementation
96+
97+
<!--
98+
This section is optional.
99+
100+
The Reference Implementation section should include a minimal implementation that assists in understanding or implementing this specification. It should not include project build files. The reference implementation is not a replacement for the Specification section, and the proposal should still be understandable without it.
101+
If the reference implementation is too large to reasonably be included inline, then consider adding it as one or more files in `../assets/eip-####/`. External links will not be allowed.
102+
103+
TODO: Remove this comment before submitting
104+
-->
105+
106+
## Security Considerations
107+
108+
<!--
109+
All EIPs must contain a section that discusses the security implications/considerations relevant to the proposed change. Include information that might be important for security discussions, surfaces risks and can be used throughout the life cycle of the proposal. For example, include security-relevant design decisions, concerns, important discussions, implementation-specific guidance and pitfalls, an outline of threats and risks and how they are being addressed. EIP submissions missing the "Security Considerations" section will be rejected. An EIP cannot proceed to status "Final" without a Security Considerations discussion deemed sufficient by the reviewers.
110+
111+
The current placeholder is acceptable for a draft.
112+
113+
TODO: Remove this comment before submitting
114+
-->
115+
116+
Needs discussion.
117+
118+
## Copyright
119+
120+
Copyright and related rights waived via [CC0](../LICENSE.md).

src/periphery/validationHooks/ValidationHookIntrospection.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ interface IValidationHookIntrospection is IValidationHook, IERC165 {}
99
/// @notice Base contract for validation hooks supporting basic introspection
1010
/// @dev Offchain interfaces and integrators should query `supportsInterface` to fuzz what types of validation are run by the hook
1111
abstract contract ValidationHookIntrospection is IValidationHookIntrospection {
12+
/// @notice Returns true if the mode is supported
13+
/// @dev Modes are arbitrary bytes32 values that can be used to identify the type of validation being run
14+
function supportsMode(bytes32 _mode) public view virtual returns (bool) {}
15+
1216
/// @inheritdoc IERC165
1317
function supportsInterface(bytes4 _interfaceId) public view virtual returns (bool) {
1418
return _interfaceId == type(IValidationHook).interfaceId || _interfaceId == type(IERC165).interfaceId;

0 commit comments

Comments
 (0)