-
Notifications
You must be signed in to change notification settings - Fork 0
[feature] Add bsc configs #2
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
base: master
Are you sure you want to change the base?
Conversation
ungaro
commented
Sep 23, 2025
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 PR adds BSC (Binance Smart Chain) configuration to the LayerZero project, enabling bidirectional communication between PlumePhoenix and BSC networks for the PlumeOFT token.
Key changes:
- Creates new LayerZero configuration file for PlumePhoenix-BSC pathway
- Adds BSC mainnet network configuration to Hardhat config
- Sets up bidirectional token transfer capabilities with enforced options
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| layerzero.plume.plumephoenix-bsc.config.ts | New LayerZero configuration defining bidirectional pathway between PlumePhoenix and BSC with enforced gas options |
| hardhat.config.ts | Adds BSC mainnet network configuration with endpoint ID and RPC URL |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
|
|
Copilot
AI
Sep 23, 2025
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.
[nitpick] Remove the trailing empty lines at the end of the file to maintain consistent formatting.
|
ethereum <-> bsc |
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
Copilot reviewed 13 out of 18 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
package.json:1
- The removal of @openzeppelin/hardhat-upgrades dependency should be documented in the PR description or commit message to explain why this functionality is no longer needed.
{
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| 'Could not find MNEMONIC or PRIVATE_KEY environment variables. It will not be possible to execute transactions in your example.' | ||
| ) | ||
| } | ||
| console.log("RPC_URL_BSC_MAINNET",process.env.RPC_URL_BSC_MAINNET); |
Copilot
AI
Sep 26, 2025
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.
Debug console.log statement should be removed before merging to production. This appears to be leftover debugging code.
| console.log("RPC_URL_BSC_MAINNET",process.env.RPC_URL_BSC_MAINNET); |
| import 'dotenv/config' | ||
|
|
||
| import '@openzeppelin/hardhat-upgrades' | ||
| //import '@openzeppelin/hardhat-upgrades' |
Copilot
AI
Sep 26, 2025
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.
Commented-out import should be removed instead of being left as a comment. If the import is no longer needed, delete the line entirely.
| //import '@openzeppelin/hardhat-upgrades' |
| "@types/chai": "4.3.7", | ||
| "@types/mocha": "^10.0.6", | ||
| "@types/node": "~18.18.14", | ||
| "chai": "^4.4.1", | ||
| "chai": "4.3.7", |
Copilot
AI
Sep 26, 2025
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.
Downgrading chai and @types/chai from newer versions (^4.4.1 and ^4.3.11) to 4.3.7 should be explained. Version downgrades can introduce compatibility issues or remove bug fixes.
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
Copilot reviewed 13 out of 18 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| "@openzeppelin/contracts": "^5.0.2", | ||
| "@openzeppelin/contracts-upgradeable": "^5.0.2", | ||
| "@openzeppelin/hardhat-upgrades": "^1.28.0", | ||
|
|
Copilot
AI
Oct 6, 2025
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.
Empty line after removing '@openzeppelin/hardhat-upgrades' package should be cleaned up to maintain consistent formatting.
| import '@nomiclabs/hardhat-ethers' | ||
| import '@layerzerolabs/toolbox-hardhat' | ||
|
|
||
| const { vars } = require("hardhat/config"); |
Copilot
AI
Oct 6, 2025
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.
The imported 'vars' variable is declared but never used in the code. Consider removing this unused import.
| const { vars } = require("hardhat/config"); |
| [['LayerZero Labs', 'Google Cloud'], []], | ||
| [20, 15], | ||
| [ENFORCED, ENFORCED], | ||
| ], |
Copilot
AI
Oct 6, 2025
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.
Trailing whitespace should be removed from the end of line 35.
| ], | |
| ], |
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
Copilot reviewed 13 out of 18 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
hardhat.config.ts:1
- [nitpick] Remove unnecessary blank lines in the plugins array configuration. This improves code consistency and readability.
// Get the environment configuration from .env file
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| console.log("RPC_URL_BSC_MAINNET",process.env.RPC_URL_BSC_MAINNET); | ||
| console.log("RPC_URL_ETH_MAINNET",process.env.RPC_URL_ETH_MAINNET); |
Copilot
AI
Oct 6, 2025
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.
Remove console.log statements from production code. These debug statements should not be committed to the repository as they can expose sensitive configuration details and clutter the console output.
| console.log("RPC_URL_BSC_MAINNET",process.env.RPC_URL_BSC_MAINNET); | |
| console.log("RPC_URL_ETH_MAINNET",process.env.RPC_URL_ETH_MAINNET); |
| eid: EndpointId.BSC_V2_MAINNET, | ||
| url: 'http://127.0.0.1:8545', | ||
| chainId: 56, | ||
| accounts: [process.env.PRIVATE_KEY || '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'], |
Copilot
AI
Oct 6, 2025
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.
The commented code contains a hardcoded private key that appears to be a well-known test key. Even in commented code, this should be removed to avoid potential security risks.
| accounts: [process.env.PRIVATE_KEY || '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'], | |
| accounts: [process.env.PRIVATE_KEY], |
| import '@nomiclabs/hardhat-ethers' | ||
| import '@layerzerolabs/toolbox-hardhat' | ||
|
|
||
| const { vars } = require("hardhat/config"); |
Copilot
AI
Oct 6, 2025
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.
Use consistent import syntax. This line uses CommonJS require() while the rest of the file uses ES6 imports. Consider changing to: import { vars } from 'hardhat/config';
| const { vars } = require("hardhat/config"); | |
| import { vars } from 'hardhat/config'; |