-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: change some tests #46
Merged
Merged
Conversation
This file contains 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
Foundry report forge 0.0.2 (48c6b1a 2024-11-13T00:24:02.674061760Z) Build logCompiling 79 files with Solc 0.8.28
installing solc version "0.8.28"
Successfully installed solc 0.8.28
Solc 0.8.28 finished in 3.31s
Compiler run successful with warnings:
Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
--> src/mocks/ERC721.sol:933:23:
|
933 | function tokenURI(uint256 id) public view override returns (string memory) {
| ^^^^^^^^^^
Warning (2018): Function state mutability can be restricted to pure
--> src/mocks/ERC721.sol:923:5:
|
923 | function name() public view override returns (string memory) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning (2018): Function state mutability can be restricted to pure
--> src/mocks/ERC721.sol:928:5:
|
928 | function symbol() public view override returns (string memory) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning (2018): Function state mutability can be restricted to pure
--> src/mocks/ERC721.sol:933:5:
|
933 | function tokenURI(uint256 id) public view override returns (string memory) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning (2018): Function state mutability can be restricted to view
--> test/PermissionlessRescuable.t.sol:63:3:
|
63 | function test_whoShouldReceiveFunds() public {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning (2018): Function state mutability can be restricted to view
--> test/UpgradeableOwnableWithGuardian.t.sol:29:3:
|
29 | function test_initializer() external {
| ^ (Relevant source part starts here and spans across multiple lines).
| Contract | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) |
|-----------------------------|------------------|-------------------|--------------------|---------------------|
| Address | 85 | 135 | 24,491 | 49,017 |
| ChainHelpers | 85 | 135 | 24,491 | 49,017 |
| ChainIds | 85 | 135 | 24,491 | 49,017 |
| Create2Utils | 162 | 212 | 24,414 | 48,940 |
| Create3 | 85 | 135 | 24,491 | 49,017 |
| Create3Factory | 1,094 | 1,122 | 23,482 | 48,030 |
| ERC1967Proxy | 170 | 1,226 | 24,406 | 47,926 |
| ERC20 | 2,331 | 3,020 | 22,245 | 46,132 |
| EnumerableSet | 85 | 135 | 24,491 | 49,017 |
| ImplOwnableWithGuardian | 1,464 | 1,492 | 23,112 | 47,660 |
| MockContract | 759 | 1,021 | 23,817 | 48,131 |
| MockERC721 | 2,421 | 2,449 | 22,155 | 46,703 |
| MockImpl | 465 | 690 | 24,111 | 48,462 |
| PermissionlessRescuable | 1,908 | 2,081 | 22,668 | 47,071 |
| ProxyAdmin | 1,640 | 1,758 | 22,936 | 47,394 |
| Rescuable | 1,807 | 1,958 | 22,769 | 47,194 |
| Rescuable721 | 2,043 | 2,201 | 22,533 | 46,951 |
| SafeCast | 85 | 135 | 24,491 | 49,017 |
| SafeERC20 | 85 | 135 | 24,491 | 49,017 |
| StorageSlot | 85 | 135 | 24,491 | 49,017 |
| TestNetChainIds | 85 | 135 | 24,491 | 49,017 |
| TransparentProxyFactory | 7,036 | 7,064 | 17,540 | 42,088 |
| TransparentUpgradeableProxy | 2,043 | 3,409 | 22,533 | 45,743 | Test success 🌈Compiling 42 files with Solc 0.8.24
Solc 0.8.24 finished in 1.50s
Compiler run successful!
Compiling 42 files with zksolc and ZKsync solc 0.8.24
zksolc and ZKsync solc 0.8.24 finished in 10.90s
Compiler run successful with warnings:
Warning
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Warning: Your code or one of its dependencies uses the 'extcodesize' instruction, which is │
│ usually needed in the following cases: │
│ 1. To detect whether an address belongs to a smart contract. │
│ 2. To detect whether the deploy code execution has finished. │
│ zkSync Era comes with native account abstraction support (so accounts are smart contracts, │
│ including private-key controlled EOAs), and you should avoid differentiating between contracts │
│ and non-contract addresses. │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
--> lib/forge-std/src/StdCheats.sol
Warning
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Warning: Your code or one of its dependencies uses the 'extcodesize' instruction, which is │
│ usually needed in the following cases: │
│ 1. To detect whether an address belongs to a smart contract. │
│ 2. To detect whether the deploy code execution has finished. │
│ zkSync Era comes with native account abstraction support (so accounts are smart contracts, │
│ including private-key controlled EOAs), and you should avoid differentiating between contracts │
│ and non-contract addresses. │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
--> lib/forge-std/src/StdUtils.sol
Warning
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Warning: It looks like you are using 'ecrecover' to validate a signature of a user account. │
│ zkSync Era comes with native account abstraction support, therefore it is highly recommended NOT │
│ to rely on the fact that the account has an ECDSA private key attached to it since accounts might│
│ implement other signature schemes. │
│ Read more about Account Abstraction at https://v2-docs.zksync.io/dev/developer-guides/aa.html │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
--> lib/forge-std/src/mocks/MockERC20.sol
Warning
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Warning: Your code or one of its dependencies uses the 'extcodesize' instruction, which is │
│ usually needed in the following cases: │
│ 1. To detect whether an address belongs to a smart contract. │
│ 2. To detect whether the deploy code execution has finished. │
│ zkSync Era comes with native account abstraction support (so accounts are smart contracts, │
│ including private-key controlled EOAs), and you should avoid differentiating between contracts │
│ and non-contract addresses. │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
--> lib/forge-std/src/mocks/MockERC721.sol
Ran 5 tests for zksync/test/TransparentProxyFactoryZkSync.t.sol:TestTransparentProxyFactoryZkSync
[PASS] testCreate(address) (runs: 256, μ: 2251771, ~: 2343479)
[PASS] testCreateDeterministic(address,bytes32) (runs: 256, μ: 2679856, ~: 2767978)
[PASS] testCreateDeterministicProxyAdmin(address,bytes32) (runs: 256, μ: 2021506, ~: 2106573)
[PASS] testCreateDeterministicWithDeterministicProxy(bytes32,bytes32) (runs: 256, μ: 2975087, ~: 2975087)
[PASS] testCreateProxyAdmin(address,bytes32) (runs: 256, μ: 1815211, ~: 1898551)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 10.23s (36.10s CPU time)
Ran 1 test suite in 10.23s (10.23s CPU time): 5 tests passed, 0 failed, 0 skipped (5 total tests) ⛽ Gas reportCreate3Factory
TransparentProxyFactory
ImplOwnableWithGuardian
Rescuable721
ImplOwnableWithGuardian
🔮 Coverage report
|
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.