-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: deploy base sepolia #13
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request introduces support for the Base Sepolia testnet across multiple configuration files. The changes include adding deployment targets in the Makefile, creating a new Changes
Sequence DiagramsequenceDiagram
participant Developer
participant Makefile
participant HardhatConfig
participant Deployment
Developer->>Makefile: Trigger deploy_base_sepolia
Makefile->>HardhatConfig: Use Base Sepolia network config
HardhatConfig->>Deployment: Deploy with specified parameters
Deployment-->>Developer: Deployment complete
Possibly related PRs
Suggested reviewers
Poem
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/static-quoter/hardhat.config.ts (1)
78-84
: Consider adding Base Sepolia to etherscan configuration.The configuration should include Base Sepolia's block explorer for contract verification.
etherscan: { apiKey: ETHERSCAN_API_KEY, customChains: [ + { + network: "baseSepolia", + chainId: 84532, + urls: { + apiURL: "https://api-sepolia.basescan.org/api", + browserURL: "https://sepolia.basescan.org" + } + }, // ... other chains ] }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
packages/deploy/Makefile
(1 hunks)packages/deploy/state.json
(1 hunks)packages/static-quoter/constants/addresses.json
(1 hunks)packages/static-quoter/deploy/vapordexV2.ts
(2 hunks)packages/static-quoter/deployments/baseSepolia/.chainId
(1 hunks)packages/static-quoter/hardhat.config.ts
(5 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/deploy/state.json
🔇 Additional comments (4)
packages/static-quoter/deployments/baseSepolia/.chainId (1)
1-1
: LGTM! Chain ID is correct for Base Sepolia.The chain ID 84532 matches Base Sepolia's official network identifier.
packages/static-quoter/deploy/vapordexV2.ts (1)
16-16
: Verify the Base Sepolia factory address configuration.The integration follows the correct pattern, but we should verify the factory address configuration.
Also applies to: 43-45
packages/deploy/Makefile (1)
18-18
: Consider adjusting gas parameters for Base Sepolia.The current configuration uses
-c 3
for gas price multiplier. Verify if this is optimal for Base Sepolia's gas dynamics.✅ Verification successful
Gas multiplier is consistent with other testnet deployments
The current
-c 3
configuration aligns with other testnet deployments in the codebase and follows the established pattern for testnet environments.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check recent gas prices on Base Sepolia # Get recent gas prices from Base Sepolia if [ -n "$BASE_SEPOLIA_RPC" ]; then echo "Recent gas prices on Base Sepolia:" curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":1}' $BASE_SEPOLIA_RPC | jq fiLength of output: 15
Script:
#!/bin/bash # Search for gas-related configurations and Base Sepolia mentions echo "Searching for gas configurations in deployment files:" rg -i "gas|sepolia" packages/deploy/ -A 2 -B 2 echo -e "\nChecking for deployment documentation:" fd "README|DEPLOY" --type f --exec cat {}Length of output: 34173
packages/static-quoter/constants/addresses.json (1)
131-136
: LGTM! The new network configuration follows the established structure.The "baseSepolia" section maintains consistency with other network configurations in the file.
Let's verify the factory address exists on Base Sepolia:
✅ Verification successful
Factory address is properly integrated and deployed ✅
The address
0x3C88Aa61A1C15c8028530e0115884F85c839a795
is correctly configured as the vapordexV2 factory for Base Sepolia and has been successfully deployed and verified through deployment artifacts.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the vapordexV2 factory contract exists on Base Sepolia # Use etherscan API to check contract existence curl -s "https://api-sepolia.basescan.org/api?module=contract&action=getabi&address=0x3C88Aa61A1C15c8028530e0115884F85c839a795"Length of output: 197
Script:
#!/bin/bash # Search for files containing the factory address echo "=== Files containing the factory address ===" rg -l "0x3C88Aa61A1C15c8028530e0115884F85c839a795" echo -e "\n=== Checking for Base Sepolia related files ===" rg -l -i "base.?sepolia" echo -e "\n=== Looking for deployment or configuration files ===" fd -e json -e ts -e js -e md . | rg -i "(deploy|config|constant|address)"Length of output: 4863
Script:
#!/bin/bash echo "=== Checking vapordexV2 deployment script ===" cat packages/static-quoter/deploy/vapordexV2.ts echo -e "\n=== Checking deployment state ===" cat packages/deploy/state.json | grep -A 5 -B 5 "0x3C88Aa61A1C15c8028530e0115884F85c839a795" echo -e "\n=== Checking Base Sepolia deployment artifact ===" cat packages/static-quoter/deployments/baseSepolia/UniswapV3StaticQuoter.jsonLength of output: 68862
@@ -17,6 +17,7 @@ const ETHERSCAN_API_KEY = process.env.SNOWTRACE_API_KEY; | |||
const DOGECHAIN_RPC = process.env.DOGECHAIN_RPC ?? ""; | |||
const EUROPA_TESTNET_RPC = process.env.EUROPA_TESTNET_RPC ?? ""; | |||
const CURTIS_RPC = process.env.CURTIS_RPC ?? ""; | |||
const BASE_SEPOLIA_RPC = process.env.BASE_SEPOLIA_RPC ?? ""; |
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.
💡 Codebase verification
BASE_SEPOLIA_RPC environment variable is not documented
The environment variable is missing from packages/static-quoter/.env.sample
while other RPC endpoints, including test networks like Fuji, are documented. Add BASE_SEPOLIA_RPC to maintain consistency with the project's documentation pattern.
- Add
BASE_SEPOLIA_RPC=
topackages/static-quoter/.env.sample
🔗 Analysis chain
Verify BASE_SEPOLIA_RPC environment variable.
Ensure the environment variable is properly documented and added to the deployment environment.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if BASE_SEPOLIA_RPC is documented
# Check if BASE_SEPOLIA_RPC is mentioned in .env.example or similar files
fd -t f -e example -e sample -e template | xargs grep -l "BASE_SEPOLIA_RPC"
Length of output: 75
Script:
#!/bin/bash
# Broader search for environment variable documentation and similar patterns
# Check for any .env files
echo "=== Checking .env files ==="
fd -t f "^\.env" --hidden
# Check README files for RPC documentation
echo -e "\n=== Checking README files for RPC documentation ==="
fd -t f "README" -e md | xargs grep -l "RPC"
# Check for similar RPC configurations in the codebase
echo -e "\n=== Checking for RPC patterns ==="
rg "process\.env\.[A-Z_]*RPC" --type ts
Length of output: 1208
Script:
#!/bin/bash
# Check content of relevant files for BASE_SEPOLIA_RPC documentation
echo "=== Content of .env.sample ==="
cat packages/static-quoter/.env.sample
echo -e "\n=== RPC Documentation in deploy README ==="
grep -A 5 -B 5 "RPC" packages/deploy/README.md
Length of output: 1285
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/static-quoter/deploy/vapordexV2.ts (2)
9-20
: Improve error message readability.The error message could be more user-friendly by formatting the network list.
- throw new Error(`Wrong network! Only "${allowedNetworks}" supported`); + throw new Error(`Wrong network! Only ${allowedNetworks.join(', ')} supported`);
55-61
: Consider enabling skipIfAlreadyDeployed for production networks.Setting
skipIfAlreadyDeployed: false
means the contract will be redeployed even if it already exists. This could be wasteful in terms of gas and potentially disruptive for production networks.Consider adding a condition to enable skipping for production networks:
const deployResult: any = await deploy(contractName, { from: deployer, contract: contractName, - skipIfAlreadyDeployed: false, + skipIfAlreadyDeployed: !['fuji', 'telosTestnet', 'europaTestnet', 'baseSepolia'].includes(network.name), log: true, args, });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/static-quoter/constants/addresses.json
(1 hunks)packages/static-quoter/deploy/vapordexV2.ts
(1 hunks)packages/static-quoter/hardhat.config.ts
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/static-quoter/constants/addresses.json
- packages/static-quoter/hardhat.config.ts
🔇 Additional comments (2)
packages/static-quoter/deploy/vapordexV2.ts (2)
1-8
: LGTM! Clean imports and function declaration.The imports are appropriate for a Hardhat deployment script, and the function declaration is well-structured.
22-50
: Verify Base Sepolia factory address configuration.Ensure that the Base Sepolia factory address is properly configured in the addresses file.
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Description: Verify Base Sepolia factory address configuration # Check if the factory address exists and is valid jq -e '.baseSepolia.protocols.vapordexV2.factory' packages/static-quoter/constants/addresses.json # Verify the address format jq -r '.baseSepolia.protocols.vapordexV2.factory' packages/static-quoter/constants/addresses.json | grep -E '^0x[a-fA-F0-9]{40}$' || echo "Invalid address format"Length of output: 315
Base Sepolia configuration verified.
The addresses file in packages/static-quoter/constants/addresses.json has the Base Sepolia factory address correctly set to "0x3C88Aa61A1C15c8028530e0115884F85c839a795" and it adheres to the proper Ethereum address format.
Summary by CodeRabbit
New Features
Configuration Updates
Deployment Enhancements