Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
Contracts are split into two separate Forge projects under `contracts/`:

- **`cctp/`** — `CCTPAuction` (Solidity 0.7.6) — Receives cross-chain USDC via CCTP and submits auction bids
- **`cre/`** — `CCTPAuctionWrapper` (Solidity 0.8.34) — CRE receiver that forwards reports to CCTPAuction
- **`cre/`** — `CREAuctionWrapper` (Solidity 0.8.34) — CRE receiver that forwards reports to CCTPAuction

### Deployment Order

`CCTPAuction` must be deployed first. Its address is then used as a constructor argument for `CCTPAuctionWrapper`.
`CCTPAuction` must be deployed first. Its address is then used as a constructor argument for `CREAuctionWrapper`.

### Step 1: Deploy CCTPAuction

Expand All @@ -20,7 +20,7 @@ API_KEY_ETHERSCAN="" forge script script/Deploy.sol \
--verify --verifier blockscout --verifier-url <BLOCKSCOUT_API_URL>
```

### Step 2: Deploy CCTPAuctionWrapper
### Step 2: Deploy CREAuctionWrapper

Update `cre/script/Deploy.sol` with the deployed `CCTPAuction` address, then:

Expand Down Expand Up @@ -54,7 +54,7 @@ forge verify-contract <CONTRACT_ADDRESS> src/<Contract>.sol:<Contract> \

### Deployed Addresses

| Network | CCTPAuction | CCTPAuctionWrapper |
| Network | CCTPAuction | CREAuctionWrapper |
| ---------------- | ----------- | ------------------ |
| Arc Testnet | [`0x2CDf56BE53C9758D1B9f0Fc891B650e82BB64c52`](https://testnet.arcscan.app/address/0x2CDf56BE53C9758D1B9f0Fc891B650e82BB64c52) | [`0x7737cae00C4D0eB677a66AFEF921E7d7EeD32c55`](https://testnet.arcscan.app/address/0x7737cae00C4D0eB677a66AFEF921E7d7EeD32c55) |
| Unichain Sepolia | [`0xe10288AD9581c5954f2947e6B0FF136B5a942bbf`](https://unichain-sepolia.blockscout.com/address/0xe10288AD9581c5954f2947e6B0FF136B5a942bbf) | [`0x3aE495B2cB9E9E7EBaf00C215796D23fEE3c2aE4`](https://unichain-sepolia.blockscout.com/address/0x3aE495B2cB9E9E7EBaf00C215796D23fEE3c2aE4) |
Expand Down
4 changes: 2 additions & 2 deletions contracts/cctp/script/Deploy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;

import {CCTPAuction} from "src/CCTPAuction.sol";
import {Script} from "forge-std/src/Script.sol";
import { CCTPAuction } from "src/CCTPAuction.sol";
import { Script } from "forge-std/src/Script.sol";

contract Deploy is Script {
struct DeploymentParams {
Expand Down
8 changes: 4 additions & 4 deletions contracts/cre/script/Deploy.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.34;

import {CCTPAuctionWrapper} from "src/CCTPAuctionWrapper.sol";
import {Script} from "forge-std/src/Script.sol";
import { CREAuctionWrapper } from "src/CREAuctionWrapper.sol";
import { Script } from "forge-std/src/Script.sol";

contract Deploy is Script {
struct DeploymentParams {
Expand Down Expand Up @@ -50,11 +50,11 @@ contract Deploy is Script {
});
}

function run() public returns (CCTPAuctionWrapper _wrapper) {
function run() public returns (CREAuctionWrapper _wrapper) {
DeploymentParams memory _params = _deploymentParams[block.chainid];

vm.startBroadcast();
_wrapper = new CCTPAuctionWrapper(_params.forwarder, _params.cctpAuction);
_wrapper = new CREAuctionWrapper(_params.forwarder, _params.cctpAuction);
vm.stopBroadcast();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity 0.8.34;

import { ReceiverTemplate } from "src/vendored/ReceiverTemplate.sol";

contract CCTPAuctionWrapper is ReceiverTemplate {
contract CREAuctionWrapper is ReceiverTemplate {
bytes4 internal constant _MINT_AND_SUBMIT_BID_SELECTOR = 0xdece9eac;

address public immutable CCTP_AUCTION;
Expand All @@ -14,7 +14,7 @@ contract CCTPAuctionWrapper is ReceiverTemplate {
CCTP_AUCTION = _cctpAuction;
}

/// @notice Forwards the validated report to CCTPAuction.mintAndSubmitBid
/// @notice Forwards the validated report to CREAuctionWrapper.mintAndSubmitBid
/// @param report The full calldata for mintAndSubmitBid(bytes,bytes)
function _processReport(bytes calldata report) internal override {
require(bytes4(report[:4]) == _MINT_AND_SUBMIT_BID_SELECTOR);
Expand Down