-
Notifications
You must be signed in to change notification settings - Fork 5
evm develop #6
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
evm develop #6
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
…iler settings - Increased optimizer runs from 200 to 1,000,000 for better performance. - Added xLayer and xLayerTestnet configurations with RPC URLs and chain IDs. - Updated etherscan API keys for xLayer networks. - Upgraded @nomicfoundation/hardhat-verify package to version 2.1.3.
- Introduced run-xeth-test.sh for deploying and testing the xETH token on a local Anvil testnet. - Created TestXETH contract to comprehensively test all functions of the xETH token after deployment, including minting, transfers, approvals, and role management. - Implemented environment variable setup for private keys and RPC URL to facilitate testing.
- Introduced run-xsol-test.sh for deploying and testing the xSOL token on a local Anvil testnet. - Created TestXSOL contract to comprehensively test all functions of the xSOL token after deployment, including minting, transfers, approvals, and role management. - Added detailed documentation for xSOL test transactions, including test results and statistics. - Implemented environment variable setup for private keys and RPC URL to facilitate testing.
- Simplified etherscan API key configuration by setting a single key for xLayer. - Added sourcify configuration with disabled status for future integration.
…unctionality - Updated TestXETH and TestXSOL contracts to inherit from TestUtils, consolidating shared test logic. - Removed redundant deployment and testing code, streamlining the test process for both tokens. - Implemented token-specific configuration methods in TestUtils for better maintainability and clarity.
- Deleted the Deploy.xETH.testnet.s.sol file, which included the xETH token contract and its deployment logic. - This change streamlines the codebase by removing unused deployment scripts for the xETH token.
- Updated TestXETH and TestXSOL contracts to import xTokenTestUtils, consolidating shared test logic for xToken testing. - Introduced xTokenTestUtils as a new utility contract containing common test functions and configurations for xToken contracts, enhancing maintainability and clarity.
- Added ADMIN_PK and TEST_ACCOUNT_PK to .env.forge.example for use in test scripts, facilitating easier configuration for testing environments.
- Created a comprehensive documentation file for xBETH test transactions, detailing the testing process, transaction hashes, results, and statistics. - Included sections on contract deployment, exchange rate updates, caller management, minting, transfers, authorizations, and role management, ensuring clarity and thoroughness in the testing outcomes. - Documented the final state of the xBETH contract, including addresses, token information, account balances, and role assignments.
…ng in DeployXETH and updated DeployUtils to log proxy salt for improved transparency during contract deployment.
…ng in DeployXOKSOL, DeployXSOL, and updated DeployXETH to log a default value for proxy salt, improving consistency across deployment scripts.
…ts to reflect accurate branding and supply limits.
… reflect accurate branding as "OKX Wrapped Staked ETH" for xBETH and "OKX Wrapped Staked SOL" for xOKSOL.
…ute paths for StakedTokenV1 and xToken, enhancing code clarity and maintainability.
… xOKSOL, and xSOL to use absolute paths, improving code organization and clarity. Update max supply for xETH to 1 billion.
…configuration for deployment and testing.
…onsistent addresses the default (via EIP‑2470 CREATE2), and for staked tokens (xBETH/xOKSOL) replaced the previous multi-transaction oracle setup with a single-transaction “atomic deployer” approach to eliminate configuration windows.
…ize TimelockController for managing roles and permissions. Update environment variable from ADMIN to TIMELOCK_CALLER for improved governance structure. Enhance deployment process with deterministic address generation using EIP-2470.
The test failure was caused by a timestamp persistence issue in Foundry tests. Here's what happened: Root Cause In Foundry, block.timestamp persists between tests within the same test contract. Previous tests in RateLimitHarnessTest had warped the time forward, and when test_ReplenishAllowance_CorrectBehaviorAfterMultipleIntervals() ran, it started with block.timestamp = 432001 instead of the expected initial value of 1. The Problem The test was capturing configuredTimestamp = block.timestamp which was 432001 (left over from previous tests), then warping forward by INTERVAL * 5 (432000 seconds), resulting in: Expected: 432001 + 432000 = 864001 Actual: 432001 (the correct behavior after the replenish call) The Fix Added vm.warp(1) at the start of the test to reset the timestamp to a known state, and changed to capture configuredTimestamp from allowancesLastSet after calling configureCaller, ensuring the test has a clean, predictable starting point.
…ace TimelockCaller with TimelockAddress in environment variables. Update deployment logic to streamline the process and enhance clarity in the contract structure.
…rify token categories, and restructure project documentation for improved clarity and organization.
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.
非审计范围内的变更,主要是部署和测试脚本