-
Notifications
You must be signed in to change notification settings - Fork 314
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: forge build
on linux/arm
#226
Merged
invocamanman
merged 2 commits into
0xPolygonHermez:develop
from
leovct:fix/forge-build-on-linux-arm
Mar 27, 2024
Merged
fix: forge build
on linux/arm
#226
invocamanman
merged 2 commits into
0xPolygonHermez:develop
from
leovct:fix/forge-build-on-linux-arm
Mar 27, 2024
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
Quality Gate passedIssues Measures |
A few more tests $ npm run coverage
> @0xpolygonhermez/zkevm-contracts@3.0.0 coverage
> npx hardhat coverage --testfiles "test/contractsv2/*.ts"
Version
=======
> solidity-coverage: v0.8.5
Instrumenting for coverage...
=============================
> deployment/PolygonZkEVMDeployer.sol
> lib/DepositContract.sol
> lib/EmergencyManager.sol
> lib/GlobalExitRootLib.sol
> lib/TokenWrapped.sol
> mainnetUpgraded/PolygonZkEVMUpgraded.sol
> PolygonZkEVM.sol
> PolygonZkEVMBridge.sol
> PolygonZkEVMGlobalExitRoot.sol
> PolygonZkEVMGlobalExitRootL2.sol
> PolygonZkEVMTimelock.sol
> testnet/PolygonZkEVMTestnetClearStorage.sol
> testnet/PolygonZkEVMTestnetV2.sol
> v2/consensus/validium/migration/PolygonRollupBaseEtrogNoGap.sol
> v2/consensus/validium/migration/PolygonValidiumStorageMigration.sol
> v2/consensus/validium/PolygonDataCommittee.sol
> v2/consensus/validium/PolygonValidiumEtrog.sol
> v2/consensus/zkEVM/PolygonZkEVMEtrog.sol
> v2/consensus/zkEVM/PolygonZkEVMExistentEtrog.sol
> v2/interfaces/IDataAvailabilityProtocol.sol
> v2/interfaces/IPolygonDataCommitteeErrors.sol
> v2/interfaces/IPolygonRollupBase.sol
> v2/interfaces/IPolygonRollupManager.sol
> v2/interfaces/IPolygonValidium.sol
> v2/interfaces/IPolygonZkEVMBridgeV2.sol
> v2/interfaces/IPolygonZkEVMGlobalExitRootV2.sol
> v2/interfaces/IPolygonZkEVMVEtrogErrors.sol
> v2/lib/DepositContractBase.sol
> v2/lib/DepositContractV2.sol
> v2/lib/LegacyZKEVMStateVariables.sol
> v2/lib/PolygonAccessControlUpgradeable.sol
> v2/lib/PolygonConstantsBase.sol
> v2/lib/PolygonRollupBaseEtrog.sol
> v2/lib/PolygonTransparentProxy.sol
> v2/lib/PolygonZkEVMGlobalExitRootBaseStorage.sol
> v2/mocks/BridgeReceiverMock.sol
> v2/mocks/PolygonRollupManagerEmptyMock.sol
> v2/mocks/PolygonRollupManagerMock.sol
> v2/mocks/PolygonRollupManagerMockInternalTest.sol
> v2/newDeployments/PolygonRollupManagerNotUpgraded.sol
> v2/PolygonRollupManager.sol
> v2/PolygonZkEVMBridgeV2.sol
> v2/PolygonZkEVMGlobalExitRootV2.sol
> v2/previousVersions/PolygonRollupBaseEtrogPrevious.sol
> v2/previousVersions/PolygonValidiumEtrogPrevious.sol
> v2/previousVersions/PolygonZkEVMEtrogPrevious.sol
> v2/utils/ClaimCompressor.sol
> verifiers/FflonkVerifier.sol
> verifiers/previousVerifiers/FflonkVerifierEtrog.sol
Coverage skipped for:
=====================
> interfaces/IBasePolygonZkEVMGlobalExitRoot.sol
> interfaces/IBridgeMessageReceiver.sol
> interfaces/IPolygonZkEVMBridge.sol
> interfaces/IPolygonZkEVMErrors.sol
> interfaces/IPolygonZkEVMGlobalExitRoot.sol
> interfaces/IVerifierRollup.sol
> mocks/DaiMock.sol
> mocks/DepositContractMock.sol
> mocks/ERC20InvalidMetadata.sol
> mocks/ERC20PermitMock.sol
> mocks/ERC20WeirdMetadata.sol
> mocks/PolygonZkEVMBridgeMock.sol
> mocks/PolygonZkEVMGlobalExitRootL2Mock.sol
> mocks/PolygonZkEVMGlobalExitRootMock.sol
> mocks/PolygonZkEVMMock.sol
> mocks/SequenceBatchesMock.sol
> mocks/Uni.sol
> mocks/VerifierRollupHelperMock.sol
Compilation:
============
Nothing to compile
No need to generate any newer typings.
Network Info
============
> HardhatEVM: v2.20.0
> network: hardhat
Warning: All subsequent Upgrades warnings will be silenced.
Make sure you have manually checked all uses of unsafe flags.
PolygonZkEVMBridge Contract
✔ should check the initialize parameters (65ms)
✔ should check bridgeMessageWETH reverts
✔ should PolygonZkEVM bridge asset and verify merkle proof (216ms)
✔ should PolygonZkEVM bridge asset and verify merkle proof (197ms)
✔ should PolygonZkEVMBridge message and verify merkle proof (133ms)
✔ should PolygonZkEVM bridge asset and message to check global exit root updates (280ms)
✔ should claim tokens from Mainnet to Mainnet (268ms)
✔ should claim tokens from Mainnet to Mainnet (263ms)
✔ should claim tokens from Rollup to Mainnet (605ms)
✔ should claim tokens from Rollup to Mainnet, faling deploy wrapped (207ms)
✔ should PolygonZkEVMBridge and sync the current root with events (178ms)
✔ should claim testing all the asserts (305ms)
✔ should claim ether (263ms)
✔ should claim message (414ms)
✔ should test emergency state (77ms)
PolygonZkEVMBridge Gas tokens tests
✔ should check the constructor parameters (56ms)
✔ should check the initalized function (48ms)
✔ should check the emergency state (67ms)
✔ should PolygonZkEVM bridge asset and verify merkle proof (184ms)
✔ should PolygonZkEVMBridge message and verify merkle proof (202ms)
✔ should PolygonZkEVM bridge asset and message to check global exit root updates (304ms)
✔ should claim Gas tokens from Mainnet to Mainnet (165ms)
✔ should claim tokens Gas tokens from Mainnet to Mainnet (240ms)
✔ should claim tokens from Rollup to Mainnet (579ms)
✔ should PolygonZkEVMBridge and sync the current root with events (180ms)
✔ should claim testing all the asserts (282ms)
✔ should claim ether (171ms)
✔ should claim message (273ms)
PolygonZkEVMBridge Contract
✔ should PolygonZkEVMBridge with weird token metadata (137ms)
✔ should PolygonZkEVMBridge with weird token metadata with reverts (205ms)
✔ should PolygonZkEVMBridge with weird token metadata with empty data (128ms)
✔ should PolygonZkEVMBridge with weird token metadata with invalid data (134ms)
✔ should PolygonZkEVMBridge and with permit eip-2612 compilant (321ms)
✔ should PolygonZkEVMBridge with permit DAI type contracts (280ms)
✔ should PolygonZkEVMBridge with permit UNI type contracts (364ms)
PolygonZkEVMBridge Contract
✔ should claim tokens from Rollup to Mainnet
Polygon Globlal exit root v2
✔ should check the initalized parameters
✔ should update root and check global exit root (92ms)
✔ should synch every root through events
Polygon Rollup Manager
✔ should check the initalized parameters (264ms)
✔ should check the emergency state (160ms)
✔ should check full flow etrog (1594ms)
✔ should check full flow with gas Token etrog (1048ms)
✔ should check full flow upgrading rollup etrog (1318ms)
✔ should check full flow upgrading validium storage migration (800ms)
✔ should add existing rollup and test full flow (824ms)
✔ Should test obsolete rollup (134ms)
✔ Should test global exit root (168ms)
Polygon Rollup manager upgraded
✔ Cannot initialzie again
✔ should check the initalized parameters (246ms)
✔ Check admin parameters (215ms)
✔ should check full flow etrog (1521ms)
✔ should check full flow no trusted aggreagtor (1985ms)
✔ Should test obsolete rollup (130ms)
✔ Should test global exit root (160ms)
PolygonZkEVMEtrog
✔ should check the initalized parameters (86ms)
✔ should check the initalized parameters (85ms)
✔ should check admin functions (344ms)
✔ should check admin functions data commitee (132ms)
✔ should generateInitializeTransaction with huge metadata (208ms)
✔ should check full flow (626ms)
✔ should check full flow with data commitee (600ms)
✔ should check full flow with wrapped gas token (406ms)
✔ should check forced batches and sequenced withou data commitee (376ms)
✔ should check forced batches (274ms)
✔ should check forced batches from a contract (172ms)
✔ should check forced batches from a contract (442ms)
PolygonZkEVMEtrog
✔ should check the initalized parameters (81ms)
✔ should check admin functions (205ms)
✔ should generateInitializeTransaction with huge metadata (203ms)
✔ should check full flow (781ms)
✔ should check full flow with wrapped gas token (419ms)
✔ should check forced batches (271ms)
✔ should check forced batches from a contract (170ms)
✔ should check forced batches from a contract (442ms)
75 passing (40s)
--------------------------------------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
--------------------------------------------|----------|----------|----------|----------|----------------|
contracts/ | 4.05 | 2.5 | 7.46 | 7.88 | |
PolygonZkEVM.sol | 2.15 | 1.35 | 5.13 | 7.08 |... 0,1687,1689 |
PolygonZkEVMBridge.sol | 0 | 0 | 0 | 0 |... 854,856,858 |
PolygonZkEVMGlobalExitRoot.sol | 100 | 83.33 | 100 | 100 | |
PolygonZkEVMGlobalExitRootL2.sol | 0 | 0 | 0 | 0 | 34,42,43,46 |
PolygonZkEVMTimelock.sol | 0 | 0 | 0 | 0 | 31,41,42,44 |
contracts/deployment/ | 0 | 0 | 0 | 0 | |
PolygonZkEVMDeployer.sol | 0 | 0 | 0 | 0 |... 60,73,75,86 |
contracts/lib/ | 14.29 | 17.86 | 29.41 | 18.87 | |
DepositContract.sol | 0 | 0 | 0 | 0 |... 113,117,139 |
EmergencyManager.sol | 100 | 62.5 | 100 | 90 | 53 |
GlobalExitRootLib.sol | 100 | 100 | 100 | 100 | |
TokenWrapped.sol | 0 | 0 | 0 | 0 |... 105,115,129 |
contracts/mainnetUpgraded/ | 0 | 0 | 25 | 8.33 | |
PolygonZkEVMUpgraded.sol | 0 | 0 | 25 | 8.33 |... 122,123,126 |
contracts/testnet/ | 0 | 0 | 0 | 0 | |
PolygonZkEVMTestnetClearStorage.sol | 100 | 100 | 0 | 0 | 48,49,50 |
PolygonZkEVMTestnetV2.sol | 0 | 0 | 0 | 0 | 49,50,52,54 |
contracts/v2/ | 99.42 | 86.86 | 100 | 96.9 | |
PolygonRollupManager.sol | 99.04 | 79.69 | 100 | 95.06 |... 2,1542,1560 |
PolygonZkEVMBridgeV2.sol | 100 | 99.12 | 100 | 100 | |
PolygonZkEVMGlobalExitRootV2.sol | 100 | 83.33 | 100 | 100 | |
contracts/v2/consensus/validium/ | 100 | 86 | 100 | 95.7 | |
PolygonDataCommittee.sol | 100 | 81.82 | 100 | 97.73 | 179 |
PolygonValidiumEtrog.sol | 100 | 89.29 | 100 | 93.88 | 110,196,246 |
contracts/v2/consensus/validium/migration/ | 0.81 | 2.42 | 16.67 | 4.72 | |
PolygonRollupBaseEtrogNoGap.sol | 1.08 | 1.09 | 11.11 | 3.77 |... 932,935,943 |
PolygonValidiumStorageMigration.sol | 0 | 6.25 | 33.33 | 7.55 |... 342,344,345 |
contracts/v2/consensus/zkEVM/ | 100 | 75 | 100 | 100 | |
PolygonZkEVMEtrog.sol | 100 | 100 | 100 | 100 | |
PolygonZkEVMExistentEtrog.sol | 100 | 75 | 100 | 100 | |
contracts/v2/interfaces/ | 100 | 100 | 100 | 100 | |
IDataAvailabilityProtocol.sol | 100 | 100 | 100 | 100 | |
IPolygonDataCommitteeErrors.sol | 100 | 100 | 100 | 100 | |
IPolygonRollupBase.sol | 100 | 100 | 100 | 100 | |
IPolygonRollupManager.sol | 100 | 100 | 100 | 100 | |
IPolygonValidium.sol | 100 | 100 | 100 | 100 | |
IPolygonZkEVMBridgeV2.sol | 100 | 100 | 100 | 100 | |
IPolygonZkEVMGlobalExitRootV2.sol | 100 | 100 | 100 | 100 | |
IPolygonZkEVMVEtrogErrors.sol | 100 | 100 | 100 | 100 | |
contracts/v2/lib/ | 94.89 | 86.44 | 90 | 93.55 | |
DepositContractBase.sol | 94.44 | 87.5 | 100 | 92 | 68,86 |
DepositContractV2.sol | 100 | 100 | 100 | 100 | |
LegacyZKEVMStateVariables.sol | 100 | 100 | 100 | 100 | |
PolygonAccessControlUpgradeable.sol | 62.5 | 28.57 | 69.23 | 63.64 |... 233,234,235 |
PolygonConstantsBase.sol | 100 | 100 | 100 | 100 | |
PolygonRollupBaseEtrog.sol | 100 | 94.57 | 100 | 97.48 |530,720,819,938 |
PolygonTransparentProxy.sol | 100 | 100 | 100 | 100 | |
PolygonZkEVMGlobalExitRootBaseStorage.sol | 100 | 100 | 100 | 100 | |
contracts/v2/mocks/ | 53.19 | 33.33 | 56.25 | 54.1 | |
BridgeReceiverMock.sol | 0 | 100 | 0 | 0 | 81,146,162 |
PolygonRollupManagerEmptyMock.sol | 77.78 | 50 | 75 | 72.73 | 16,24,35 |
PolygonRollupManagerMock.sol | 100 | 50 | 100 | 100 | |
PolygonRollupManagerMockInternalTest.sol | 0 | 0 | 0 | 0 |... 68,69,70,73 |
contracts/v2/newDeployments/ | 0 | 0 | 0 | 0 | |
PolygonRollupManagerNotUpgraded.sol | 0 | 0 | 0 | 0 |... 65,68,69,70 |
contracts/v2/previousVersions/ | 53.72 | 23.21 | 50 | 43.78 | |
PolygonRollupBaseEtrogPrevious.sol | 47.83 | 20.45 | 44.44 | 40.38 |... 871,884,910 |
PolygonValidiumEtrogPrevious.sol | 72.41 | 33.33 | 60 | 55.56 |... 277,279,280 |
PolygonZkEVMEtrogPrevious.sol | 100 | 100 | 100 | 100 | |
contracts/v2/utils/ | 0 | 0 | 0 | 0 | |
ClaimCompressor.sol | 0 | 0 | 0 | 0 |... 213,214,217 |
contracts/verifiers/ | 100 | 100 | 0 | 0 | |
FflonkVerifier.sol | 100 | 100 | 0 | 0 | 163 |
contracts/verifiers/previousVerifiers/ | 100 | 100 | 0 | 0 | |
FflonkVerifierEtrog.sol | 100 | 100 | 0 | 0 | 190 |
--------------------------------------------|----------|----------|----------|----------|----------------|
All files | 52.93 | 42.01 | 53.9 | 51.73 | |
--------------------------------------------|----------|----------|----------|----------|----------------|
> Istanbul reports written to ./coverage/ and ./coverage.json $ npm run gas:report
> @0xpolygonhermez/zkevm-contracts@3.0.0 gas:report
> REPORT_GAS=true npx hardhat test
Warning: Return value of low-level calls not used.
--> contracts/PolygonZkEVMBridge.sol:726:13:
|
726 | address(token).call(
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Return value of low-level calls not used.
--> contracts/PolygonZkEVMBridge.sol:778:13:
|
778 | address(token).call(
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Return value of low-level calls not used.
--> contracts/mocks/SequenceBatchesMock.sol:16:9:
|
16 | destination.call(data);
| ^^^^^^^^^^^^^^^^^^^^^^
Warning: Return value of low-level calls not used.
--> contracts/v2/PolygonZkEVMBridgeV2.sol:957:13:
|
957 | address(token).call(
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Return value of low-level calls not used.
--> contracts/v2/PolygonZkEVMBridgeV2.sol:1009:13:
|
1009 | address(token).call(
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
--> contracts/v2/mocks/PolygonRollupManagerEmptyMock.sol:34:25:
|
34 | ) external returns (uint64) {
| ^^^^^^
Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> contracts/mocks/PolygonZkEVMMock.sol:217:9:
|
217 | uint256[2] calldata proofA,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> contracts/mocks/PolygonZkEVMMock.sol:218:9:
|
218 | uint256[2][2] calldata proofB,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> contracts/mocks/PolygonZkEVMMock.sol:219:9:
|
219 | uint256[2] calldata proofC
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: Unused local variable.
--> contracts/mocks/PolygonZkEVMMock.sol:268:9:
|
268 | bytes memory snarkHashBytes = getInputSnarkBytes(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> contracts/mocks/VerifierRollupHelperMock.sol:9:9:
|
9 | bytes32[24] calldata proof,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> contracts/mocks/VerifierRollupHelperMock.sol:10:9:
|
10 | uint256[1] memory pubSignals
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> contracts/v2/mocks/PolygonRollupManagerEmptyMock.sol:21:9:
|
21 | bytes32 newAccInputHash
| ^^^^^^^^^^^^^^^^^^^^^^^
Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> contracts/v2/mocks/PolygonRollupManagerMockInternalTest.sol:27:9:
|
27 | PolygonZkEVMExistentEtrog polygonZkEVM,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> contracts/v2/mocks/PolygonRollupManagerMockInternalTest.sol:28:9:
|
28 | IVerifierRollup zkEVMVerifier,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> contracts/v2/mocks/PolygonRollupManagerMockInternalTest.sol:29:9:
|
29 | uint64 zkEVMForkID,
| ^^^^^^^^^^^^^^^^^^
Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> contracts/v2/mocks/PolygonRollupManagerMockInternalTest.sol:30:9:
|
30 | uint64 zkEVMChainID
| ^^^^^^^^^^^^^^^^^^^
Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> contracts/verifiers/FflonkVerifier.sol:162:26:
|
162 | function verifyProof(bytes32[24] calldata proof, uint256[1] calldata pubSignals) public view returns (bool) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> contracts/verifiers/previousVerifiers/FflonkVerifierEtrog.sol:187:9:
|
187 | bytes32[24] calldata proof,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: Function state mutability can be restricted to pure
--> contracts/v2/mocks/PolygonRollupManagerEmptyMock.sol:38:5:
|
38 | function getBatchFee() public view returns (uint256) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Function state mutability can be restricted to pure
--> contracts/v2/mocks/PolygonRollupManagerEmptyMock.sol:42:5:
|
42 | function getForcedBatchFee() public view returns (uint256) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Function state mutability can be restricted to pure
--> contracts/v2/mocks/PolygonRollupManagerEmptyMock.sol:57:5:
|
57 | function lastDeactivatedEmergencyStateTimestamp()
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Contract code size is 27945 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> contracts/mocks/PolygonZkEVMMock.sol:12:1:
|
12 | contract PolygonZkEVMMock is PolygonZkEVM {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Contract code size is 28940 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> contracts/v2/PolygonRollupManager.sol:24:1:
|
24 | contract PolygonRollupManager is
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Contract code size is 26532 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> contracts/v2/PolygonZkEVMBridgeV2.sol:19:1:
|
19 | contract PolygonZkEVMBridgeV2 is
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Contract code size is 28094 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> contracts/v2/mocks/PolygonRollupManagerMockInternalTest.sol:8:1:
|
8 | contract PolygonRollupManagerMockInternalTest is PolygonRollupManager {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Return value of low-level calls not used.
--> contracts/v2/PolygonZkEVMBridgeV2.sol:957:13:
|
957 | address(token).call(
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Return value of low-level calls not used.
--> contracts/v2/PolygonZkEVMBridgeV2.sol:1009:13:
|
1009 | address(token).call(
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Return value of low-level calls not used.
--> contracts/v2/PolygonZkEVMBridgeV2.sol:957:13:
|
957 | address(token).call(
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Return value of low-level calls not used.
--> contracts/v2/PolygonZkEVMBridgeV2.sol:1009:13:
|
1009 | address(token).call(
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Contract code size is 26532 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> contracts/v2/PolygonZkEVMBridgeV2.sol:19:1:
|
19 | contract PolygonZkEVMBridgeV2 is
| ^ (Relevant source part starts here and spans across multiple lines).
contracts/mocks/Uni.sol:10:1: Warning: Experimental features are turned on. Do not use experimental features on live deployments.
pragma experimental ABIEncoderV2;
^-------------------------------^
Compiled 123 Solidity files successfully (evm targets: istanbul, petersburg, shanghai).
Warning: All subsequent Upgrades warnings will be silenced.
Make sure you have manually checked all uses of unsafe flags.
PolygonZkEVMBridge Contract
✔ should check the constructor parameters
✔ should PolygonZkEVM bridge asset and verify merkle proof
✔ should PolygonZkEVMBridge message and verify merkle proof
✔ should PolygonZkEVM bridge asset and message to check global exit root updates
1) should claim tokens from Mainnet to Mainnet
2) should claim tokens from Rollup to Mainnet
3) should PolygonZkEVMBridge and sync the current root with events
4) should claim testing all the asserts
✔ should claim ether
✔ should claim message
PolygonZkEVMBridge Mock Contract
5) "before each" hook: Deploy contracts for "should check the constructor parameters"
PolygonZkEVMBridge Contract werid metadata
6) "before each" hook: Deploy contracts for "should PolygonZkEVMBridge with weird token metadata"
PolygonZkEVMBridge Contract Permit tests
7) "before each" hook: Deploy contracts for "should PolygonZkEVMBridge and with permit eip-2612 compilant"
Deposit Contract
✔ should deposit and verify merkle proof
✔ should deposit and verify merkle proof with 2 leafs
✔ should create a more exhaustive merkle tree test
Emergency mode test
8) "before each" hook: Deploy contract for "should activate emergency mode"
Global Exit Root
9) "before each" hook: Deploy contracts for "should check the constructor parameters"
Global Exit Root L2
✔ should check the constructor parameters
10) should update root and check global exit root
11) should update root and check the storage position matches
Polygon ZK-EVM
12) "before each" hook: Deploy contract for "should check the constructor parameters"
Polygon ZK-EVM Deployer
13) "before each" hook: Deploy contract for "should check the owner"
Polygon ZK-EVM TestnetV2
14) "before each" hook: Deploy contract for "should check the constructor parameters"
PolygonZkEVMUpgraded
15) "before each" hook: Deploy contract for "should check the constructor parameters"
Real prover inputs test
16) Test real prover
Polygon ZK-EVM snark stark input test
17) "before each" hook: Deploy contract for "Check Accumulate input Hash"
Polygon ZK-EVM
18) "before each" hook: Deploy contract for "Should upgrade brdige correctly"
should export index
✔ should validate all abi exports
PolygonZkEVMBridge Contract
✔ should check the initialize parameters
✔ should check bridgeMessageWETH reverts
✔ should PolygonZkEVM bridge asset and verify merkle proof
✔ should PolygonZkEVM bridge asset and verify merkle proof
✔ should PolygonZkEVMBridge message and verify merkle proof
✔ should PolygonZkEVM bridge asset and message to check global exit root updates
✔ should claim tokens from Mainnet to Mainnet
✔ should claim tokens from Mainnet to Mainnet
✔ should claim tokens from Rollup to Mainnet
✔ should claim tokens from Rollup to Mainnet, faling deploy wrapped
✔ should PolygonZkEVMBridge and sync the current root with events
✔ should claim testing all the asserts
✔ should claim ether
✔ should claim message
✔ should test emergency state
PolygonZkEVMBridge Gas tokens tests
✔ should check the constructor parameters
✔ should check the initalized function
✔ should check the emergency state
✔ should PolygonZkEVM bridge asset and verify merkle proof
✔ should PolygonZkEVMBridge message and verify merkle proof
✔ should PolygonZkEVM bridge asset and message to check global exit root updates
✔ should claim Gas tokens from Mainnet to Mainnet
✔ should claim tokens Gas tokens from Mainnet to Mainnet
✔ should claim tokens from Rollup to Mainnet
✔ should PolygonZkEVMBridge and sync the current root with events
✔ should claim testing all the asserts
✔ should claim ether
✔ should claim message
PolygonZkEVMBridge Contract
✔ should PolygonZkEVMBridge with weird token metadata
✔ should PolygonZkEVMBridge with weird token metadata with reverts
✔ should PolygonZkEVMBridge with weird token metadata with empty data
✔ should PolygonZkEVMBridge with weird token metadata with invalid data
✔ should PolygonZkEVMBridge and with permit eip-2612 compilant
✔ should PolygonZkEVMBridge with permit DAI type contracts
✔ should PolygonZkEVMBridge with permit UNI type contracts
PolygonZkEVMBridge Contract
✔ should claim tokens from Rollup to Mainnet
Polygon Globlal exit root v2
✔ should check the initalized parameters
✔ should update root and check global exit root
✔ should synch every root through events
Polygon Rollup Manager
✔ should check the initalized parameters
✔ should check the emergency state
✔ should check full flow etrog
✔ should check full flow with gas Token etrog
✔ should check full flow upgrading rollup etrog
✔ should check full flow upgrading validium storage migration
✔ should add existing rollup and test full flow
✔ Should test obsolete rollup
✔ Should test global exit root
Polygon Rollup manager upgraded
✔ Cannot initialzie again
✔ should check the initalized parameters
✔ Check admin parameters
✔ should check full flow etrog
✔ should check full flow no trusted aggreagtor
✔ Should test obsolete rollup
✔ Should test global exit root
PolygonZkEVMEtrog
✔ should check the initalized parameters
✔ should check the initalized parameters
✔ should check admin functions
✔ should check admin functions data commitee
✔ should generateInitializeTransaction with huge metadata
✔ should check full flow
✔ should check full flow with data commitee
✔ should check full flow with wrapped gas token
✔ should check forced batches and sequenced withou data commitee
✔ should check forced batches
✔ should check forced batches from a contract
✔ should check forced batches from a contract
PolygonZkEVMEtrog
✔ should check the initalized parameters
✔ should check admin functions
✔ should generateInitializeTransaction with huge metadata
✔ should check full flow
✔ should check full flow with wrapped gas token
✔ should check forced batches
✔ should check forced batches from a contract
✔ should check forced batches from a contract
Claim Compressor Contract
✔ should check random values
{ numClaims: 1, gasUsed: 1476238n }
{ numClaims: 2, gasUsed: 1505958n }
{ numClaims: 3, gasUsed: 2889215n }
{ numClaims: 4, gasUsed: 2916945n }
{ numClaims: 5, gasUsed: 2946725n }
{ numClaims: 6, gasUsed: 4328974n }
{ numClaims: 7, gasUsed: 5712253n }
{ numClaims: 8, gasUsed: 5739865n }
{ numClaims: 9, gasUsed: 7125194n }
✔ should test against bridge
19) should check Compression
·--------------------------------------------------------------------------------------------------------------|---------------------------|----------------|-----------------------------·
| Solc version: 0.8.17 · Optimizer enabled: true · Runs: 999999 · Block limit: 30000000 gas │
···············································································································|···························|················|······························
| Methods │
········································································|······································|·············|·············|················|···············|··············
| Contract · Method · Min · Max · Avg · # calls · usd (avg) │
········································································|······································|·············|·············|················|···············|··············
| @openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin · upgrade · - · - · 39106 · 3 · - │
········································································|······································|·············|·············|················|···············|··············
| @openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin · upgradeAndCall · 913418 · 913430 · 913428 · 7 · - │
········································································|······································|·············|·············|················|···············|··············
| ClaimCompressor · sendCompressedClaims · 68142 · 7125194 · 1464707 · 58 · - │
········································································|······································|·············|·············|················|···············|··············
| DaiMock · mint · - · - · 70479 · 1 · - │
········································································|······································|·············|·············|················|···············|··············
| DepositContractMock · deposit · 31531 · 68783 · 36369 · 106 · - │
········································································|······································|·············|·············|················|···············|··············
| ERC20 · approve · - · - · 46259 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| ERC20InvalidMetadata · approve · - · - · 46255 · 1 · - │
········································································|······································|·············|·············|················|···············|··············
| ERC20InvalidMetadata · mint · - · - · 68266 · 1 · - │
········································································|······································|·············|·············|················|···············|··············
| ERC20PermitMock · approve · 46171 · 46231 · 46223 · 48 · - │
········································································|······································|·············|·············|················|···············|··············
| ERC20PermitMock · transfer · 51395 · 51407 · 51397 · 49 · - │
········································································|······································|·············|·············|················|···············|··············
| ERC20WeirdMetadata · approve · - · - · 46255 · 3 · - │
········································································|······································|·············|·············|················|···············|··············
| ERC20WeirdMetadata · mint · - · - · 68266 · 3 · - │
········································································|······································|·············|·············|················|···············|··············
| ERC20WeirdMetadata · toggleIsRevert · - · - · 43399 · 1 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonDataCommittee · setupCommittee · 59794 · 240736 · 214887 · 7 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupBaseEtrogPrevious · sequenceBatches · - · - · 195197 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManager · addExistingRollup · - · - · 173483 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManager · addNewRollupType · 111328 · 128440 · 122739 · 24 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManager · consolidatePendingState · - · - · 220785 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManager · createNewRollup · 761307 · 832166 · 799577 · 24 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManager · obsoleteRollupType · - · - · 40166 · 26 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManager · overridePendingState · - · - · 243622 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManager · proveNonDeterministicPendingState · - · - · 86233 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManager · setBatchFee · - · - · 38158 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManager · updateRollup · 67271 · 97210 · 82241 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManager · verifyBatches · 194082 · 359944 · 279038 · 6 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManager · verifyBatchesTrustedAggregator · 256536 · 285167 · 274356 · 20 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManagerEmptyMock · activateEmergencyState · - · - · 44268 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManagerEmptyMock · deactivateEmergencyState · - · - · 22402 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManagerMock · initializeMock · - · - · 514120 · 9 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonRollupManagerMock · prepareMockCalculateRoot · 55064 · 74964 · 66171 · 6 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · acceptAdminRole · - · - · 29657 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · forceBatch · - · - · 116434 · 6 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · initialize · 237421 · 291113 · 242790 · 20 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · sequenceBatches · 128089 · 207860 · 187195 · 14 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · sequenceBatchesValidium · 124174 · 162976 · 143575 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · sequenceForceBatches · 81650 · 151614 · 122593 · 6 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · setDataAvailabilityProtocol · 30050 · 52132 · 37886 · 5 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · setForceBatchAddress · 25110 · 35132 · 30951 · 12 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · setForceBatchTimeout · 30408 · 52193 · 41301 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · setTrustedSequencer · - · - · 30048 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · setTrustedSequencerURL · 28830 · 31630 · 30230 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · switchSequenceWithDataAvailability · - · - · 46749 · 6 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · transferAdminRole · - · - · 47171 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonValidiumEtrogPrevious · sequenceBatchesValidium · - · - · 213054 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVM · acceptAdminRole · - · - · 34569 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVM · deactivateEmergencyState · 36544 · 78250 · 63591 · 7 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVM · forceBatch · - · - · 127074 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVM · initialize · 264679 · 284590 · 282101 · 8 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVM · setForceBatchTimeout · - · - · 47482 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVM · setMultiplierBatchFee · - · - · 37456 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVM · setPendingStateTimeout · 40091 · 40255 · 40196 · 3 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVM · setTrustedAggregatorTimeout · - · - · 39919 · 1 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVM · setTrustedSequencer · - · - · 35030 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVM · setTrustedSequencerURL · - · - · 36621 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVM · setVerifyBatchTimeTarget · - · - · 38066 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVM · transferAdminRole · - · - · 52086 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMBridge · activateEmergencyState · 36511 · 72312 · 54572 · 10 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMBridge · bridgeAsset · 49842 · 261181 · 176505 · 68 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMBridge · bridgeMessage · 69984 · 156834 · 115313 · 10 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMBridge · claimAsset · - · - · 99834 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMBridge · claimMessage · - · - · 100823 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMBridge · initialize · - · - · 100152 · 10 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMBridge · updateGlobalExitRoot · 32672 · 104588 · 83359 · 15 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMBridgeV2 · bridgeMessageWETH · 78391 · 162943 · 120667 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMBridgeV2 · claimAsset · 122770 · 1491108 · 957701 · 66 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMBridgeV2 · claimMessage · 131580 · 174536 · 157354 · 5 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMBridgeV2 · initialize · 121549 · 1606425 · 378946 · 75 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMEtrog · acceptAdminRole · - · - · 29612 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMEtrog · forceBatch · - · - · 116329 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMEtrog · initialize · 237379 · 291071 · 245049 · 14 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMEtrog · sequenceBatches · 113519 · 168091 · 137410 · 6 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMEtrog · sequenceForceBatches · - · - · 81563 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMEtrog · setForceBatchAddress · 25132 · 30172 · 27652 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMEtrog · setForceBatchTimeout · 30401 · 52186 · 41294 · 4 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMEtrog · setTrustedSequencer · - · - · 30070 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMEtrog · setTrustedSequencerURL · - · - · 31652 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMEtrog · transferAdminRole · - · - · 47126 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMExistentEtrog · initializeUpgrade · - · - · 288840 · 1 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMExistentEtrog · sequenceBatches · - · - · 190891 · 2 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMGlobalExitRoot · updateExitRoot · 70009 · 122455 · 76832 · 42 · - │
········································································|······································|·············|·············|················|···············|··············
| PolygonZkEVMGlobalExitRootL2Mock · setLastGlobalExitRoot · - · - · 44142 · 1 · - │
········································································|······································|·············|·············|················|···············|··············
| SendData · sendData · 50730 · 121460 · 97832 · 6 · - │
········································································|······································|·············|·············|················|···············|··············
| TokenWrapped · mint · - · - · 68318 · 3 · - │
········································································|······································|·············|·············|················|···············|··············
| Uni · mint · - · - · 45101 · 1 · - │
········································································|······································|·············|·············|················|···············|··············
| Deployments · · % of limit · │
···············································································································|·············|·············|················|···············|··············
| BridgeReceiverMock · - · - · 257996 · 0.9 % · - │
···············································································································|·············|·············|················|···············|··············
| ClaimCompressor · 778267 · 778279 · 778276 · 2.6 % · - │
···············································································································|·············|·············|················|···············|··············
| DaiMock · - · - · 1236635 · 4.1 % · - │
···············································································································|·············|·············|················|···············|··············
| DepositContractMock · - · - · 633313 · 2.1 % · - │
···············································································································|·············|·············|················|···············|··············
| ERC20InvalidMetadata · - · - · 737890 · 2.5 % · - │
···············································································································|·············|·············|················|···············|··············
| ERC20PermitMock · 1312672 · 1312720 · 1312701 · 4.4 % · - │
···············································································································|·············|·············|················|···············|··············
| ERC20WeirdMetadata · 794405 · 834965 · 821321 · 2.7 % · - │
···············································································································|·············|·············|················|···············|··············
| FflonkVerifier · - · - · 5012704 · 16.7 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonDataCommittee · - · - · 1280027 · 4.3 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonRollupManagerEmptyMock · - · - · 330649 · 1.1 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonRollupManagerMock · 5360410 · 5360422 · 5360419 · 17.9 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonValidiumEtrog · 4387695 · 4387707 · 4387703 · 14.6 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonValidiumEtrogPrevious · - · - · 4292893 · 14.3 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonValidiumStorageMigration · - · - · 4504749 · 15 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonZkEVMBridge · - · - · 5049384 · 16.8 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonZkEVMBridgeMock · - · - · 5272849 · 17.6 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonZkEVMBridgeV2 · - · - · 4986598 · 16.6 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonZkEVMDeployer · - · - · 709033 · 2.4 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonZkEVMEtrog · 3644597 · 3644621 · 3644617 · 12.1 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonZkEVMEtrogPrevious · - · - · 3595795 · 12 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonZkEVMExistentEtrog · 4030389 · 4030413 · 4030406 · 13.4 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonZkEVMGlobalExitRoot · 228464 · 228476 · 228474 · 0.8 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonZkEVMGlobalExitRootL2Mock · - · - · 171400 · 0.6 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonZkEVMGlobalExitRootV2 · 621180 · 621204 · 621200 · 2.1 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonZkEVMMock · - · - · 6037434 · 20.1 % · - │
···············································································································|·············|·············|················|···············|··············
| PolygonZkEVMUpgraded · 5299307 · 5299319 · 5299312 · 17.7 % · - │
···············································································································|·············|·············|················|···············|··············
| SendData · - · - · 173851 · 0.6 % · - │
···············································································································|·············|·············|················|···············|··············
| Uni · - · - · 2859890 · 9.5 % · - │
···············································································································|·············|·············|················|···············|··············
| VerifierRollupHelperMock · - · - · 125183 · 0.4 % · - │
·--------------------------------------------------------------------------------------------------------------|-------------|-------------|----------------|---------------|-------------·
88 passing (2m)
19 failing
1) PolygonZkEVMBridge Contract
should claim tokens from Mainnet to Mainnet:
TypeError: The first argument of .revertedWithCustomError must be the contract that defines the custom error
at validateInput (node_modules/@nomicfoundation/hardhat-chai-matchers/src/internal/reverted/revertedWithCustomError.ts:158:13)
at Proxy.<anonymous> (node_modules/@nomicfoundation/hardhat-chai-matchers/src/internal/reverted/revertedWithCustomError.ts:40:46)
at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:289:22)
at Proxy.<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:255:20)
at Proxy.overwritingMethodWrapper (node_modules/chai/lib/chai/utils/overwriteMethod.js:78:33)
at Context.<anonymous> (test/contracts/bridge.test.js:381:18)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
2) PolygonZkEVMBridge Contract
should claim tokens from Rollup to Mainnet:
Error: The given contract doesn't have a custom error named 'OnlyAllowedContracts'
at validateInput (node_modules/@nomicfoundation/hardhat-chai-matchers/src/internal/reverted/revertedWithCustomError.ts:173:13)
at Proxy.<anonymous> (node_modules/@nomicfoundation/hardhat-chai-matchers/src/internal/reverted/revertedWithCustomError.ts:40:46)
at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:289:22)
at Proxy.<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:255:20)
at Proxy.overwritingMethodWrapper (node_modules/chai/lib/chai/utils/overwriteMethod.js:78:33)
at Context.<anonymous> (test/contracts/bridge.test.js:462:20)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
3) PolygonZkEVMBridge Contract
should PolygonZkEVMBridge and sync the current root with events:
TypeError: Cannot mix BigInt and other types, use explicit conversions
at Context.<anonymous> (test/contracts/bridge.test.js:745:30)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
4) PolygonZkEVMBridge Contract
should claim testing all the asserts:
Error: The given contract doesn't have a custom error named 'ERC20: transfer amount exceeds balance'
at validateInput (node_modules/@nomicfoundation/hardhat-chai-matchers/src/internal/reverted/revertedWithCustomError.ts:173:13)
at Proxy.<anonymous> (node_modules/@nomicfoundation/hardhat-chai-matchers/src/internal/reverted/revertedWithCustomError.ts:40:46)
at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:289:22)
at Proxy.<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:255:20)
at Proxy.overwritingMethodWrapper (node_modules/chai/lib/chai/utils/overwriteMethod.js:78:33)
at Context.<anonymous> (test/contracts/bridge.test.js:873:18)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
5) PolygonZkEVMBridge Mock Contract
"before each" hook: Deploy contracts for "should check the constructor parameters":
TypeError: unsupported addressable value (argument="target", value=null, code=INVALID_ARGUMENT, version=6.8.0)
at makeError (node_modules/ethers/src.ts/utils/errors.ts:687:21)
at assert (node_modules/ethers/src.ts/utils/errors.ts:715:25)
at assertArgument (node_modules/ethers/src.ts/utils/errors.ts:727:5)
at resolveAddress (node_modules/ethers/src.ts/address/checks.ts:122:19)
at /zkevm-contracts/node_modules/ethers/src.ts/contract/contract.ts:172:60
at ParamType.#walkAsync (node_modules/ethers/src.ts/abi/fragments.ts:777:24)
at ParamType.walkAsync (node_modules/ethers/src.ts/abi/fragments.ts:795:24)
at /zkevm-contracts/node_modules/ethers/src.ts/contract/contract.ts:170:22
at Array.map (<anonymous>)
at resolveArgs (node_modules/ethers/src.ts/contract/contract.ts:169:37)
6) PolygonZkEVMBridge Contract werid metadata
"before each" hook: Deploy contracts for "should PolygonZkEVMBridge with weird token metadata":
TypeError: unsupported addressable value (argument="target", value=null, code=INVALID_ARGUMENT, version=6.8.0)
at makeError (node_modules/ethers/src.ts/utils/errors.ts:687:21)
at assert (node_modules/ethers/src.ts/utils/errors.ts:715:25)
at assertArgument (node_modules/ethers/src.ts/utils/errors.ts:727:5)
at resolveAddress (node_modules/ethers/src.ts/address/checks.ts:122:19)
at /zkevm-contracts/node_modules/ethers/src.ts/contract/contract.ts:172:60
at ParamType.#walkAsync (node_modules/ethers/src.ts/abi/fragments.ts:777:24)
at ParamType.walkAsync (node_modules/ethers/src.ts/abi/fragments.ts:795:24)
at /zkevm-contracts/node_modules/ethers/src.ts/contract/contract.ts:170:22
at Array.map (<anonymous>)
at resolveArgs (node_modules/ethers/src.ts/contract/contract.ts:169:37)
7) PolygonZkEVMBridge Contract Permit tests
"before each" hook: Deploy contracts for "should PolygonZkEVMBridge and with permit eip-2612 compilant":
TypeError: unsupported addressable value (argument="target", value=null, code=INVALID_ARGUMENT, version=6.8.0)
at makeError (node_modules/ethers/src.ts/utils/errors.ts:687:21)
at assert (node_modules/ethers/src.ts/utils/errors.ts:715:25)
at assertArgument (node_modules/ethers/src.ts/utils/errors.ts:727:5)
at resolveAddress (node_modules/ethers/src.ts/address/checks.ts:122:19)
at /zkevm-contracts/node_modules/ethers/src.ts/contract/contract.ts:172:60
at ParamType.#walkAsync (node_modules/ethers/src.ts/abi/fragments.ts:777:24)
at ParamType.walkAsync (node_modules/ethers/src.ts/abi/fragments.ts:795:24)
at /zkevm-contracts/node_modules/ethers/src.ts/contract/contract.ts:170:22
at Array.map (<anonymous>)
at resolveArgs (node_modules/ethers/src.ts/contract/contract.ts:169:37)
8) Emergency mode test
"before each" hook: Deploy contract for "should activate emergency mode":
TypeError: maticTokenContract.deployed is not a function
at Context.<anonymous> (test/contracts/emergencyManager.test.js:51:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
9) Global Exit Root
"before each" hook: Deploy contracts for "should check the constructor parameters":
TypeError: polygonZkEVMGlobalExitRoot.deployed is not a function
at Context.<anonymous> (test/contracts/globalExitRootManager.test.js:25:42)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
10) Global Exit Root L2
should update root and check global exit root:
AssertionError: Expected transaction to be reverted with reason 'OnlyAllowedContracts', but it reverted with a custom error
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Context.<anonymous> (test/contracts/globalExitRootManagerL2.test.js:28:9)
11) Global Exit Root L2
should update root and check the storage position matches:
TypeError: ethers.provider.getStorageAt is not a function
at Context.<anonymous> (test/contracts/globalExitRootManagerL2.test.js:46:52)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
12) Polygon ZK-EVM
"before each" hook: Deploy contract for "should check the constructor parameters":
TypeError: maticTokenContract.deployed is not a function
at Context.<anonymous> (test/contracts/polygonZkEVM.test.js:63:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
13) Polygon ZK-EVM Deployer
"before each" hook: Deploy contract for "should check the owner":
TypeError: polgonZKEVMDeployerContract.deployed is not a function
at Context.<anonymous> (test/contracts/polygonZkEVMDeployer.test.js:25:43)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
14) Polygon ZK-EVM TestnetV2
"before each" hook: Deploy contract for "should check the constructor parameters":
TypeError: maticTokenContract.deployed is not a function
at Context.<anonymous> (test/contracts/polygonZkEVMTestnetV2.test.js:53:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
15) PolygonZkEVMUpgraded
"before each" hook: Deploy contract for "should check the constructor parameters":
TypeError: maticTokenContract.deployed is not a function
at Context.<anonymous> (test/contracts/polygonZkEVMUpgraded.test.js:58:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
16) Real prover inputs test
Test real prover:
AssertionError: expected false to equal true
+ expected - actual
-false
+true
at Context.<anonymous> (test/contracts/real-prover/real-prover-test-inputs.test.js:28:18)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
17) Polygon ZK-EVM snark stark input test
"before each" hook: Deploy contract for "Check Accumulate input Hash":
TypeError: polygonZkEVMContract.deployed is not a function
at Context.<anonymous> (test/contracts/snark_stark_input.test.js:51:36)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
18) Polygon ZK-EVM
"before each" hook: Deploy contract for "Should upgrade brdige correctly":
TypeError: maticTokenContract.deployed is not a function
at Context.<anonymous> (test/contracts/timelockUpgradeTest.js:74:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
19) Claim Compressor Contract
should check Compression:
TypeError: invalid BytesLike value (argument="value", value="0xf90a4b018502540be40083030d409490f79bf6eb2c4f870365e785982e1f101e93b90680b90a24ccaa2d119591d409fb5e4bb569c5c33aa0a74654e3fc2ee81bc36ad9ccf5ac68573d8ff41d8cc23b9b72138672b472e70956a664a82733d5e7da89d915bc4de4dade80c0b09e9972da2b2178da47dd9f0fead5220c3dbe2ff942f63b30caa431c6e568a721ddb9a356815c3fac1026b6dec5df3124afbadb485c9ba5a3e3398a04b7ba85e58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a193440eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d887c22bd8750d34016ac3c66b5ff102dacdd73f6b014e710b51e8022af9a1968ffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f839867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756afcefad4e508c098b9a7e1d8feb19955fb02ba9675585078710969d3440f5054e0f9dc3e7fe016e050eff260334f18a5d4fe391d82092319f5964f2e2eb7c1c3a5f8b13a49e282f609c317a833fb8d976d11517c571d1221a265d25af778ecf8923490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99cc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8beccda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d22733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a0b46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa0c65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e2f4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd95a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3774df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee652cdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618db8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d0838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea32293237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d7358448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e5d7cefb9ffbddd34c12f8c62e0657ae34b371b671e3130c7f5a69be8d0efa08000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006a0a0f115c2e92288f7b119222f9a0e9fecbbc1200000000000000000000000000000000000000000000000000000000000000010000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc0000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000000000000000000092000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000b4d6174696320546f6b656e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054d41544943000000000000000000000000000000000000000000000000000000058080d25fd39d346192dc95267144a0e9f2abe68e00f2cdd9f8adc4001c47b8157510406ebda95abe15cb7f965ce3cdee06397b78fd3a84ebc66ed9ffd43784566c2c-12ff", code=INVALID_ARGUMENT, version=6.8.0)
at makeError (node_modules/ethers/src.ts/utils/errors.ts:687:21)
at assert (node_modules/ethers/src.ts/utils/errors.ts:715:25)
at assertArgument (node_modules/ethers/src.ts/utils/errors.ts:727:5)
at _getBytes (node_modules/ethers/src.ts/utils/data.ts:44:19)
at Proxy.getBytes (node_modules/ethers/src.ts/utils/data.ts:55:12)
at calculateCallDataCost (test/contractsv2/claimCompressor/ClaimCompressor.test.ts:591:31)
at Context.<anonymous> (test/contractsv2/claimCompressor/ClaimCompressor.test.ts:570:38)
at processTicksAndRejections (node:internal/process/task_queues:95:5) |
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.
Description
I noticed that it's not possible to build the contracts with
forge
onlinux/arm
because solc0.5.12
is not available. This patch resolves the problem.Test
Initial steps:
Without the fix