-
Notifications
You must be signed in to change notification settings - Fork 91
refactor: prepare ERC20CommerceEscrowWrapper for Create2 deployment #1667
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
refactor: prepare ERC20CommerceEscrowWrapper for Create2 deployment #1667
Conversation
- 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
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
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.
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-wrapperand 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 OverviewGreptile SummaryRefactors Key Changes:
Issues Found:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
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
|
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.
Additional Comments (2)
-
BASE_SEPOLIA_README.md, line 26-29 (link)logic: references deleted
deploy-base-sepolia.shscript anddeploy-erc20-commerce-escrow-wrappertask - should update to use Create2 deployment viadeploy-contracts-through-deployer -
BASE_SEPOLIA_README.md, line 141-142 (link)logic: references deleted deployment script - this section is outdated
7 files reviewed, 2 comments
The BASE_SEPOLIA_README.md references deleted deployment scripts and is no longer accurate after switching to Create2 deployment.
4079433
into
feat/commerce-escrow-eth-sepolia-deployment
Summary
Prepares
ERC20CommerceEscrowWrapperfor 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 scriptscripts/test-base-sepolia-deployment.ts- Deployment verification scriptscripts/update-base-sepolia-addresses.js- Address update scriptBASE_SEPOLIA_README.md- Documentation for removed workflowRemoved Hardhat Task
deploy-erc20-commerce-escrow-wrappertask fromhardhat.config.tsUpdated Contract Artifacts
base-sepoliaentry, addedbaseplaceholder for Create2 deploymentbase-sepoliaentry (Rodrigo's test deployment)What's Preserved
packages/currency/- Enables testnet usageDeployment Plan
After this PR merges,
ERC20CommerceEscrowWrapperwill be deployed using the standard Create2 flow:0xE99Ab70a5FAE59551544FA326fA048f7B95A24B2)0xe7E02e5e94d668C5630959e4791B1977f3b74fcC)Create2 ensures deterministic addresses across chains where the same RequestDeployer is used.
Related