Feature: oft adapter step3 - deploy script and test#11
Feature: oft adapter step3 - deploy script and test#11blueogin wants to merge 33 commits intofeat/oft-adapter-step2from
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.
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.
Okay, It was required for UUPSUpgradeable contract.
I will use transparent model and remove that function
There was a problem hiding this comment.
i ment that the emit event is not requred. we should use uups
| # 6. Test bridge functionality (optional, last step) | ||
| # | ||
| # Usage: | ||
| # ./scripts/multichain-deploy/oft/configure-oft-xdc-celo.sh |
There was a problem hiding this comment.
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.
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.
There was a problem hiding this comment.
we use hadhat-deploy scripts , see messagepassingbridge
| echo "" | ||
|
|
||
| # Step 7: Test bridge (optional, last step) | ||
| if [ "$SKIP_BRIDGE_TEST" != "true" ]; then |
There was a problem hiding this comment.
should be separated into a different script. ( a hardhat script)
… 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
| MinterBurner = await upgrades.deployProxy( | ||
| MinterBurnerFactory, | ||
| [nameServiceAddress], | ||
| { kind: "uups", initializer: "initialize" } |
There was a problem hiding this comment.
i dont understand. why this was changed. we use uups
| import fse from "fs-extra"; | ||
| import Contracts from "@gooddollar/goodprotocol/releases/deployment.json"; | ||
| import release from "../../release/deployment.json"; | ||
| import release from "../../release/deployment-oft.json"; |
There was a problem hiding this comment.
why are we not using hardhat-deploy for deployment scripts
|
|
||
| **Note**: Limit values can be specified in decimal format (e.g., "5000" for 5,000 G$). The scripts automatically convert them to wei (18 decimals). | ||
|
|
||
| ## Manual Configuration: Step-by-Step |
There was a problem hiding this comment.
we should have a hardhat deploy script just like messagepassingbridge has
| 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.
i ment that the emit event is not requred. we should use uups
| import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; | ||
| import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; | ||
| import { IMintableBurnable } from "@layerzerolabs/oft-evm/contracts/interfaces/IMintableBurnable.sol"; | ||
| import { BridgeHelperLibrary } from "../messagePassingBridge/BridgeHelperLibrary.sol"; |
There was a problem hiding this comment.
i'm totally confused by this. in the other PRs you dont use bridgehelperlibrary.
you need to be consistent
There was a problem hiding this comment.
IMessagePassingBridge and BridgeHelperLibrary imports are not necessary - will remove it
…code clarity and reduce dependencies
…te request approval mechanism to use bytes32 IDs, and implement request ID generation for improved limit management
… MinterBurner contracts
…oved clarity, implement request approval checks, and enforce limits on sending and receiving functions
…8.9 with optimizer settings and modify LayerZero config to reference the correct deployment file
…zation for enhanced fee management
…ove legacy deployment script; add set-oft-operator script for DAO governance integration
…directory structure
…yment scripts for improved clarity and functionality
…est handling in GoodDollarOFTAdapter, enhancing error management and contract clarity
…on and update tests for new constructor argument
…ollarOFTAdapter with implementation address retrieval and verification functionality
…oved error handling in receive requests
…DollarOFTAdapter, and adjust bridging amount and transaction limits in configuration
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: