-
Notifications
You must be signed in to change notification settings - Fork 4
Feature: oft adapter step3 - deploy script and test #11
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: feat/oft-adapter-step2
Are you sure you want to change the base?
Conversation
…acts, including enabling hardhat-deploy and adding new network configurations for CELO and XDC
… management structures, and add deployment and configuration scripts for cross-chain functionality
…C network, enhance GoodDollarOFTAdapter with upgrade authorization event, and modify deployment scripts for improved functionality
…ant fee deduction details
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.
Sorry @blueogin, your pull request is larger than the review limit of 150000 diff characters
| function _authorizeUpgrade(address newImplementation) internal override onlyOwner { | ||
| // Authorization is handled by onlyOwner modifier | ||
| // Additional checks can be added here if needed | ||
| emit AuthorizedUpgrade(newImplementation); |
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.
no required
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.
Okay, It was required for UUPSUpgradeable contract.
I will use transparent model and remove that function
| "registry": "0x44a1E0A83821E239F9Cef248CECc3AC5b910aeD2" | ||
| }, | ||
| "development-celo": { | ||
| "GoodDollarMinterBurner": "0x3850786C7627Ce276EF6F715a0eF31d5FeCf1fc7", |
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 diffrenet file for oft
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.
Okay
| # 6. Test bridge functionality (optional, last step) | ||
| # | ||
| # Usage: | ||
| # ./scripts/multichain-deploy/oft/configure-oft-xdc-celo.sh |
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.
In general scripts should be hardhat scripts in typescript. not shell.
- the script should configure a single network ie configure-oft.ts --network development-xdc
- the script should be a hardhat script so --network is available
- all config values should be read from a json file ie oft.config.json (import config from './oft.config.json')
where each network/env has its entry in the config 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.
This file is rarely used in a production environment and is intended mainly as a reference.
Also, including all configuring logic into 1 script is not ideal I think
I’ll add an OFT_CONFIGURING_GUIDE file under scripts/oft to explain the configuration steps.
| echo "" | ||
|
|
||
| # Step 7: Test bridge (optional, last step) | ||
| if [ "$SKIP_BRIDGE_TEST" != "true" ]; then |
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 be separated into a different script. ( a hardhat script)
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.
I see
|
|
||
| // Encode the initialize function call | ||
| const initializeInterface = OFTAdapterFactory.interface; | ||
| const initializeData = initializeInterface.encodeFunctionData("initialize", [ |
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.
not used
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.
I will remove it
It's not required anymore
| @@ -0,0 +1,21 @@ | |||
| ONLY_WHITELISTED= # Whether only whitelisted addresses can bridge | |||
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 json with network-env keys
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.
Sure
| }, | ||
| contractSizer: { | ||
| runOnCompile: true, | ||
| runOnCompile: false, |
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.
why disabled?
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.
Because it was a bit frustrating to work with, I’ll revert it.
| } | ||
|
|
||
| /// @dev Struct for storing account limits | ||
| struct AccountLimit { |
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.
all of the fees and limits changes should have been applied on the step2 PR
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.
will move it to step2 PR
… unused dependencies in bridge-contracts
Feature: oft adapter step3 - deploy script and test
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
…nd to transparent in GoodDollarOFTAdapter and deployment script
…pts to reference new deployment file
…nd update set-minter-burner-limits script to utilize new config
…t for cleaner implementation
…and integrating IMessagePassingBridge for limit management
Description
This PR implements the deployment scripts and testing infrastructure for the GoodDollar OFT (Omnichain Fungible Token) adapter system. The implementation enables cross-chain bridging of GoodDollar tokens between XDC and CELO networks using LayerZero's OFT protocol.
About #7
How Has This Been Tested?
https://layerzeroscan.com/tx/0x3575146c0e395d46b4a3e09ec3ae79e1005ea6d4461765d6dc19d6aebed512bb
https://layerzeroscan.com/tx/0xa267c36a25337ea8d45d83de83a3e83a291ba4d2eaf0fd0393d365faf3c078e8
Checklist: