Skip to content

Conversation

@MantisClone
Copy link
Member

@MantisClone MantisClone commented Dec 11, 2025

Summary

Prepares ERC20CommerceEscrowWrapper for standard Create2 deployment by removing custom deployment scripts and cleaning up Base Sepolia test deployments.

Changes

Removed Custom Deployment Scripts

  • scripts/deploy-erc20-commerce-escrow-wrapper.ts - Custom deployment script (non-Create2)
  • scripts/deploy-base-sepolia.sh - Base Sepolia deployment shell script
  • scripts/test-base-sepolia-deployment.ts - Deployment verification script
  • scripts/update-base-sepolia-addresses.js - Address update script
  • BASE_SEPOLIA_README.md - Documentation for removed workflow

Removed Hardhat Task

  • Removed deploy-erc20-commerce-escrow-wrapper task from hardhat.config.ts

Updated Contract Artifacts

  • ERC20CommerceEscrowWrapper: Removed base-sepolia entry, added base placeholder for Create2 deployment
  • ERC20FeeProxy: Removed base-sepolia entry (Rodrigo's test deployment)

What's Preserved

  • Base Sepolia currency/chain definitions in packages/currency/ - Enables testnet usage
  • AuthCaptureEscrow on Base Sepolia - Coinbase's verified deployment remains functional

Deployment Plan

After this PR merges, ERC20CommerceEscrowWrapper will be deployed using the standard Create2 flow:

  1. Ethereum Sepolia - Using standard RequestDeployer (0xE99Ab70a5FAE59551544FA326fA048f7B95A24B2)
  2. Base Mainnet - Using Base-specific RequestDeployer (0xe7E02e5e94d668C5630959e4791B1977f3b74fcC)

Create2 ensures deterministic addresses across chains where the same RequestDeployer is used.

Related

- Remove custom deployment script (non-Create2)
- Remove Base Sepolia helper scripts
- Remove base-sepolia artifacts (except Coinbase's AuthCaptureEscrow)
- Add base placeholder for Create2 deployment
- Reset sepolia address to placeholder for Create2 redeployment
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 11, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/commerce-escrow-create2-deployment

Comment @coderabbitai help to get the list of available commands and usage tips.

@MantisClone MantisClone marked this pull request as ready for review December 11, 2025 21:49
Copilot AI review requested due to automatic review settings December 11, 2025 21:49
@MantisClone MantisClone self-assigned this Dec 11, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors the ERC20CommerceEscrowWrapper deployment strategy to align with Request Network's standard Create2 deployment pattern. Previously, this contract used a custom deployment script that resulted in different addresses across networks. The PR removes the custom deployment infrastructure and prepares the contract for standardized Create2 deployment via the existing deploy-contracts-through-deployer task.

Key Changes

  • Removed custom deployment scripts and helper utilities for Base Sepolia deployments
  • Reset artifact addresses to placeholders for sepolia and base networks in preparation for Create2 deployment
  • Removed the custom Hardhat task deploy-erc20-commerce-escrow-wrapper and its imports

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/smart-contracts/src/lib/artifacts/ERC20FeeProxy/index.ts Removed base-sepolia placeholder entry that was never deployed
packages/smart-contracts/src/lib/artifacts/ERC20CommerceEscrowWrapper/index.ts Reset sepolia address to placeholder and added base mainnet entry for Create2 deployment
packages/smart-contracts/scripts/update-base-sepolia-addresses.js Removed custom script for updating artifact addresses post-deployment
packages/smart-contracts/scripts/test-base-sepolia-deployment.ts Removed test/helper script for Base Sepolia deployments
packages/smart-contracts/scripts/deploy-erc20-commerce-escrow-wrapper.ts Removed custom deployment script that bypassed Create2 infrastructure
packages/smart-contracts/scripts/deploy-base-sepolia.sh Removed bash deployment helper script
packages/smart-contracts/hardhat.config.ts Removed custom deployment task and its import, ensuring future deployments use standard Create2 task

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 11, 2025

Greptile Overview

Greptile Summary

Refactors ERC20CommerceEscrowWrapper deployment to use Request Network's standard Create2 deployment pattern instead of custom scripts, enabling deterministic addresses across networks.

Key Changes:

  • Removed custom deployment task and scripts (deploy-erc20-commerce-escrow-wrapper.ts, deploy-base-sepolia.sh, etc.)
  • Reset sepolia and replaced base-sepolia with base in deployment artifacts (placeholder addresses for Create2)
  • Removed base-sepolia from ERC20FeeProxy artifact
  • ERC20CommerceEscrowWrapper already exists in create2ContractDeploymentList (line 25 of scripts-create2/utils.ts)
  • Constructor args properly configured in scripts-create2/constructor-args.ts to use AuthCaptureEscrow and ERC20FeeProxy

Issues Found:

  • BASE_SEPOLIA_README.md still references deleted deployment scripts and tasks, causing broken documentation

Confidence Score: 4/5

  • This PR is safe to merge with one documentation issue to fix
  • The refactoring correctly transitions from custom deployment to Create2 deployment. The contract is already registered in the deployment list, constructor args are properly configured, and all dependencies (AuthCaptureEscrow, ERC20FeeProxy) exist on target networks. However, BASE_SEPOLIA_README.md contains broken references to deleted scripts that need updating.
  • BASE_SEPOLIA_README.md requires updates to remove references to deleted deployment scripts

Important Files Changed

File Analysis

Filename Score Overview
packages/smart-contracts/hardhat.config.ts 5/5 removed custom deployment task and import, correctly transitioning to standard Create2 deployment
packages/smart-contracts/src/lib/artifacts/ERC20CommerceEscrowWrapper/index.ts 5/5 reset sepolia and replaced base-sepolia with base, using placeholder addresses for Create2 deployment
packages/smart-contracts/src/lib/artifacts/ERC20FeeProxy/index.ts 5/5 removed base-sepolia entry (no longer needed)

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Task as deploy-contracts-through-deployer
    participant Deployer as RequestDeployer Contract
    participant Wrapper as ERC20CommerceEscrowWrapper
    participant AuthEscrow as AuthCaptureEscrow
    participant FeeProxy as ERC20FeeProxy

    Note over Dev,FeeProxy: Before: Custom Deployment (Removed)
    Dev->>Dev: Run deploy-erc20-commerce-escrow-wrapper
    Dev->>Dev: Manually update artifact addresses
    
    Note over Dev,FeeProxy: After: Create2 Deployment (This PR)
    Dev->>Task: yarn hardhat deploy-contracts-through-deployer
    Task->>Deployer: Check if ERC20CommerceEscrowWrapper exists
    Deployer->>AuthEscrow: Get address for network
    AuthEscrow-->>Deployer: Returns 0xBdEA0D1bcC5966192B070Fdf62aB4EF5b4420cff (base)
    Deployer->>FeeProxy: Get address for network
    FeeProxy-->>Deployer: Returns 0x1892196E80C4c17ea5100Da765Ab48c1fE2Fb814 (base)
    Deployer->>Wrapper: Deploy via CREATE2(salt, bytecode, [authEscrow, feeProxy])
    Wrapper-->>Deployer: Deterministic address
    Deployer->>Task: Update artifacts automatically
    Task-->>Dev: Deployment complete with predictable address
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments (2)

  1. BASE_SEPOLIA_README.md, line 26-29 (link)

    logic: references deleted deploy-base-sepolia.sh script and deploy-erc20-commerce-escrow-wrapper task - should update to use Create2 deployment via deploy-contracts-through-deployer

  2. BASE_SEPOLIA_README.md, line 141-142 (link)

    logic: references deleted deployment script - this section is outdated

7 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

The BASE_SEPOLIA_README.md references deleted deployment scripts
and is no longer accurate after switching to Create2 deployment.
@MantisClone MantisClone merged commit 4079433 into feat/commerce-escrow-eth-sepolia-deployment Dec 11, 2025
8 of 10 checks passed
@MantisClone MantisClone deleted the feat/commerce-escrow-create2-deployment branch December 11, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants