-
Notifications
You must be signed in to change notification settings - Fork 6
feat: sonic #109
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: sonic #109
Conversation
WalkthroughThis pull request introduces several updates across multiple configuration files to support a new network called "Sonic". The changes include updating the networks list, modifying the manifest file with a renamed artifact, upgrading a smart contracts dependency, and adding a new subgraph configuration for the Sonic network. Additionally, a new Sepolia subgraph configuration is introduced with an ERC20 Transferrable Receivable contract. The modifications appear to be part of an infrastructure expansion to support new blockchain networks and contract interactions. Changes
Sequence DiagramsequenceDiagram
participant CLI as CLI
participant Networks as Networks Config
participant Subgraph as Subgraph Configuration
participant Contracts as Smart Contracts
CLI->>Networks: Add "sonic" network
Networks-->>CLI: Network list updated
CLI->>Contracts: Upgrade smart contracts dependency
Contracts-->>CLI: Dependency updated
CLI->>Subgraph: Configure Sonic network data sources
Subgraph-->>CLI: Subgraph configuration complete
Note over CLI, Subgraph: New network and contracts integrated
Assessment against linked issues
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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: 0
🧹 Nitpick comments (2)
cli/networks.json (1)
21-22: Maintain alphabetical ordering of networks.The "sonic" network should be inserted in alphabetical order to maintain consistency with the rest of the list.
"sepolia", "tombchain", "xdai", - "zksyncera", - "sonic" + "sonic", + "zksyncera"subgraph.sonic.yaml (1)
134-135: Fix YAML formatting issues.There are two formatting issues at the end of the file:
- Missing newline at end of file
- Trailing whitespace on line 135
- +🧰 Tools
🪛 yamllint (1.35.1)
[error] 135-135: no new line character at the end of file
(new-line-at-end-of-file)
[error] 135-135: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (5)
cli/lib/manifest.ts(2 hunks)cli/networks.json(1 hunks)package.json(1 hunks)subgraph.sepolia.yaml(1 hunks)subgraph.sonic.yaml(1 hunks)
🧰 Additional context used
🪛 yamllint (1.35.1)
subgraph.sonic.yaml
[error] 135-135: no new line character at the end of file
(new-line-at-end-of-file)
[error] 135-135: trailing spaces
(trailing-spaces)
🔇 Additional comments (7)
cli/lib/manifest.ts (1)
14-14: Verify the impact of artifact renaming.The renaming from
singleRequestProxyFactoryArtifacttosingleRequestForwarderFactoryArtifactappears to be related to the smart contracts upgrade. Let's verify this change doesn't break existing deployments.Also applies to: 28-28
✅ Verification successful
Artifact renaming is properly implemented and safe ✅
The change is well-contained within manifest.ts and maintains backward compatibility by keeping the original
SingleRequestProxyFactorykey in the paymentNetworks object. No other references to either the old or new artifact names were found in deployment scripts or elsewhere in the codebase.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if the old artifact name is still used elsewhere in the codebase # and verify the new artifact exists in the upgraded package # Search for old artifact name echo "Searching for old artifact name usage..." rg "singleRequestProxyFactoryArtifact" -l # Verify new artifact exists in node_modules echo "Verifying new artifact in @requestnetwork/smart-contracts..." find node_modules/@requestnetwork/smart-contracts -type f -exec grep -l "singleRequestForwarderFactoryArtifact" {} \;Length of output: 464
Script:
#!/bin/bash # Search for new artifact name in source files echo "Searching for new artifact name usage..." rg "singleRequestForwarderFactoryArtifact" -A 2 -B 2 # Look for deployment related files echo -e "\nChecking deployment related files..." fd -e ts -e js -e json "deploy|migration|config" --type fLength of output: 968
Script:
#!/bin/bash # Check deployment files for artifact references echo "Checking deployment files for artifact references..." rg -A 2 -B 2 "SingleRequestProxyFactory|singleRequestProxyFactoryArtifact|singleRequestForwarderFactoryArtifact" cli/commands/deploy.ts cli/lib/deploy.tsLength of output: 270
package.json (1)
25-25: Review implications of major smart contracts upgrade.The upgrade from
0.38.1-next.2087to0.45.1-next.0is significant:
- Major version bump (0.38 → 0.45) might include breaking changes
- Switching from a later pre-release (-next.2087) to an earlier one (-next.0) could potentially reintroduce fixed issues
subgraph.sonic.yaml (2)
11-11: Verify start blocks for contract indexing.Each contract has a specific start block configured. Please confirm these are the correct deployment blocks:
- ERC20Proxy: 3974125
- ERC20FeeProxy: 3974138
- ERC20ConversionProxy: 3974151
- EthProxy: 3974083
- EthFeeProxy: 3974098
- EthConversionProxy: 3974113
Also applies to: 32-32, 53-53, 76-76, 97-97, 118-118
9-9: Verify contract addresses on Sonic chain.Please verify that these contract addresses are the correct deployments on the Sonic chain:
- ERC20Proxy:
0xC8D3FE2A27bB69a85F6973081FdC41103E107595- ERC20FeeProxy:
0x399F5EE127ce7432E4921a61b8CF52b0af52cbfE- ERC20ConversionProxy:
0xe43fd55Da253628Ed7Cad5ab198664F5B3659DA9- EthProxy:
0x171Ee0881407d4c0C11eA1a2FB7D5b4cdED71e6e- EthFeeProxy:
0x4989F941D62bEEb3548Bf55d0D5291Ec335429f0- EthConversionProxy:
0x3E3B04e1bF170522a5c5DDE628C4d365c0342239Also applies to: 30-30, 51-51, 74-74, 95-95, 116-116
subgraph.sepolia.yaml (3)
167-187: Verify the existence of required files.The new data source references two files that need to be present in the repository:
./abis/ERC20TransferrableReceivable-0.2.0.json./src/erc20TransferrableReceivable.ts✅ Verification successful
Required files are present and correctly referenced
Both the ABI file and the mapping file exist at the specified paths in the repository, confirming that the data source configuration is complete and properly structured.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if the required files exist in the repository echo "Checking for ABI file..." if [ -f "./abis/ERC20TransferrableReceivable-0.2.0.json" ]; then echo "✓ ABI file exists" else echo "✗ Missing ABI file: ./abis/ERC20TransferrableReceivable-0.2.0.json" fi echo "Checking for mapping file..." if [ -f "./src/erc20TransferrableReceivable.ts" ]; then echo "✓ Mapping file exists" else echo "✗ Missing mapping file: ./src/erc20TransferrableReceivable.ts" fiLength of output: 334
167-187: Clarify the relationship with Sonic chain deployment.The PR objectives mention deploying the payment subgraph for the Sonic chain, but this file configures a data source for the Sepolia network. Please clarify if this is:
- An unrelated change that's part of the same PR
- A prerequisite for the Sonic chain deployment
- A template that will be used for the Sonic configuration
✅ Verification successful
Sepolia and Sonic are separate network deployments
The Sepolia configuration is not a direct prerequisite or template for Sonic. Both are independent network deployments following this repository's standard multi-chain deployment structure, where each network maintains its own configuration with network-specific contract addresses and start blocks.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Look for Sonic-related configurations echo "Searching for Sonic-related files..." fd -t f "sonic" -i echo "Searching for Sonic mentions in yaml files..." rg -i "sonic" -g "*.yaml"Length of output: 482
Script:
#!/bin/bash # Compare Sepolia and Sonic configurations echo "=== Comparing Sepolia and Sonic configurations ===" diff subgraph.sepolia.yaml subgraph.sonic.yaml echo -e "\n=== Checking for documentation ===" # Check README and other common doc files fd -e md -e txt -X cat {}Length of output: 12737
167-187: Verify contract deployment on Sepolia.The configuration references a contract at
0xB5E53C3d145Cbaa61C7028736A1fF0bC6817A4c5starting from block6194071on Sepolia.
MantisClone
left a 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.
Should we attempt to add sonic to the deploy.yml workflow in Github Actions?
Fixes #100
Description
Deployment of the payment subgraph for Sonic chain.
Also updates the payment subgraph on Sepolia to index events from
ERC20TransferrableReceivableSummary by CodeRabbit
Summary by CodeRabbit
Release Notes
New Features
Dependency Updates
@requestnetwork/smart-contractsto version 0.45.1-next.0Chores
singleRequestProxyFactoryArtifacttosingleRequestForwarderFactoryArtifact