Skip to content

Conversation

@doutv
Copy link
Collaborator

@doutv doutv commented Jan 7, 2026

非审计范围内的变更,主要是部署和测试脚本

doutv added 30 commits December 5, 2025 19:02
…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.
…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.
doutv added 4 commits January 6, 2026 11:40
…rify token categories, and restructure project documentation for improved clarity and organization.
@doutv doutv requested a review from lutianzhou001 January 7, 2026 03:52
@doutv doutv merged commit a342dbc into evm Jan 7, 2026
@doutv doutv deleted the evm-develop branch January 12, 2026 06:50
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