Skip to content

Conversation

@ungaro
Copy link
Member

@ungaro ungaro commented Sep 23, 2025

# compile
pnpm install && pnpm compile

# deploy PlumeOFT on BSC (Plume already done)
npx hardhat lz:deploy --network bsc-mainnet --tags PlumeOFT

# wire both directions using the unified config
npx hardhat lz:oapp:wire --oapp-config layerzero.plume.plumephoenix-bsc.config.ts

# verify active settings
npx hardhat lz:oapp:config:get --oapp-config layerzero.plume.plumephoenix-bsc.config.ts
npx hardhat lz:oapp:config:get:executor --oapp-config layerzero.plume.plumephoenix-bsc.config.ts

# smoke send (replace with actual addresses/EIDs)
npx hardhat lz:oft:send \
  --network plumephoenix-mainnet \
  --contract PlumeOFT \
  --to <BSC_PlumeOFT_Proxy> \
  --toEid <BSC_EID> \
  --amount 100000000000000   # 0.0001 PLUME

Copilot AI review requested due to automatic review settings September 23, 2025 14:06
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 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.

Comment on lines 42 to 43


Copy link

Copilot AI Sep 23, 2025

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.

Suggested change

Copilot uses AI. Check for mistakes.
@ungaro
Copy link
Member Author

ungaro commented Sep 23, 2025

ethereum <-> bsc

Deploy PlumeOFT on BSC:
npx hardhat lz:deploy --network bsc-mainnet --tags PlumeOFT
Wire:
npx hardhat lz:oapp:wire --oapp-config layerzero.plume.ethereum-bsc.config.ts
Verify:
npx hardhat lz:oapp:config:get --oapp-config layerzero.plume.ethereum-bsc.config.ts
npx hardhat lz:oapp:config:get:executor --oapp-config layerzero.plume.ethereum-bsc.config.ts
Smoke send:
npx hardhat lz:oft:send --network ethereum-mainnet --contract PlumeOFT --to <BSC_PlumeOFT_Proxy> --toEid <BSC_EID> --amount 100000000000000
npx hardhat lz:oft:send --network bsc-mainnet --contract PlumeOFT --to <ETH_PlumeOFT_Address> --toEid <ETH_EID> --amount 100000000000000

Copilot AI review requested due to automatic review settings September 26, 2025 23:03
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

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);
Copy link

Copilot AI Sep 26, 2025

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.

Suggested change
console.log("RPC_URL_BSC_MAINNET",process.env.RPC_URL_BSC_MAINNET);

Copilot uses AI. Check for mistakes.
import 'dotenv/config'

import '@openzeppelin/hardhat-upgrades'
//import '@openzeppelin/hardhat-upgrades'
Copy link

Copilot AI Sep 26, 2025

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.

Suggested change
//import '@openzeppelin/hardhat-upgrades'

Copilot uses AI. Check for mistakes.
Comment on lines +51 to +54
"@types/chai": "4.3.7",
"@types/mocha": "^10.0.6",
"@types/node": "~18.18.14",
"chai": "^4.4.1",
"chai": "4.3.7",
Copy link

Copilot AI Sep 26, 2025

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.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings October 6, 2025 17:00
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

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",

Copy link

Copilot AI Oct 6, 2025

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.

Suggested change

Copilot uses AI. Check for mistakes.
import '@nomiclabs/hardhat-ethers'
import '@layerzerolabs/toolbox-hardhat'

const { vars } = require("hardhat/config");
Copy link

Copilot AI Oct 6, 2025

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.

Suggested change
const { vars } = require("hardhat/config");

Copilot uses AI. Check for mistakes.
[['LayerZero Labs', 'Google Cloud'], []],
[20, 15],
[ENFORCED, ENFORCED],
],
Copy link

Copilot AI Oct 6, 2025

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.

Suggested change
],
],

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings October 6, 2025 21:08
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

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.

Comment on lines +44 to +45
console.log("RPC_URL_BSC_MAINNET",process.env.RPC_URL_BSC_MAINNET);
console.log("RPC_URL_ETH_MAINNET",process.env.RPC_URL_ETH_MAINNET);
Copy link

Copilot AI Oct 6, 2025

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.

Suggested change
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 uses AI. Check for mistakes.
eid: EndpointId.BSC_V2_MAINNET,
url: 'http://127.0.0.1:8545',
chainId: 56,
accounts: [process.env.PRIVATE_KEY || '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'],
Copy link

Copilot AI Oct 6, 2025

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.

Suggested change
accounts: [process.env.PRIVATE_KEY || '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'],
accounts: [process.env.PRIVATE_KEY],

Copilot uses AI. Check for mistakes.
import '@nomiclabs/hardhat-ethers'
import '@layerzerolabs/toolbox-hardhat'

const { vars } = require("hardhat/config");
Copy link

Copilot AI Oct 6, 2025

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';

Suggested change
const { vars } = require("hardhat/config");
import { vars } from 'hardhat/config';

Copilot uses AI. Check for mistakes.
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