forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 6
Pre release #105
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
Merged
Merged
Pre release #105
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Hex <[email protected]> Co-authored-by: niha <[email protected]> Co-authored-by: Ashitaka <[email protected]> Co-authored-by: AgusDuha <[email protected]>
* feat: add L1BlockCGT * feat: add L2ToL1MessagePasserCGT * chore: remove test exclution in test validation
* test(cgt): fix failing tests * test(cgt): fix portal version * test(cgt): skip tests on forked mode * fix: predeploys test cgt mismatch * test(cgt): minor fixes --------- Co-authored-by: niha <[email protected]>
Updates the implementation to use the new feature flagging system
Use the legacy config name so that less needs to change for legacy CGT chains
Remove leftover merge conflict
Add a specific test for CGT in the intent
Fix the build for this feature
Keeps it simple because development on Jovian is happening and we will inherit any Jovian modifications automatically
update parameters
Co-authored-by: louis.liu <[email protected]>
* Update MockOKB contract to mint a total supply of 660,000 * Separate MockOKB and setupCGT into 2 scripts - Updated the IOKB interface to inherit from IERC20Metadata, adding metadata functionality. - Created a new MockOKB contract for testing purposes, implementing ERC20 and ERC20Burnable. - The MockOKB contract includes a triggerBridge function to burn all tokens held by the sender. - Added a deployment script for the MockOKB token to facilitate testing of custom gas token configurations. * Enhance cgt-only-contract.sh for improved OKB token handling - Added logic to check for an existing OKB token address in the environment and verify its validity before deployment. - Implemented deployment of a MockOKB token if no address is found, with error handling for deployment failures. - Updated the script to export necessary environment variables and streamline the setup process for the Custom Gas Token (CGT). - Enhanced user feedback with detailed messages during each step, including success and error notifications. * Add require statement for gas token address validation in SetupCustomGasToken script - Introduced a require statement to ensure that the token address is set to the predefined constant for ETHER, enhancing validation during the setup process. - This change improves error handling by preventing incorrect configurations of the gas paying token. * Update example.env to include OKB token address configuration - Added a new environment variable `OKB_TOKEN_ADDRESS` to specify the OKB token address on L1. If not set, a new MockOKB will be deployed, enhancing flexibility in token management. * Refactor Custom Gas Token setup and verification scripts - Integrated the setup of the Custom Gas Token (CGT) into the `2-deploy-op-contracts.sh` script, enhancing the deployment process. - Created a new script `setup-cgt-function.sh` to encapsulate the CGT setup logic, improving modularity and maintainability. - Added a new test script `test-cgt.sh` for verifying CGT configuration and performing test deposits, ensuring comprehensive testing of the setup. - Removed the obsolete `cgt-only-contract.sh` script to streamline the codebase and eliminate redundancy. * Remove SystemConfig UpdateType GAS_PAYING_TOKEN event. gasPayingToken only set once, no need update event. * Update Dockerfile and .dockerignore for improved build process - Modified .dockerignore to include necessary directories and exclude generated files, enhancing build efficiency. - Updated Dockerfile to skip test files during the forge build process, streamlining the build and reducing unnecessary overhead. * refine okbAdapter contract * Optimize opstack Dockerfile build time - Modified Dockerfile to use a new target `build-go-no-submodules`, allowing for builds without submodules, improving flexibility. - Updated .dockerignore to include the Makefile, ensuring it is not ignored during the Docker build process. * Refactor output handling in setup_cgt function - Updated the `setup_cgt` function in `setup-cgt-function.sh` to pipe the output of the forge script commands to `tee`, allowing for real-time logging to the terminal. - Removed redundant echo statements for the output, streamlining the script and improving readability. * Update console log output in SetupCustomGasToken script - Changed the console log message for gasPayingToken to improve clarity, ensuring it reflects the function call format for better readability during execution. * Update environment configuration in test script - Backed up the existing .env file and replaced it with example.env to ensure the correct environment settings are used during testing. - Ensured the test script continues to execute the preparation of tests without interruption. * Remove duplicate balanceOf function from IOKB interface * fix script * Revert "Merge branch 'dev' into pre-release" This reverts commit b0c412e, reversing changes made to 97a978d. * forge fmt * Optimize dockerfile build time (#63) * Update Dockerfile and .dockerignore for improved build process - Modified .dockerignore to include necessary directories and exclude generated files, enhancing build efficiency. - Updated Dockerfile to skip test files during the forge build process, streamlining the build and reducing unnecessary overhead. * Optimize opstack Dockerfile build time - Modified Dockerfile to use a new target `build-go-no-submodules`, allowing for builds without submodules, improving flexibility. - Updated .dockerignore to include the Makefile, ensuring it is not ignored during the Docker build process. * Update .dockerignore to exclude .env file from Docker builds * Add read access for test configuration directory in foundry.toml Add L1 And L2 bridge test * Refactor DepositedOKBAdapter and introduce ERC20Rescuer contract - Removed the OKBBurner implementation and its related functionality from DepositedOKBAdapter, simplifying the contract. - Added a new ERC20Rescuer contract to handle the rescue of ERC20 tokens, enhancing token management. - Updated DepositedOKBAdapter to utilize the new rescuer address for transferring any mistakenly sent OKB tokens. - Cleaned up unnecessary events and errors related to the burner functionality, improving code clarity and maintainability. * Add new error for invalid gas token in IOptimismPortal2 interface * Enhance DepositedOKBAdapter with Whitelist Functionality and Owner Control - Introduced Ownable inheritance to manage ownership and access control. - Added a whitelist mechanism allowing only approved addresses to deposit OKB. - Implemented batch functions for adding and removing addresses from the whitelist. - Updated deposit logic to enforce whitelisting and added error handling for zero addresses. - Removed the ERC20Rescuer contract, consolidating rescue functionality within DepositedOKBAdapter. - Cleaned up unnecessary errors and improved overall contract clarity and maintainability. * Enhance DepositedOKBAdapter with Transfer Failure Handling - Introduced a new error for transfer failures to improve error handling. - Updated the constructor to transfer ownership to the specified owner after minting. - Modified transfer functions to check for successful token transfers, reverting on failure. - Improved overall contract robustness and clarity by handling potential transfer issues. * Refactor transfer error handling in DepositedOKBAdapter - Simplified the TransferNotAllowed error by removing parameters, enhancing clarity. - Updated transfer functions to always revert with the new error format, ensuring consistent error handling. - Improved code maintainability by reducing complexity in transfer logic. * Add comprehensive tests for DepositedOKBAdapter functionality - Introduced a new test suite for DepositedOKBAdapter, covering constructor validation, whitelist management, deposit functionality, transfer restrictions, and ERC20 rescue operations. - Implemented mock contracts for testing, including MockOKB and MockOptimismPortal2, to simulate interactions and validate behavior. - Enhanced test coverage to ensure robust error handling and correct functionality across various scenarios, including deposits by whitelisted users and handling of edge cases. - Improved overall test structure for better maintainability and clarity. * Update Dockerfile to use latest op-contracts image * Refactor SetupCustomGasToken script to remove OKBBurner implementation - Eliminated the OKBBurner contract from the SetupCustomGasToken script, simplifying the deployment process. - Updated the DepositedOKBAdapter deployment to handle OKB burning internally and added the deployer address to the whitelist. - Enhanced configuration checks to verify adapter ownership and whitelist status, ensuring robust contract setup. * Add tests for depositERC20Transaction in OptimismPortal2 - Introduced a new test contract to validate the depositERC20Transaction function. - Implemented various test cases to ensure correct behavior when using a custom gas token, including scenarios for invalid tokens, insufficient gas limits, and contract creation deposits. - Verified token transfers and ensured proper reverts for edge cases, enhancing overall test coverage for the OptimismPortal2 functionality. * forge fmt * add OKB mainnet address * Refactor DepositedOKBAdapter to clarify token minting and transfer restrictions - Updated comments to specify that deposit tokens are referred to as dOKB. - Enhanced transferFrom function to ensure only the portal can pull tokens from the adapter. - Added tests to verify that unauthorized transfer attempts from the portal revert correctly. * fix lint --------- Co-authored-by: albbm <[email protected]>
* update * update * update * update * update * Update m1 script * Fix conditional check for .env file * Update deploy contracts script `OKB_TOKEN_ADDRESS` * Push m1 updates * Update M2 to follow M1 * Step 3 updates * update * update * Change tarfile name in m1 and m2 scripts * Update m3 script * update * update * update * update * update * update * update * Reorder image vars * Omit .env as m2 runs in host * Changes to m3 * Update m1 to load m2 and m3 scripts * Update m2 * Drop m2 script * Push new m2 * update * update * update * update * Update README with new m1/m2 scripts * Omit date suffix from backup dir name * update * Update mount path for run container * update * update * To check block need to specify block number before * update * increase retry * refactor * increase timeout * update * update * Drop sleeps * update --------- Co-authored-by: Vui-Chee <[email protected]> Co-authored-by: cliff.yang <[email protected]>
…uction check in OPContractsManager.sol (#97)
* set deployer as systemConfigOwner first, after setup cgt finish, transfer ownership * Add OKB adapter owner address to SetupCustomGasToken script - Introduced `okbAdapterOwnerAddress` to the SetupCustomGasToken contract. - Updated deployment logic to use `okbAdapterOwnerAddress` instead of `deployerAddress`. - Modified environment configuration to include `OKB_ADAPTER_OWNER_ADDRESS` in local.env. * Enhance SetupCustomGasToken script to transfer adapter ownership - Updated the deployment logic to set the deployer as the initial owner of the DepositedOKBAdapter. - Added a new function to transfer adapter ownership to a designated owner address after deployment. - Modified the environment configuration to include `OKB_ADAPTER_OWNER_ADDRESS` for deployment.
… final owner (okbAdapterOwnerAddress) instead of deploying with deployer and then transferring - more efficient and cleaner deployment pattern. (#106) No whitelist
* update * update * update * update * update * Update m1 script * Fix conditional check for .env file * Update deploy contracts script `OKB_TOKEN_ADDRESS` * Push m1 updates * Update M2 to follow M1 * Step 3 updates * update * update * Change tarfile name in m1 and m2 scripts * Update m3 script * update * update * update * update * update * update * update * Reorder image vars * Omit .env as m2 runs in host * Changes to m3 * Update m1 to load m2 and m3 scripts * Update m2 * Drop m2 script * Push new m2 * update * update * update * update * Update README with new m1/m2 scripts * Omit date suffix from backup dir name * update * Update mount path for run container * update * update * To check block need to specify block number before * update * increase retry * refactor * increase timeout * update * update * Drop sleeps * update * before/after configs check * Set `EXPECTED_L1_CHAIN_ID` for fakemainnet * Fix print configuration issues * Fix timestamp not showing * update * recover * set deployer as systemConfigOwner first, after setup cgt finish, transfer ownership * Add OKB adapter owner address to SetupCustomGasToken script - Introduced `okbAdapterOwnerAddress` to the SetupCustomGasToken contract. - Updated deployment logic to use `okbAdapterOwnerAddress` instead of `deployerAddress`. - Modified environment configuration to include `OKB_ADAPTER_OWNER_ADDRESS` in local.env. * update * Enhance SetupCustomGasToken script to transfer adapter ownership - Updated the deployment logic to set the deployer as the initial owner of the DepositedOKBAdapter. - Added a new function to transfer adapter ownership to a designated owner address after deployment. - Modified the environment configuration to include `OKB_ADAPTER_OWNER_ADDRESS` for deployment. * update * Update `l2GenesisBlockBaseFeePerGas` in fakemainnet intent * Fix duplicate eip1559Denominator values * updates to m2 * Remove logs for these fields * Drop previous builds before building image * prompt delete backup dir if exists * Print sth if delete * Print `SystemConfigProxy` after regenesis * update * Match rollup.json `eip1559DenominatorCanyon` after migration... * Report removal of upload dir * Reduce verbosity and log upload filename * Tidy last log at shutdown --------- Co-authored-by: Vui-Chee <[email protected]> Co-authored-by: cliff.yang <[email protected]> Co-authored-by: Vui-Chee <[email protected]> Co-authored-by: jason.huang <[email protected]>
* update * Drop debug * Restore L2 num + hash after migrate * Revert to allow deploy contracts to succeed * Omit debug from build script * Pull out game factory adress from .env * update * update --------- Co-authored-by: Vui-Chee <[email protected]>
* Simplified Ownership Pattern: Deploying the adapter directly with the final owner (okbAdapterOwnerAddress) instead of deploying with deployer and then transferring - more efficient and cleaner deployment pattern. No whitelist * Add OKB adapter owner address to environment and update CGT setup script - Introduced `DEPLOYER_ADDRESS` and `OKB_ADAPTER_OWNER_ADDRESS` in `example.env` for better configuration. - Updated `setup-cgt-function.sh` to export the new adapter owner address. - Enhanced `test-cgt.sh` to verify the deployer as the adapter owner and streamline the setup process. * Updated comments to reflect the new order of operations in the script. * Enhance test-cgt.sh to dynamically set L2 recipient and display deposit details - Added retrieval of SYSTEM_CONFIG_PROXY_ADDRESS from state.json. - Updated deposit logic to use DEPLOYER_ADDRESS as the L2 recipient. - Included initial balance display for the L2 recipient before deposit. * Remove deprecated `cgt-only-contract.sh` script as it is no longer needed for the Custom Gas Token setup process. * Real script: test-pp-op/test-cgt.sh (the canonical version) Symlink: test/test-cgt.sh → ../test-pp-op/test-cgt.sh * move test-cgt to test/
* Copy migrate log * Execute verification from working dir * Copy verify script for upload * Last check to verify checksum of copied data * Use SOURCE_PATH and report success * indent * Add set_init_bond.sh * Add set initBond logic * use env params * fix set-init-bond wrong path * Use `diff` over `md5sum` * update * Simplify diff check * save mainnet intent toml * Adjust proposer and challenger addresses * Update intent mainnet * update systemConfigOwner * update --------- Co-authored-by: JimmyShi22 <[email protected]> Co-authored-by: Barry <[email protected]>
KyrinCode
approved these changes
Oct 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.