diff --git a/AllContractsHashes.json b/AllContractsHashes.json index a69db42408..f6ac3d17a8 100644 --- a/AllContractsHashes.json +++ b/AllContractsHashes.json @@ -731,12 +731,12 @@ }, { "contractName": "l1-contracts/AdminFacet", - "zkBytecodeHash": "0x010007b9cc802a38392da25f911fb648e2f9839ffb240d25375a82cc22b4ba42", + "zkBytecodeHash": "0x010007b916a651c76b3ae3e75ff975279e5ae139bc24f025062ebc5d3af68eae", "zkBytecodePath": "/l1-contracts/zkout/Admin.sol/AdminFacet.json", - "evmBytecodeHash": "0x8e68b822c8d549b05989260f5a875712768cd628fc79daeaa7fe3a92e52e2096", + "evmBytecodeHash": "0xe2405ba45c1a92d31b390cf34e5d6f8130ec50281e79df6696a0d9cb0a6b1ee9", "evmBytecodePath": "/l1-contracts/out/Admin.sol/AdminFacet.json", - "evmDeployedBytecodeHash": "0xcf81b2d8199420fb4fefea04d456dc1bd0905f49e86a8c2187bcde45fb32e672", - "evmDeployedBytecodeBlakeHash": "0x4f162869392e1a2019ae5ca65596343bf50544f6aee5415e0f18e472cd3a2a01", + "evmDeployedBytecodeHash": "0x07cb94bf383b22549978f2aba582691f87650ee8a83317ee063074be4b787a5a", + "evmDeployedBytecodeBlakeHash": "0x08031c838a167ecad6533dc42c1861a826224c60509f2f2a241aa53f08f8b56e", "evmDeployedBytecodeLength": 23220 }, { @@ -771,42 +771,42 @@ }, { "contractName": "l1-contracts/BridgeHelper", - "zkBytecodeHash": "0x01000007f5bf2fe5252ae92770c2271de468d35b50ab5a9e5ddb43ef67894f49", + "zkBytecodeHash": "0x010000071edd2770b7b68357fd05a0123df5b5c83c5745b2da7c1968e6fa57f6", "zkBytecodePath": "/l1-contracts/zkout/BridgeHelper.sol/BridgeHelper.json", - "evmBytecodeHash": "0x762483ec3ee555e18fe6642b5449f817dbfe4759caa58326b9db8dcf67d0d608", + "evmBytecodeHash": "0x2f81fc0aaed6b34a18fa49acc22e739ded68538f352d6ada4d8536e94e81040f", "evmBytecodePath": "/l1-contracts/out/BridgeHelper.sol/BridgeHelper.json", - "evmDeployedBytecodeHash": "0x91e869690d7ddfedb9047502151cb7ffb6aedeb3940a23a016bdb473b284963a", - "evmDeployedBytecodeBlakeHash": "0x7f88935c91aba0ec86192ef2d487a5dcac8eb9497bdc6e05307ddbbc510fb1ef", + "evmDeployedBytecodeHash": "0x5e5f7cf6ccc192c31618619fb84278cfb90ad4333931f7c97d333eedd82483f6", + "evmDeployedBytecodeBlakeHash": "0x8303224b93c691cf98734b192c1e5e31746c0b0263c714b5ab0dcf4c3f6ca5c0", "evmDeployedBytecodeLength": 85 }, { "contractName": "l1-contracts/BridgedStandardERC20", - "zkBytecodeHash": "0x010004edfeac7f971b2a91cc88c53f8c0dd7aaf95d32e5aecdd4f3708e013156", + "zkBytecodeHash": "0x010004ed564a4dac9ae5362cb5e797a158b1cc2fd6f5fbdab86ecf7772514f5e", "zkBytecodePath": "/l1-contracts/zkout/BridgedStandardERC20.sol/BridgedStandardERC20.json", - "evmBytecodeHash": "0xd379a9a9e6c8b0b4e91f6494642874f0ad54923052c9945cfb5fa6730f897de7", + "evmBytecodeHash": "0x8fb2bffed6de5ed97469f251f7a59e64c65b65ed91a7d2b69b82ffc2f5be0964", "evmBytecodePath": "/l1-contracts/out/BridgedStandardERC20.sol/BridgedStandardERC20.json", - "evmDeployedBytecodeHash": "0xd45d842cb0c49953d097d1247fb8c5667e879e5908e6a789520e734eefbcc6a8", - "evmDeployedBytecodeBlakeHash": "0x3bfe3679347cba3b7a77965a4d0f57c4968558c276842cfe6ece5a199abb9540", + "evmDeployedBytecodeHash": "0xa0ee2c6f2ef71dbdc75111a31f5c0944ba9c92c2f89c77f58be0324bb1af8195", + "evmDeployedBytecodeBlakeHash": "0x74dc7338c76720d436a23deda35208434a6e4692d36e7ce687b0e93a657b119f", "evmDeployedBytecodeLength": 12639 }, { "contractName": "l1-contracts/BytecodesSupplier", - "zkBytecodeHash": "0x010000bf627800d27fba69ec26487c67d7339f8b31a10b56e1239d87ddcea118", + "zkBytecodeHash": "0x010000bf2eccefe161ab39fb24eb56f03ce1bbdd37ff747edb992f82d0638069", "zkBytecodePath": "/l1-contracts/zkout/BytecodesSupplier.sol/BytecodesSupplier.json", - "evmBytecodeHash": "0xfc344f0f9505dd2c892ebc504fcf205161c4e38c8f5b9cbc098849e210624735", + "evmBytecodeHash": "0x79a882f3ec76c1cb2ec60fdac2408dfae2f1dbf11f87b80758e27504ba30f8f5", "evmBytecodePath": "/l1-contracts/out/BytecodesSupplier.sol/BytecodesSupplier.json", - "evmDeployedBytecodeHash": "0xa9f71353e5d509882c64482f9e53016615099632e7ab10ea22863255276af9be", - "evmDeployedBytecodeBlakeHash": "0xb04113dbe6ec0ba9e92f14974ff4c0f2f26bb63c8d9b829b1ea9c25ed5843d7e", + "evmDeployedBytecodeHash": "0x9de45eefd91fd22ab45d6b16082497efa03e0bd1c3ff987f4c73abe6dbe22e84", + "evmDeployedBytecodeBlakeHash": "0x6479883b54d95e5fdb9fdf4d70dc3d70f1fdcb8b0208f43931bba65b8276c549", "evmDeployedBytecodeLength": 1460 }, { "contractName": "l1-contracts/CTMDeploymentTracker", - "zkBytecodeHash": "0x010001bb9e29390dc2eace0af9c403f0f37120514e7f81a528f0d5e0e4932ad1", + "zkBytecodeHash": "0x010001bb2e96a6e865fdb91fe7689225362000c41ab63c02e7d1aca17d9b833e", "zkBytecodePath": "/l1-contracts/zkout/CTMDeploymentTracker.sol/CTMDeploymentTracker.json", - "evmBytecodeHash": "0x404f92c3150de1f831f3ffaa230e747209bd471d504e3fdd9c5279d76b01ee14", + "evmBytecodeHash": "0xb69f1983a05c228a3ceaa44fa6a9cea2d31ce06680949508f31e8d37608b8d3f", "evmBytecodePath": "/l1-contracts/out/CTMDeploymentTracker.sol/CTMDeploymentTracker.json", - "evmDeployedBytecodeHash": "0x4d994a3dbe883d6afea20743ac8579bba12f94ff0c01fc80d857c15947c32974", - "evmDeployedBytecodeBlakeHash": "0x2fb8ff9b2e5df31b2a6aa5f66fe3bd14114b9b6668206eb273793b54ededbcfc", + "evmDeployedBytecodeHash": "0xc6d26e7b8f29a011fe616f0982938ddf81d0c135d032cb83debdaad2fd0e0e2d", + "evmDeployedBytecodeBlakeHash": "0x19c3fc8c5daf78ce922c50f8a5d1bff8898da48f531def4cdcbbc0cfd7f3932b", "evmDeployedBytecodeLength": 5565 }, { @@ -861,22 +861,22 @@ }, { "contractName": "l1-contracts/DataEncoding", - "zkBytecodeHash": "0x0100000776a6b0961f2533a6bc1ac3fa9cd2517354786256db0ddd11f6d69e5c", + "zkBytecodeHash": "0x010000071cc306675a1c6c996872476b99afa29a15f36745ad85cba50da2973e", "zkBytecodePath": "/l1-contracts/zkout/DataEncoding.sol/DataEncoding.json", - "evmBytecodeHash": "0x16722360ac2deaaa490c62789ed54ff98977e4cbcc9e3edad909168d812509e8", + "evmBytecodeHash": "0xa0fe0a9450ed3af177405df41a0aa4a6f7ddc69c397ee2066f8ef5385f35c1ec", "evmBytecodePath": "/l1-contracts/out/DataEncoding.sol/DataEncoding.json", - "evmDeployedBytecodeHash": "0x0e5b652d9112a8dde20e186b42b37f72f90e141a193b7ed6f04d0c6c02206323", - "evmDeployedBytecodeBlakeHash": "0x5926901c51eb326af917e43e1379a217a974e84918291705720ad83a9575eea7", + "evmDeployedBytecodeHash": "0x9b774867385da50ca285e163e08e631b8634ca39f96495a9205f2ec90b302cd4", + "evmDeployedBytecodeBlakeHash": "0x811c854f0aaa8bfd41b109c6223189ed57622448fe343095351abd1f23a20d1f", "evmDeployedBytecodeLength": 85 }, { "contractName": "l1-contracts/DefaultUpgrade", - "zkBytecodeHash": "0x010002db847ec373002f91e811669927fbf70191701e7689081992fd5cf03b82", + "zkBytecodeHash": "0x010002db617ca725c0a657db08f038d9948ab84ca0699e9d0f8f9a6f455d02a4", "zkBytecodePath": "/l1-contracts/zkout/DefaultUpgrade.sol/DefaultUpgrade.json", - "evmBytecodeHash": "0x67ca45b04ed1392d244002aee1e84f06f8008066cca657c3342acb104dcfecb2", + "evmBytecodeHash": "0x5b61a90d0e083725eb4b8e972c06f7ff486bbfed7eb26e1ccaaaf31d3310ee9b", "evmBytecodePath": "/l1-contracts/out/DefaultUpgrade.sol/DefaultUpgrade.json", - "evmDeployedBytecodeHash": "0xa71e81d4bdb5fde556d201454a5025f39f464958cd6db29d18edfd95053a5cbd", - "evmDeployedBytecodeBlakeHash": "0x79c0449d66b3156a2d471232679f3b89b4e1436343c600a74e6bd4010edadf0c", + "evmDeployedBytecodeHash": "0x094b4bdd834a0ecce5d2d2f2bff75e9bd631f80d6da1b316352006dd13a6dc01", + "evmDeployedBytecodeBlakeHash": "0xaa10e283206220e3d857835dd90cfbb148520eaf50076c7962876653963deef5", "evmDeployedBytecodeLength": 7188 }, { @@ -1041,12 +1041,12 @@ }, { "contractName": "l1-contracts/ExecutorFacet", - "zkBytecodeHash": "0x01000869be390c1ed45ea6c755c16a4a910c4aae85ebfd32e9f9af7eaac3c0fc", + "zkBytecodeHash": "0x010008699217da8d9e923cfdaf17243f530a8ed9b19cddcaa59edb34f2e9f815", "zkBytecodePath": "/l1-contracts/zkout/Executor.sol/ExecutorFacet.json", - "evmBytecodeHash": "0x5354db3069a545c19aa16671924e54151ad7cfb5642342720aeef998ce07d2ac", + "evmBytecodeHash": "0xcb269678977f076bdbd0dde2d096e4047aafb3449a6da588c955579686495385", "evmBytecodePath": "/l1-contracts/out/Executor.sol/ExecutorFacet.json", - "evmDeployedBytecodeHash": "0xfea8794c719be621dc636e6eddb8d76faf1b0f476f2baa652a1bcebf6bcb13fa", - "evmDeployedBytecodeBlakeHash": "0xbb9fa238680e01fc15c9f608ce6b8f10d5227c870ddce20485c23af6f8915823", + "evmDeployedBytecodeHash": "0xab6bbe8adfaa342cd925748afaadbaeb93e2378f30927553ecd11ced4fd5765d", + "evmDeployedBytecodeBlakeHash": "0x9a19b1a4b731e28cb1ebc10c37945e83dc7467bc22f45b6f0a3dc5122c685794", "evmDeployedBytecodeLength": 22779 }, { @@ -1061,32 +1061,32 @@ }, { "contractName": "l1-contracts/GatewayCTMDeployer", - "zkBytecodeHash": "0x01000421b895012a1c450b7e6a05d996ae4faaf70be9967f648788c4f1bafd32", + "zkBytecodeHash": "0x010004211d76414f9fd70a077031a5854aa5fde2db102ba99eb505984c7feb5d", "zkBytecodePath": "/l1-contracts/zkout/GatewayCTMDeployer.sol/GatewayCTMDeployer.json", - "evmBytecodeHash": "0x2a70052e4f82ccd0be07192dcf10adb80bb46bced40aca8874dc65020990419b", + "evmBytecodeHash": "0x682120401097e24b71863d00f926511980c87b82b6464fcfb7feb0d3f4e24459", "evmBytecodePath": "/l1-contracts/out/GatewayCTMDeployer.sol/GatewayCTMDeployer.json", - "evmDeployedBytecodeHash": "0x92ff38f02c6b9cf55acd84fdc118c3f3fd90805a89a570d94d2a295b7c08d5c7", - "evmDeployedBytecodeBlakeHash": "0xef30d000150d3630370a333f64c73a08527ae823b38b257554bf7ab1ee3c5458", + "evmDeployedBytecodeHash": "0x166741333a2a8adeb54cdd96f3b83755188e37cde7de9d2c1d91c002f65baba1", + "evmDeployedBytecodeBlakeHash": "0xa5f30d73834ae3a5f24ee2e05354a8dc600187bb4cfeaded935738ff14b3d8b2", "evmDeployedBytecodeLength": 1645 }, { "contractName": "l1-contracts/GatewayTransactionFilterer", - "zkBytecodeHash": "0x0100013d1603857b034315ab1fff2f880d5c6ebbbe78e84db913342d44ca1894", + "zkBytecodeHash": "0x0100013d88c83cd1fe2fa38aa075a39cfde6d716754c8579e476737a5a6f690f", "zkBytecodePath": "/l1-contracts/zkout/GatewayTransactionFilterer.sol/GatewayTransactionFilterer.json", - "evmBytecodeHash": "0x142dd9a6ea6ddc3c60deafa280c643ffd14963e804260bd42b410121355ec267", + "evmBytecodeHash": "0xf22882396ad2d4223dc4011595a0b794d0e63590f3652512270740478b3bf689", "evmBytecodePath": "/l1-contracts/out/GatewayTransactionFilterer.sol/GatewayTransactionFilterer.json", - "evmDeployedBytecodeHash": "0x7bd3f8e28447145f98a14a88ddd5f633ab10fe5decf1b3f3f0d395ad5d46764d", - "evmDeployedBytecodeBlakeHash": "0x21a1ec0020e8cc4fbf5e312300d3123f47bdee58b4d4d50b06e24619f13621ce", + "evmDeployedBytecodeHash": "0xf01ca8363c865ed12f048c80071be5ea92c0f552d85bc2ea67893bf4c214f0b4", + "evmDeployedBytecodeBlakeHash": "0x149c85f196811c96c612753d32f1d9957f8da7ffa3c120ea8653fb0d8cc9166d", "evmDeployedBytecodeLength": 3908 }, { "contractName": "l1-contracts/GatewayUpgrade", - "zkBytecodeHash": "0x01000597208eed1d0305eff85f522c0cc40fb3bc69f00dc32549413fb905e6d0", + "zkBytecodeHash": "0x01000597f74993a75ab895c5c18138ff2427a3409ff00c16cdf0aab2dc6054cc", "zkBytecodePath": "/l1-contracts/zkout/GatewayUpgrade.sol/GatewayUpgrade.json", - "evmBytecodeHash": "0xc0c87028f25e3ac9f6a39b46f80be077482c3ca39e9aa46bc2bc5906718eca86", + "evmBytecodeHash": "0xdc0a4ed4e2c2bdbd8609cf947a2f47bf136c55df9c4238579263220ff8968660", "evmBytecodePath": "/l1-contracts/out/GatewayUpgrade.sol/GatewayUpgrade.json", - "evmDeployedBytecodeHash": "0x3f066a4ab963a6f79bb67a049fc9527f67d8a2f5255cf6000acb56e0e9ee7a73", - "evmDeployedBytecodeBlakeHash": "0x4b62a6dbdf9f83d6b2974d47467a011d91f42d1cab65b3b97ba104960f063de6", + "evmDeployedBytecodeHash": "0x978475cd28e2763b67d3f10918334ea34c4e42aea2f2045a99475218028ff69c", + "evmDeployedBytecodeBlakeHash": "0xf685d7ccc53abe01338c4ed401873ef123de7b20d684d35f8d9779f34bfe5094", "evmDeployedBytecodeLength": 12223 }, { @@ -1121,54 +1121,64 @@ }, { "contractName": "l1-contracts/L1AssetRouter", - "zkBytecodeHash": "0x0100083352302a516f34ea99923a4d14fdfe8eb7b730d9576ac30eefbffcae11", + "zkBytecodeHash": "0x010008338bbf44c2c54de7fcd49bc7c598e426fb4fa86bb679ee44092bb3582c", "zkBytecodePath": "/l1-contracts/zkout/L1AssetRouter.sol/L1AssetRouter.json", - "evmBytecodeHash": "0xd31741bfc5d6019c0fc73a433f418facd0fec444ad7aa7a36cd23f2fe86c4ecc", + "evmBytecodeHash": "0x2b38c1a6d12f1fa1925dc8f1a17081214bd8b40dfe9a66880e62bc3ac02987e0", "evmBytecodePath": "/l1-contracts/out/L1AssetRouter.sol/L1AssetRouter.json", - "evmDeployedBytecodeHash": "0x57e40321c8c36dded424f8b49289d24f7e1867347be793d025949895ba8a089b", - "evmDeployedBytecodeBlakeHash": "0x63f9afb41a18c1f3b8aeccf70660d4c04d200c20f6aca8c3306d4b6c2b572acc", + "evmDeployedBytecodeHash": "0x2a588fcd0521b3a664610314ea18e10adb86c5e8b83914d9ac183cb5e240a921", + "evmDeployedBytecodeBlakeHash": "0x7bbd1129a9e4142ec6caa7962124a6329d503baca4d8a0933bc678e36cecec77", "evmDeployedBytecodeLength": 19592 }, { "contractName": "l1-contracts/L1Bridgehub", - "zkBytecodeHash": "0x01000767e7e246463cd0ecab50b9806230af7ddcd1bfe75dec8de90b7e396b32", + "zkBytecodeHash": "0x01000767e4c5978bfe62299e677337763e839bbdbcf848813fc180f7efff04c9", "zkBytecodePath": "/l1-contracts/zkout/L1Bridgehub.sol/L1Bridgehub.json", - "evmBytecodeHash": "0x85f0d8d5aa402e295bcb7e18b8390807e15f56443436f8fbe7ee573a5fd15736", + "evmBytecodeHash": "0xbbc5248f650ca095909e709af66c38c0e2d3250d7e83069639d45c58e832bdb5", "evmBytecodePath": "/l1-contracts/out/L1Bridgehub.sol/L1Bridgehub.json", - "evmDeployedBytecodeHash": "0x02f8fd5f1edb45b75c469247635bbe2862230ba41b01c976f9c44dd243a4cf5e", - "evmDeployedBytecodeBlakeHash": "0xceb0cd021c81d0bda83792d7714a995ed91288f1595fcef3a2cd738660e69ff2", + "evmDeployedBytecodeHash": "0x53c631c3785b14a553482f6eac050071277424a2730c5846f083b8cc4b96fc78", + "evmDeployedBytecodeBlakeHash": "0x34df0a59b131d06d7544d24f9150215498f5fd5d1ffdd242767e4dba7fd9a285", "evmDeployedBytecodeLength": 21222 }, { "contractName": "l1-contracts/L1ChainAssetHandler", - "zkBytecodeHash": "0x010003c569248dd9008699eb4c1052cd08e841a6a7af5fb8e563dea6a8fa1616", + "zkBytecodeHash": "0x010003c5d075065296e2921342979e79d98dc2e9c9ba66871e965cffe049d140", "zkBytecodePath": "/l1-contracts/zkout/L1ChainAssetHandler.sol/L1ChainAssetHandler.json", - "evmBytecodeHash": "0x51801c5e32cabd05cc6a838edb55a695e328ee5eab3810a121537180dffcfe50", + "evmBytecodeHash": "0xbcecaad13b37bf7934dab1405fab2ae1c82ababa93faa5e3647e15605c696754", "evmBytecodePath": "/l1-contracts/out/L1ChainAssetHandler.sol/L1ChainAssetHandler.json", - "evmDeployedBytecodeHash": "0x524f7841eacdccefdc0e5e60d2d31db7e5f023002ebef16b90d1fe9b0429ea25", - "evmDeployedBytecodeBlakeHash": "0xf321f013ad1daff8e3aaf1b56452e72caf5bc66637dcfce25abd22a0509bd44e", + "evmDeployedBytecodeHash": "0x4b6fcc5ae506a26f191cd5fd264b0018c87549f1aae2425d9db9a430c0ea92f5", + "evmDeployedBytecodeBlakeHash": "0x2b93846bfae4ebdb493a2d21d25cf76b6fb3ed2b036254b373a622b7930b9b73", "evmDeployedBytecodeLength": 8286 }, { "contractName": "l1-contracts/L1ERC20Bridge", - "zkBytecodeHash": "0x010002e92ad56d5a3a326b9f289340cdc459e563d3a882ccc4765911a152fb39", + "zkBytecodeHash": "0x010002e9bca8529617205773e7c4c6a5db47f4d3d44d0653e85ab0f6c3ca4564", "zkBytecodePath": "/l1-contracts/zkout/L1ERC20Bridge.sol/L1ERC20Bridge.json", - "evmBytecodeHash": "0x67497980537e571370167bca99259b61917b5277d0dbc1ee6f93f623f898312d", + "evmBytecodeHash": "0x24c48df3865188c96e2c2c6c817dd8e65a625d3318d575deb25a177be9956d4c", "evmBytecodePath": "/l1-contracts/out/L1ERC20Bridge.sol/L1ERC20Bridge.json", - "evmDeployedBytecodeHash": "0x8fdf69fa86b424095b6ca0e124e6a70092b8baca65b39991827014957fabee18", - "evmDeployedBytecodeBlakeHash": "0x768a3321819c29e8a46cf3fa170dcfa3139e913464b04fcaa7e4a75f8d10f5cc", + "evmDeployedBytecodeHash": "0x8c75306321b2bc939b3b6419a7d50d8627371beb6dd1398f308c49a0fda2f2f1", + "evmDeployedBytecodeBlakeHash": "0xcc1f188906e0de12243396876a85e7dfa57a087d2fd42cd92a7a15d341675e3c", "evmDeployedBytecodeLength": 6979 }, { "contractName": "l1-contracts/L1GenesisUpgrade", - "zkBytecodeHash": "0x0100069596b3c563f2c08e519e7db5865c99fa7b299e4bc09cc9543dafd5d6f7", + "zkBytecodeHash": "0x010006959a2186104d0c240b0ee39ff3043caf9125513c1fa62aec7353533e2d", "zkBytecodePath": "/l1-contracts/zkout/L1GenesisUpgrade.sol/L1GenesisUpgrade.json", - "evmBytecodeHash": "0xa53066e6bbf9e874363991a71d8d4d46686ef1294e01f50729ccc6155c82a577", + "evmBytecodeHash": "0x6a376a6f6260ee4573b9f77238fd1590c70d0d9554f5ec9e85f36405133daf0f", "evmBytecodePath": "/l1-contracts/out/L1GenesisUpgrade.sol/L1GenesisUpgrade.json", - "evmDeployedBytecodeHash": "0xc3a2ac84a7999d318654a21c4297eae5503c966e4dc10c3eaf26df1a7d5f0486", - "evmDeployedBytecodeBlakeHash": "0xbbed4e40a260c19d16352c9e8110b66509a228ae3c7b5b46740f39d429139757", + "evmDeployedBytecodeHash": "0xd06558e82477bf705be7447f3061a696985f87db9dc617e073cf6c9243ef9915", + "evmDeployedBytecodeBlakeHash": "0x4d398c44ee1be571295fd3acf62537574c89328ccd329e2ca3aab9d919f10200", "evmDeployedBytecodeLength": 16941 }, + { + "contractName": "l1-contracts/L1MessageGasLib", + "zkBytecodeHash": "0x01000007ba043a82b75de21b2dd53e5bc1a071ddeaa1126a41f8ab74dd720d0a", + "zkBytecodePath": "/l1-contracts/zkout/L1MessageGasLib.sol/L1MessageGasLib.json", + "evmBytecodeHash": "0x58f72599414bec0c1fab87a813d489c6c419174f565f9f03d093937d433d0026", + "evmBytecodePath": "/l1-contracts/out/L1MessageGasLib.sol/L1MessageGasLib.json", + "evmDeployedBytecodeHash": "0xe4e99356d7998a8b4bb97a7832c7cbfb9fb738422b195c5a8299c8265c28602b", + "evmDeployedBytecodeBlakeHash": "0x15c6b6162aae6fe587fe4aa0272c3e18cb6c9e27facefe6395064efeb9447cf6", + "evmDeployedBytecodeLength": 85 + }, { "contractName": "l1-contracts/L1MessageRoot", "zkBytecodeHash": "0x010002e5a73153c5fd316f36e3e7b2cf0b2f7869d536be5bd56c4b416009a3da", @@ -1179,44 +1189,54 @@ "evmDeployedBytecodeBlakeHash": "0xe7739de716c30c4bc5a10845330acf0e588a34489bd4f34cbf76ec36f28494cc", "evmDeployedBytecodeLength": 4936 }, + { + "contractName": "l1-contracts/L1Messenger", + "zkBytecodeHash": "0x01000079c3671787717c1d97616a195eb570c6f41311b282f3d536e675e44d38", + "zkBytecodePath": "/l1-contracts/zkout/L1Messenger.sol/L1Messenger.json", + "evmBytecodeHash": "0xc9486da578f913209fcbd7905de82264b4aba3b80417163329df24d8d206ef59", + "evmBytecodePath": "/l1-contracts/out/L1Messenger.sol/L1Messenger.json", + "evmDeployedBytecodeHash": "0x1f3279c9e51ac194e4382cbe50f46ef4a69d210e4552cb8db6a3f5a38b2f1f61", + "evmDeployedBytecodeBlakeHash": "0x270cfb1e642425b649274edefb77280f8f1ce4927f3b6941705b8850be3535b8", + "evmDeployedBytecodeLength": 1406 + }, { "contractName": "l1-contracts/L1NativeTokenVault", - "zkBytecodeHash": "0x0100097dd385c62748bc7d110b7eede6050dccdc6ffa61882e0f419be2a56bfb", + "zkBytecodeHash": "0x0100097dac43fbd69c6397c4b13eb82aefad8d7983c728ce66f244db0af6f4fa", "zkBytecodePath": "/l1-contracts/zkout/L1NativeTokenVault.sol/L1NativeTokenVault.json", - "evmBytecodeHash": "0xd3862fea324cdfd6abfdfd38feb3b2007752f89f03718f25e1b349b0645a9eda", + "evmBytecodeHash": "0x54e76b90a6862bfdf52fec242acca9d79832cfe4f8529574c9a3acdcb8547f7c", "evmBytecodePath": "/l1-contracts/out/L1NativeTokenVault.sol/L1NativeTokenVault.json", - "evmDeployedBytecodeHash": "0x4f927cf8aa5290fe520dbf3397502e5762a3583b1611ceeba640ac4872d91113", - "evmDeployedBytecodeBlakeHash": "0xf9bd0a52010623a4652c32b97f5d5510399d03ae50cb6b675df0b20e1f4c2411", + "evmDeployedBytecodeHash": "0xdd56a7fb26f737b0240f26eb5c3daae1f404ee91eab696074ef61ab36b59262a", + "evmDeployedBytecodeBlakeHash": "0xc5665914bfb36c38a9a5fa6807f89cde48132670c2771f4a865a0a8dabe72c23", "evmDeployedBytecodeLength": 19716 }, { "contractName": "l1-contracts/L1Nullifier", - "zkBytecodeHash": "0x01000659fabb7c0e5a7dc41f80a68ecd0c95aafa51d35ec1f84f4618485a6cd6", + "zkBytecodeHash": "0x01000659d0278caeb836819b52abb38f941a6fed00920e629da0370bfae9a8c6", "zkBytecodePath": "/l1-contracts/zkout/L1Nullifier.sol/L1Nullifier.json", - "evmBytecodeHash": "0x36b7f250943dc946f6dfde6300f1b7766f963db830c1427d4c6ca564b354c58d", + "evmBytecodeHash": "0x907bef783eda311746da0ed72eb56dd98553e0d27f7834745e736af59d950df1", "evmBytecodePath": "/l1-contracts/out/L1Nullifier.sol/L1Nullifier.json", - "evmDeployedBytecodeHash": "0x311b4d4ee50bef4a841b22cc84018108dfa90dc122be6f7d58ffcd476279cf77", - "evmDeployedBytecodeBlakeHash": "0x87b28446351eee4444a32a6650fe2856dbe3156dd707d8603b41a363157b635b", + "evmDeployedBytecodeHash": "0xa89cc182b296017ee85ab7ff25cba02cacf0ff5e0b660920700d8681d92afc3f", + "evmDeployedBytecodeBlakeHash": "0x14b031c7576d2bb416ed31a15923fb236e97619faab881d36b25b372de94b7e2", "evmDeployedBytecodeLength": 15487 }, { "contractName": "l1-contracts/L1V29Upgrade", - "zkBytecodeHash": "0x0100032b344dce690e8a0f14b8cb9b87270aabaf668ea19adc96937b9e82a2b7", + "zkBytecodeHash": "0x0100032b9247d1683d4dd41fbf21b21c082397f6d52130ae8ef25c6fc1828de8", "zkBytecodePath": "/l1-contracts/zkout/L1V29Upgrade.sol/L1V29Upgrade.json", - "evmBytecodeHash": "0x05e6ad3a472ea3047cb649433d065e4dc58abe4f8bd6689bc4eee0077ae49c4c", + "evmBytecodeHash": "0xb83b15274f482d5f46cdc10d932e89a45a45332d8275cb22d1f63dcf5a94d95b", "evmBytecodePath": "/l1-contracts/out/L1V29Upgrade.sol/L1V29Upgrade.json", - "evmDeployedBytecodeHash": "0x98c8d65426d95f31258f0d2956abb182b8e749eba1f739b2942d2ce04aa1e7a9", - "evmDeployedBytecodeBlakeHash": "0x90fad7bdc6d3d203243d384cb695ccb1fbcf430d1656212a658a51fb71d3a731", + "evmDeployedBytecodeHash": "0x2d15abef7d371d1aeefb025f69a4267ce3bb27bd7edca72586fd15fa105ab846", + "evmDeployedBytecodeBlakeHash": "0xa5d16026f6bef55fd61ac5d611fb5ed25ff5d81905a15267e70afed5e8777135", "evmDeployedBytecodeLength": 8132 }, { "contractName": "l1-contracts/L1ZKsyncOSV30Upgrade", - "zkBytecodeHash": "0x010002ddef2cc6abd2de309f6ec06266fe33b47cbaa8ee2a2275de6a9267d275", + "zkBytecodeHash": "0x010002dd4765ded8c6f69e76dde92f3e7002916532264acb91f3178fb99664c3", "zkBytecodePath": "/l1-contracts/zkout/L1ZKsyncOSV30Upgrade.sol/L1ZKsyncOSV30Upgrade.json", - "evmBytecodeHash": "0x2d601e24ae01aff3f003c573ac18447ef72e0fc637cbc963272166e623e843ca", + "evmBytecodeHash": "0xa2dbf9b0d5daf9aa4bde883614ac46af7fa3f0337e17a55002b96ca162429684", "evmBytecodePath": "/l1-contracts/out/L1ZKsyncOSV30Upgrade.sol/L1ZKsyncOSV30Upgrade.json", - "evmDeployedBytecodeHash": "0x94735298972688626574a49acd4b12aa2e85039e61b1d7009adfe73957d646a7", - "evmDeployedBytecodeBlakeHash": "0xba593bfa57bc97759148e5133d2af3c8b7d9347a1816dd1708942f198699d9ef", + "evmDeployedBytecodeHash": "0x63c6a627ae397673efba047d897b6a7df324c46794f451f04521cb26ecfa890f", + "evmDeployedBytecodeBlakeHash": "0xdc3f4f6c5255c94ef4430fded6e8bdad078354ec9d0782ff2b9e762813bdc136", "evmDeployedBytecodeLength": 7267 }, { @@ -1231,112 +1251,112 @@ }, { "contractName": "l1-contracts/L2AssetRouter", - "zkBytecodeHash": "0x010004c9dd4c5e4ad9d8c7a2eb4298b22a91cfb2f1e1712ae4b74142444ab87a", + "zkBytecodeHash": "0x010004c9de20516775699d90b664e1b489e9448ef8da6cd73ea6929198f3ff6a", "zkBytecodePath": "/l1-contracts/zkout/L2AssetRouter.sol/L2AssetRouter.json", - "evmBytecodeHash": "0x48f4244bfa325d208e23097f580d148099f45c3ef722305f8088c8d591d7fcf5", + "evmBytecodeHash": "0x3e7c3c75c6d8d64bb28543608f11faf91d08316ee1068bece3c19cf5ce5b2401", "evmBytecodePath": "/l1-contracts/out/L2AssetRouter.sol/L2AssetRouter.json", - "evmDeployedBytecodeHash": "0x5ad3d9403af0d911ee4aeadbbde9c353814fdbc7679c20c99f5f944c43f1dee0", - "evmDeployedBytecodeBlakeHash": "0x1c085665f2a51715c66b88f52f86f081e01bb941faf55d5fa9dbd6fe97cd683a", + "evmDeployedBytecodeHash": "0x455c4402c86c9f2a0102ca45acb9cb23ab5ff4ec99200b16c53a11709cd92b60", + "evmDeployedBytecodeBlakeHash": "0x821a68aa80c043c49fb542d3e93cf85b6c3b39a1804311dd73ee3e53dc2f059f", "evmDeployedBytecodeLength": 11355 }, { "contractName": "l1-contracts/L2Bridgehub", - "zkBytecodeHash": "0x010003cfe4136059e9d56091da1a5aaa293c9ed8a6e68d687dfeaa1ab534ef08", + "zkBytecodeHash": "0x010003cf595d41d52dadd323d90130b8285047bc2ea813d5fa9f38dbc3a7c1f2", "zkBytecodePath": "/l1-contracts/zkout/L2Bridgehub.sol/L2Bridgehub.json", - "evmBytecodeHash": "0x25c65f1f9d0068b4f603bc4eb40b2540dd8b53887169b6c4b47e7301e5c38f57", + "evmBytecodeHash": "0xe97bcb67af6f1034ace11f11318a8767e9cb263a390e034ba33fc27cef7ef76a", "evmBytecodePath": "/l1-contracts/out/L2Bridgehub.sol/L2Bridgehub.json", - "evmDeployedBytecodeHash": "0x1dc8d8d6c1eb16ade1b790365a9007a3ca7247ee7de00b576b43e21d28918f9d", - "evmDeployedBytecodeBlakeHash": "0x4cdf52a9a78024a7b5b1d31faa6de33eb6159ee71f02733c27de62106cb3d9ee", + "evmDeployedBytecodeHash": "0x2851a98a3cfa367954d8a63a961c06e0729dff029b65ba1efa3d3028b3f91301", + "evmDeployedBytecodeBlakeHash": "0xfd7cf2cf5869126d0c271bb9faab86a94523378b9545bc30693e8d11013cf69d", "evmDeployedBytecodeLength": 12419 }, { "contractName": "l1-contracts/L2ChainAssetHandler", - "zkBytecodeHash": "0x010003058be9ad48aa84a792e452b03d952f41e95eed12fdfd87f590effddabe", + "zkBytecodeHash": "0x01000305bf8d8dbcd589e44918b799907ca38a2ae02b8aecf293f70055efea11", "zkBytecodePath": "/l1-contracts/zkout/L2ChainAssetHandler.sol/L2ChainAssetHandler.json", - "evmBytecodeHash": "0x34bde156d67371901e09811767e38a386398dc34c562ce29fd9ad0cdfc3d3255", + "evmBytecodeHash": "0x5f0f6d0d1703b6f050735a89e50f9ab6dcce731ae85de92836e533286c269cd5", "evmBytecodePath": "/l1-contracts/out/L2ChainAssetHandler.sol/L2ChainAssetHandler.json", - "evmDeployedBytecodeHash": "0x4d5c32f28646ef26d746e078bd9d9c5797178e9959013bc13ec4ed42122d6022", - "evmDeployedBytecodeBlakeHash": "0x1a36318670b6ab973e68178a10d6107227fde6d027573d7668e61760d22a867a", + "evmDeployedBytecodeHash": "0xd7a243e14c40c7f60d06adc176a41d14be08ad66a5974a982a43c6366ee36df3", + "evmDeployedBytecodeBlakeHash": "0x5f298819fecf1b27fbf57437c683b49d58d0f61c74fb9a789f69491b92b2a6d7", "evmDeployedBytecodeLength": 8198 }, { "contractName": "l1-contracts/L2ComplexUpgrader", - "zkBytecodeHash": "0x010001dde676b0938c9c39af4d14174f82d379c15817f4e82b0be6ecaef7d50f", + "zkBytecodeHash": "0x010001e1dc88ba03c87d92b420159af4780a1538a3be63597ee5506854147110", "zkBytecodePath": "/l1-contracts/zkout/L2ComplexUpgrader.sol/L2ComplexUpgrader.json", - "evmBytecodeHash": "0x4816057fa648e65338a356d2d2780cb11c6f316ffafdccc76a6dd14ecee9e5a3", + "evmBytecodeHash": "0x793364fd96b45424f4c36004f604ec3e372bf14de666cd143642e6f9c966a9c4", "evmBytecodePath": "/l1-contracts/out/L2ComplexUpgrader.sol/L2ComplexUpgrader.json", - "evmDeployedBytecodeHash": "0x4b1838dcd9461c7fef64e95a2ccda7da902c26b578c03e2efbb6d455dcf8357f", - "evmDeployedBytecodeBlakeHash": "0x7418dfd4de3ed453eb1e31d297dd728a77d7506e96ab514848f883a886a49d4f", - "evmDeployedBytecodeLength": 4860 + "evmDeployedBytecodeHash": "0x2a21124444ba53dd00e89e00f27883875a60d4dc377f7eb64c7348d1d2c7e03f", + "evmDeployedBytecodeBlakeHash": "0xa83c0efb99ffea574f4b5193aaa3bcfc4ead9c5dce20bd9da6d05ff7d2f708f3", + "evmDeployedBytecodeLength": 4885 }, { "contractName": "l1-contracts/L2ContractHelper", - "zkBytecodeHash": "0x010000070f867354c478b42fba06c4069f5cc9164eec86ab10f44b4fe63db3df", + "zkBytecodeHash": "0x010000074da9c9b540fa0830be1ddd6eb39d2a0fc2d70fc60dd97f3dc87db8cc", "zkBytecodePath": "/l1-contracts/zkout/L2ContractHelper.sol/L2ContractHelper.json", - "evmBytecodeHash": "0x71e9d2996c1fb5e2ec7ff0325e7e8b545c682bb48469f5899e31e84233cd65e1", + "evmBytecodeHash": "0x05fd200cb7818096b5fe48eaebd17e94779080831ccde688b14260161632b559", "evmBytecodePath": "/l1-contracts/out/L2ContractHelper.sol/L2ContractHelper.json", - "evmDeployedBytecodeHash": "0x946b19bfab945676d8611d655b6e28d3c71c22dd2377c930b538a510a9c6b458", - "evmDeployedBytecodeBlakeHash": "0x44bb5b50b5ac81349e62fe5c8fee9f80b3e87bb49bcb556c74f2a33266670ce5", + "evmDeployedBytecodeHash": "0xf7df0f1258363d499231e54822b94dfaeab558010e29e7d5b56b0f5a5fd3f10b", + "evmDeployedBytecodeBlakeHash": "0xc32d73d1c675da58aaf17ce630e4b3fbd5729da3f73398add5d57c04939084a8", "evmDeployedBytecodeLength": 85 }, { "contractName": "l1-contracts/L2GenesisForceDeploymentsHelper", - "zkBytecodeHash": "0x01000007ebe6f62d8091f38ca965efb9695e38e4fc095e5a342d836e7ef210e3", + "zkBytecodeHash": "0x010000078dedfee9019cab85a798799dbdc380354fc5765448cf7b86befc6608", "zkBytecodePath": "/l1-contracts/zkout/L2GenesisForceDeploymentsHelper.sol/L2GenesisForceDeploymentsHelper.json", - "evmBytecodeHash": "0xab139bf8ff3e2b58c14976564e62b354ba7a140f2319e74716d0b28b81e9d39a", + "evmBytecodeHash": "0x94274faa1e3bc4439a889b10543d1d08c57f538e77e7166a11a4e46aea98b06a", "evmBytecodePath": "/l1-contracts/out/L2GenesisForceDeploymentsHelper.sol/L2GenesisForceDeploymentsHelper.json", - "evmDeployedBytecodeHash": "0xf98139350cec76510bbb90bc99403929747437599b6ab6f899e6929c665124b1", - "evmDeployedBytecodeBlakeHash": "0x46f76925fa8fe9e66d944e0444f70bed690a4983ba31c30c8dd60dea818da60e", + "evmDeployedBytecodeHash": "0xe28b32a4579a0b9f907a9f10e32475d08209375892781f4f43beb86109c96356", + "evmDeployedBytecodeBlakeHash": "0x9f8b4537ec12a407a422b9c0bbd13a87a8c60af2c7ff68dbe288037f223433c7", "evmDeployedBytecodeLength": 85 }, { "contractName": "l1-contracts/L2GenesisUpgrade", - "zkBytecodeHash": "0x010003737cb24d89564a9286558df7024be2761c67df029c398da57b74df1f9b", + "zkBytecodeHash": "0x010003796e380e6e765e1372c512fcbba074e6e9cb99ac26b3ba2cdc09adaf27", "zkBytecodePath": "/l1-contracts/zkout/L2GenesisUpgrade.sol/L2GenesisUpgrade.json", - "evmBytecodeHash": "0xa924bb26c26515b5b3b0f85437bbbb60c41a4d3587b535f15fee7d7b87483d25", + "evmBytecodeHash": "0xee3d8aea7885d698221e9f781972bed4e7d43401c39ad8faaffc55ecf211ceac", "evmBytecodePath": "/l1-contracts/out/L2GenesisUpgrade.sol/L2GenesisUpgrade.json", - "evmDeployedBytecodeHash": "0xf6308c1d83f0fe65e531bb3d55a41d6232acfa1931871783b02a7bc64c748062", - "evmDeployedBytecodeBlakeHash": "0xb472029b227d09c56cb8da40c3b8a191bcea6a8bbd424879ee8cb611f19b6c0b", - "evmDeployedBytecodeLength": 12209 + "evmDeployedBytecodeHash": "0x2ec365d0ef3e483fe1f2f7d31177fb4e2d37bf52bd84d2fc048d33ade4ec60d2", + "evmDeployedBytecodeBlakeHash": "0x2d56d6bd7abac965b5f7732a7a016c8d630b5c0d189ad7c9a28b21a14667bdd7", + "evmDeployedBytecodeLength": 12234 }, { "contractName": "l1-contracts/L2MessageRoot", - "zkBytecodeHash": "0x010002df8ba79c4533072410e691de1deb7ca8cd560c49afe60f6ee30a9fbfcb", + "zkBytecodeHash": "0x010002df2de16e34303c534cc419e5edd7a67f2d93bb2790460ddc7db08d3099", "zkBytecodePath": "/l1-contracts/zkout/L2MessageRoot.sol/L2MessageRoot.json", - "evmBytecodeHash": "0x865220f9d8d7c29ef7e121cb76a47086e1ea66752820fe6e4e9ba63d2237cb2a", + "evmBytecodeHash": "0x988c32632e9834e5c7e5cf048f8095618941cc31dc278bdd8eed740852b83f43", "evmBytecodePath": "/l1-contracts/out/L2MessageRoot.sol/L2MessageRoot.json", - "evmDeployedBytecodeHash": "0x5865ccbc7d551fc1802e091886ffa94586436778d22ce646d4bcb392360df5c0", - "evmDeployedBytecodeBlakeHash": "0x9df14aba83ab80ad0df8cd4146b743788f4fcf00d4c8e636040081d44497e639", + "evmDeployedBytecodeHash": "0x5535f4cdfc303b712983e65f94d29ca96680ba688481043401710d61508feb66", + "evmDeployedBytecodeBlakeHash": "0x4b90420a9e7e4036fda7e27663478802101cded158a11d68a0b7a51a08fd1576", "evmDeployedBytecodeLength": 6205 }, { "contractName": "l1-contracts/L2MessageVerification", - "zkBytecodeHash": "0x01000159830d65f782ab4966dcf797f778415068feeb838551e8ae98c5e2c803", + "zkBytecodeHash": "0x010001590ca6a96b6e4aa2b4dfb661dc9de30d7bc336903b6a798c0205ec56e8", "zkBytecodePath": "/l1-contracts/zkout/L2MessageVerification.sol/L2MessageVerification.json", - "evmBytecodeHash": "0xe061431d8b2462499262680a3be1d46d29d3b5474dd5517a8b13348cf75bccca", + "evmBytecodeHash": "0x3bab2ac5b8db8fe37f936ee8b07f396624dca4f4e4a1dffca9304d648ddfe8b4", "evmBytecodePath": "/l1-contracts/out/L2MessageVerification.sol/L2MessageVerification.json", - "evmDeployedBytecodeHash": "0xcfb87b4d716861fc3246ec43bcd86d209bd0c51973561dc92bb1daaf70ad4146", - "evmDeployedBytecodeBlakeHash": "0xc9aaff57f30dbc82dab0b2b48aa9134d8e34e3501f06106c9702ef9b8d6aae4d", + "evmDeployedBytecodeHash": "0x26b989386419d757e19bcf34059fca82921cb26faab427ed52a0f661ec82de8c", + "evmDeployedBytecodeBlakeHash": "0xb04d4244250da795380550ea94f175a7ed5b2f257c3ee3337d2ec8d29db1765d", "evmDeployedBytecodeLength": 4151 }, { "contractName": "l1-contracts/L2NativeTokenVault", - "zkBytecodeHash": "0x0100078d5c6017814059e620728fe0f5bd0bb4f16818cf1e450f92de7c731f4f", + "zkBytecodeHash": "0x0100078da011e3844ff32b132790d11ba87c972dbfc2460da0086df56c54e1a9", "zkBytecodePath": "/l1-contracts/zkout/L2NativeTokenVault.sol/L2NativeTokenVault.json", - "evmBytecodeHash": "0x2f04c0ccc9c98f33e113d649dbf0e6ba0dec35da674cd9fc347a06689b3058e4", + "evmBytecodeHash": "0x559d619c7eeae78460d994231abdd8373fae889f9a999c82e951533825407973", "evmBytecodePath": "/l1-contracts/out/L2NativeTokenVault.sol/L2NativeTokenVault.json", - "evmDeployedBytecodeHash": "0xced2c4f7861fc96b7ce501b28677394dc26ef46657a37dc1fc35bf1a96d2cf17", - "evmDeployedBytecodeBlakeHash": "0x2d80b2ad990423f714ef69c846ccaa4b2b0e3c770aef8147cdfb23104af4de47", + "evmDeployedBytecodeHash": "0x02169f5a678f1e3e8e1e349028ed9c0a6ea9574d5b6b463e1c5458f6396cc58f", + "evmDeployedBytecodeBlakeHash": "0x50be3e9277d71b7b94e2441f38846e70b1dfc07347e7cd8b0b592ce3b6615623", "evmDeployedBytecodeLength": 16809 }, { "contractName": "l1-contracts/L2NativeTokenVaultZKOS", - "zkBytecodeHash": "0x010005c72d26c85889b079ca97234927b5d46d637fc11f1526d84f9b7927c35f", + "zkBytecodeHash": "0x010005c726470aef04001ddec985ec3470e95c19216e8c7707511a9c76e3cc25", "zkBytecodePath": "/l1-contracts/zkout/L2NativeTokenVaultZKOS.sol/L2NativeTokenVaultZKOS.json", - "evmBytecodeHash": "0xda2080bb9204219a8fc20d65cf2e4ba6e712198a1f6268773fbc62baea38e9fc", + "evmBytecodeHash": "0x47ea8d273ee9ee1f23bd215f850c8be4d33771f04b0382b3d9deb14154fa97c4", "evmBytecodePath": "/l1-contracts/out/L2NativeTokenVaultZKOS.sol/L2NativeTokenVaultZKOS.json", - "evmDeployedBytecodeHash": "0x346683d96f68106a10b9f36edea22e1189e45255e05dd465c6d101ea2a360ab9", - "evmDeployedBytecodeBlakeHash": "0x6dac35ffb85d51f76e2de0febb2b0f92ee424e38d51f8401773c17687a595d1c", + "evmDeployedBytecodeHash": "0x1a9049781e8195955276bd4c47086c3653353f768d2b01822b0d5125012489b4", + "evmDeployedBytecodeBlakeHash": "0x53960d87aaf75d16931fd5c959b00805ad2dc25c8085c2445264e5a0306a09a6", "evmDeployedBytecodeLength": 17792 }, { @@ -1351,32 +1371,32 @@ }, { "contractName": "l1-contracts/L2SharedBridgeLegacy", - "zkBytecodeHash": "0x0100019568718522243594ca837101ea200d38c65848aabcd5c60c7c38a275f6", + "zkBytecodeHash": "0x01000195f7096ce77b68c9aa170bb77059ca64fdd50c83a0889fc6441eff25ab", "zkBytecodePath": "/l1-contracts/zkout/L2SharedBridgeLegacy.sol/L2SharedBridgeLegacy.json", - "evmBytecodeHash": "0x2ab58e06af1a343a1911e46fec0e71346b251ef2df6e8fc69494f23bd95030af", + "evmBytecodeHash": "0x2ecaad5b9b7b37483a9819e4439b3175f1538f65aa228633af92d8c171c17e1b", "evmBytecodePath": "/l1-contracts/out/L2SharedBridgeLegacy.sol/L2SharedBridgeLegacy.json", - "evmDeployedBytecodeHash": "0xf9670862fd02195ecbdb3468823ec0d374f215b3e50fc83d5f3990a301e07514", - "evmDeployedBytecodeBlakeHash": "0x1c1853524277e9f9b2b830b24e7cee086d39c61d7bf8b69f8c5da0cdd781e5af", + "evmDeployedBytecodeHash": "0x9ce07d0ece025280fe3b70b61dd8521a4368dd06a50f9dbfad86b0096f14cf0b", + "evmDeployedBytecodeBlakeHash": "0x1b5a85ae88a6bd0b2fa50f9a78720a2c301c5e8f4a5758a4965a1b56d87207f0", "evmDeployedBytecodeLength": 19685 }, { "contractName": "l1-contracts/L2V30TestnetSystemProxiesUpgrade", - "zkBytecodeHash": "0x010001fdb90c8d8097427c2c91c63c1f83b93bfcd9fe2037547725a4bf0f8dc8", + "zkBytecodeHash": "0x01000203dd114bc96add6cf03bb599b49d104dd0a2c1a5dc7995dd517842849e", "zkBytecodePath": "/l1-contracts/zkout/L2V30TestnetSystemProxiesUpgrade.sol/L2V30TestnetSystemProxiesUpgrade.json", - "evmBytecodeHash": "0x784794156393fcfa0c8021d147b939c7b89b134f47919c3abcdc42e0be46dea5", + "evmBytecodeHash": "0x33183d0f5377c4d0e882cc0eed59ea6d85b28cfd2c1ec3a7f40162dce2ee7e77", "evmBytecodePath": "/l1-contracts/out/L2V30TestnetSystemProxiesUpgrade.sol/L2V30TestnetSystemProxiesUpgrade.json", - "evmDeployedBytecodeHash": "0xb311b4bb5bbc9a82e50737a8980a64e56e2c3187ab5e54f02544f45a4e305fe2", - "evmDeployedBytecodeBlakeHash": "0xbe636bbc212bcbbd2025325500a5cc26feac124d2a7799edcc46accd07b06ce1", - "evmDeployedBytecodeLength": 3478 + "evmDeployedBytecodeHash": "0xc9e7bbf6cc73e3a4f0a300714ccffbba6318a93e12b37723547440e84ddff97e", + "evmDeployedBytecodeBlakeHash": "0x6319c7f58d0c3164d763babc4a19724a917bad45cd30451d22bef1a23d39e756", + "evmDeployedBytecodeLength": 3503 }, { "contractName": "l1-contracts/L2WrappedBaseToken", - "zkBytecodeHash": "0x0100034193d8f2fc7b28a5870016fd0eca675caa8e5a3b0c26acbcecb2ca6a41", + "zkBytecodeHash": "0x010003411a5357daa03578923fd990e1ab2a941d21cc7e2b955c15b61a926898", "zkBytecodePath": "/l1-contracts/zkout/L2WrappedBaseToken.sol/L2WrappedBaseToken.json", - "evmBytecodeHash": "0x5e7309e281ec5fdbdd6dd017ad525f8a4125cca711de9352a4172bf947b0333a", + "evmBytecodeHash": "0x14a61a3fd2261865f9d28c45aa3603eed62ca800494ae0cc11a49ca58659ab7a", "evmBytecodePath": "/l1-contracts/out/L2WrappedBaseToken.sol/L2WrappedBaseToken.json", - "evmDeployedBytecodeHash": "0x728f6246e4c8f4d0ca54e58018274a48403554cd79a793bd2a726c80ebf886d0", - "evmDeployedBytecodeBlakeHash": "0x060fda716cf53dbfb97faa02085252ed4154899bb6ad5c1991e1fc96fc986940", + "evmDeployedBytecodeHash": "0xd08a3f1c5f71d50e16ad24b921421666d3e4e93d7dd5df475d63dbe061365322", + "evmDeployedBytecodeBlakeHash": "0x62ea7af3f11478c00f62d484399f2a5c0f9aa8164cd9f70f11f6ae7273bb6e91", "evmDeployedBytecodeLength": 9593 }, { @@ -1401,12 +1421,12 @@ }, { "contractName": "l1-contracts/MailboxFacet", - "zkBytecodeHash": "0x010006c5a5ee48525ec3683607780374a0b59380e1f91a1842bc1cf70f6ddbf0", + "zkBytecodeHash": "0x010006c5650aba5b634bb96f42aa7c5a4382990629716fd9a3176f724fe49259", "zkBytecodePath": "/l1-contracts/zkout/Mailbox.sol/MailboxFacet.json", - "evmBytecodeHash": "0x2cd9736c7478b81c1c05264fded34e0cabbd23afa159de2878380ee4903dda77", + "evmBytecodeHash": "0xcd24760f80e68eb55ea350766b03e9a0f883712edb3d06d4fbec177e6e33158b", "evmBytecodePath": "/l1-contracts/out/Mailbox.sol/MailboxFacet.json", - "evmDeployedBytecodeHash": "0x58bba59e20c0524d53aeadaa2388c29c53fabe4782a1f31190ad6b860758b6ef", - "evmDeployedBytecodeBlakeHash": "0x784e37b5442c2d5ff5afe5a2ba137b61ffd171e34025096fee5c41bee0f7ceee", + "evmDeployedBytecodeHash": "0x3af54952b8189e89f725f8c4526628737a848f479ad8a0d2fa8cd8133630f404", + "evmDeployedBytecodeBlakeHash": "0x1aa57d0b4ea8055b70a64bbcbabaf90e50191829afc4fbff272bfda6e5ffe547", "evmDeployedBytecodeLength": 17026 }, { @@ -1451,12 +1471,12 @@ }, { "contractName": "l1-contracts/PermanentRestriction", - "zkBytecodeHash": "0x01000311603e362b84e45adfdfa3e03d1715d6c4b5f8c492c2a6d6a0e325df1a", + "zkBytecodeHash": "0x010003113138b92a475b4007cbb3cd9d703e71368380e3e413900e6111be3e5e", "zkBytecodePath": "/l1-contracts/zkout/PermanentRestriction.sol/PermanentRestriction.json", - "evmBytecodeHash": "0xf6707bbcbe7f770ba95134a08ca6bbc3716214de6a0888a92ce6322babd23ce0", + "evmBytecodeHash": "0x3a7928a1fe744e7c05f7be0eb9d45f05e6cae2e735e828c321aade9fcb8fa5a2", "evmBytecodePath": "/l1-contracts/out/PermanentRestriction.sol/PermanentRestriction.json", - "evmDeployedBytecodeHash": "0x286bcddde58ff01de5d340dfb8f92281c8234c7b3a2c9e9f906eaf61ddd5e9fb", - "evmDeployedBytecodeBlakeHash": "0xeca095ef780c29d6bc8ce45a899671e9da781b3bf772085ef0891856722042bf", + "evmDeployedBytecodeHash": "0x47f3b5b889f8357ce38bed4a413fd1d9dfa4c750998327d788676d00f91e275e", + "evmDeployedBytecodeBlakeHash": "0xdc38ddad391f5699d7cb73bb70259462f9ff8dc061464137fd155a78be9b5e48", "evmDeployedBytecodeLength": 7907 }, { @@ -1481,12 +1501,12 @@ }, { "contractName": "l1-contracts/PrividiumTransactionFilterer", - "zkBytecodeHash": "0x01000157bd7fd59e92ab80721b2533038d2ba1a56483e9b120dd585aa124e853", + "zkBytecodeHash": "0x01000157e37359af83502bb3ffc1897e292d9a7a3a60013240b155696250b654", "zkBytecodePath": "/l1-contracts/zkout/PrividiumTransactionFilterer.sol/PrividiumTransactionFilterer.json", - "evmBytecodeHash": "0x514ce733994acbb9fdd9bb4493f355d71c4ad3eacceefa1ffe5a2570eb823563", + "evmBytecodeHash": "0xed768662854c2ac82a71302688c42a0dd99baa9290bb5afa554f91de35ed4d36", "evmBytecodePath": "/l1-contracts/out/PrividiumTransactionFilterer.sol/PrividiumTransactionFilterer.json", - "evmDeployedBytecodeHash": "0x9aba8df729f244b9aef2ab651b5fc79d99e3069b380903e4affe65ef3f6254f8", - "evmDeployedBytecodeBlakeHash": "0x15d4670beb43cf3a9522df8a35a167ff1a4edacb83016a7cd5c0dbbffa3f6308", + "evmDeployedBytecodeHash": "0x1b20d1b79891d181a239f31def75e1b7eed78772493d1b11546c98ca9d69744f", + "evmDeployedBytecodeBlakeHash": "0xe23daa236244086621115a2b88463536397b460f9154e0d4ee206cb292130fdf", "evmDeployedBytecodeLength": 4171 }, { @@ -1501,12 +1521,12 @@ }, { "contractName": "l1-contracts/RelayedSLDAValidator", - "zkBytecodeHash": "0x010000fd0e237335f0b12414ef028e9ff028a0cf39ea2e173803a8f216bc2f53", + "zkBytecodeHash": "0x010000fd83937b26409b90b94a59ff5820d81d149effa1088e2daa9c645ade72", "zkBytecodePath": "/l1-contracts/zkout/RelayedSLDAValidator.sol/RelayedSLDAValidator.json", - "evmBytecodeHash": "0xf84edfa4d02f585b03301d989d04e912cc0a3b1b8481b4f32cb8937cef70aee2", + "evmBytecodeHash": "0xc2901b5d88f94c6c2060894363a9ea272e035129b45f892e86be0a85f392b31d", "evmBytecodePath": "/l1-contracts/out/RelayedSLDAValidator.sol/RelayedSLDAValidator.json", - "evmDeployedBytecodeHash": "0xd56bedb34831fcff425e1b9b0f0561647a9d0c0c53ad74c8c81cf611db1eba41", - "evmDeployedBytecodeBlakeHash": "0x23ae0d579341859ef0ed6b412ff63073f21d6920864c871ba0d63e081bd41ffd", + "evmDeployedBytecodeHash": "0x3a125c678cd091f4a00ad9a3103a615d68b70f15866eab2485e236917b124c0c", + "evmDeployedBytecodeBlakeHash": "0x0c490571a95e6e2e56b2b100dfe27efd5775741b0eff2e1f986a58393bbe00ce", "evmDeployedBytecodeLength": 3028 }, { @@ -1641,42 +1661,42 @@ }, { "contractName": "l1-contracts/SystemContractProxy", - "zkBytecodeHash": "0x0100017fce70ca551c276a8c0f11017d7b8d19cb77efd661eecc805f9575fe56", + "zkBytecodeHash": "0x0100017fb648e5d73e865dd315d7d6f20803602ad856cdde7ea3c65ad1ecb986", "zkBytecodePath": "/l1-contracts/zkout/SystemContractProxy.sol/SystemContractProxy.json", "evmBytecodeHash": "0x447b6770d6a0a7e21d2344f5f95380cf839e876bb04dc60f75b984c6d3a46348", "evmBytecodePath": "/l1-contracts/out/SystemContractProxy.sol/SystemContractProxy.json", - "evmDeployedBytecodeHash": "0x09301da5bbb08e078e7a51cdb957dd25945efd0ec3b056137d344c929ecdc9c3", - "evmDeployedBytecodeBlakeHash": "0xb09a95cb43a3f5d388e945b68f8b8a814681d60e8252ed08cba7a3d591a152df", + "evmDeployedBytecodeHash": "0xc266c88307ddffc1f16926a40169c0e4afdb09196ce1be21c0a6faa773b19de1", + "evmDeployedBytecodeBlakeHash": "0x37885c74be2d0deb7e67b4c4654028d1d3c31551967bf45ecfa8c305a79b60f2", "evmDeployedBytecodeLength": 3595 }, { "contractName": "l1-contracts/SystemContractProxyAdmin", - "zkBytecodeHash": "0x010000eb406067db1602b27db6e11714a4b5eb5b55d3e7c796d924390fa9d2ea", + "zkBytecodeHash": "0x010000ebf74da32c950ef4e0ca31c1c6c8e050e9b3db7681e8946e8efcf2b869", "zkBytecodePath": "/l1-contracts/zkout/SystemContractProxyAdmin.sol/SystemContractProxyAdmin.json", "evmBytecodeHash": "0x560df3c08195cf35090946109aa10004332ae86c36bc40cbc321e75aaac2c91a", "evmBytecodePath": "/l1-contracts/out/SystemContractProxyAdmin.sol/SystemContractProxyAdmin.json", - "evmDeployedBytecodeHash": "0x64d1dd713907aac96fe464854e0864aa4f149d975e7fe7332f00e1a6b1a15d96", - "evmDeployedBytecodeBlakeHash": "0x357ffa5d3e1f0e747881961e754730dc5a2f457c1c6fb813f87f7067ee798c9b", + "evmDeployedBytecodeHash": "0x5667c754e8c958ace8a98f1aa465129208a95c32ea0f3088d00f70e68347fa90", + "evmDeployedBytecodeBlakeHash": "0xdb506fca2d7f21969a01e1bfcce2b37e6ccf3b86b95bf65828347f6ff356187e", "evmDeployedBytecodeLength": 2374 }, { "contractName": "l1-contracts/SystemContractsCaller", - "zkBytecodeHash": "0x010000077b0c3e28fba074520862ed5ddcdb029741dae6d8aa5ddb438a980c63", + "zkBytecodeHash": "0x01000007c8a60d7b070397c241434941f32f0e8927bf650199f9f19bc0032983", "zkBytecodePath": "/l1-contracts/zkout/SystemContractsCaller.sol/SystemContractsCaller.json", - "evmBytecodeHash": "0xc85b19a938006538010219a6c5e73d7b6daa0fd441f5fcff85b9f0aeb2313be0", + "evmBytecodeHash": "0x82da752e1e7ddd16778425586942b61e6e739c570e49f6af7da9daf9d37311d5", "evmBytecodePath": "/l1-contracts/out/SystemContractsCaller.sol/SystemContractsCaller.json", - "evmDeployedBytecodeHash": "0xfa7275d9c917e99b2bb453cd3ea28b1e3f82704abdec0003f731526c4f1f8ff1", - "evmDeployedBytecodeBlakeHash": "0xa8897e57f00d7db9ceade0fa67bd884e39e6799ba2f4940b1681a685a968fdd8", + "evmDeployedBytecodeHash": "0xb641bbfeaed3bd4cc66960ec8df32d8f26ade7fe9dea28aafd96d9848ed14138", + "evmDeployedBytecodeBlakeHash": "0x63561c76ebd6c097deb98637e29958e2dd05d105fa216fa9bef096813624c063", "evmDeployedBytecodeLength": 85 }, { "contractName": "l1-contracts/Utils", - "zkBytecodeHash": "0x01000007560163cd816f0ed1434e2460f03fff9feca80bf0cf1edb1e00d5d44b", + "zkBytecodeHash": "0x010000079650757e644fad88b07bba2029a06e96c7c1f1c82886cc556bcae148", "zkBytecodePath": "/l1-contracts/zkout/SystemContractsCaller.sol/Utils.json", - "evmBytecodeHash": "0x86bf86ee2d57bb69e9b2e75597b7a5b624a0db7fae5eccea7b1c6fa9e74c5299", + "evmBytecodeHash": "0xc08ebc1a8c187a6d1ae5d3ddd2c454f405d05702a2b1314f0338465e0bcf4562", "evmBytecodePath": "/l1-contracts/out/SystemContractsCaller.sol/Utils.json", - "evmDeployedBytecodeHash": "0x86e7f069864aa259a952679fe33239ead633f90f30a3529f88e57b6ecd594f58", - "evmDeployedBytecodeBlakeHash": "0xbad4c9d3319437d22547a7ed90a9c90e7cac21d3a280dfc277c6c1d764ecd2d5", + "evmDeployedBytecodeHash": "0xcc5d8fb78cd30cd2889214ac99e01b424731d5d7e131b3ee58a770f04269e673", + "evmDeployedBytecodeBlakeHash": "0x84b32ee545cdffcb6c5de8ec5df5da028a07f1d66ccf1b6c1bf1ddba5d8a2bf8", "evmDeployedBytecodeLength": 85 }, { @@ -1751,12 +1771,12 @@ }, { "contractName": "l1-contracts/UpgradeableBeaconDeployer", - "zkBytecodeHash": "0x0100005336ae94b66226e0de5e2e4cc69bbc66ff269cb3be8659c8e28289455a", + "zkBytecodeHash": "0x01000053b77a9cf17f728361e8017adc83272661a010ce4aad7de01dc90f73f4", "zkBytecodePath": "/l1-contracts/zkout/UpgradeableBeaconDeployer.sol/UpgradeableBeaconDeployer.json", - "evmBytecodeHash": "0xf79491e7d05a016c76dca331f86d060e27111f1849c1b107cc8270973bfec064", + "evmBytecodeHash": "0x46a318ec1ecdd7db767bbcdf2cabdde877ac4a02a069b71b67f13c166f8bb153", "evmBytecodePath": "/l1-contracts/out/UpgradeableBeaconDeployer.sol/UpgradeableBeaconDeployer.json", - "evmDeployedBytecodeHash": "0xdb0d981bf1867108c27f2c52334c4f31d8bb88e17f6955ce8593056808697460", - "evmDeployedBytecodeBlakeHash": "0xc49018245ed5bebb0e9124546c1716a564864c451ec6e65931cc80bbe5400cc6", + "evmDeployedBytecodeHash": "0x82e35b2268fe4e42cb3ff83147bae3ab7d8e90b38f3c930565b97e9325888c24", + "evmDeployedBytecodeBlakeHash": "0xc7b444988486e6d27e4a0398514be7ff9fae5fdf7738dff672d5ede0a4529301", "evmDeployedBytecodeLength": 14867 }, { @@ -1789,6 +1809,16 @@ "evmDeployedBytecodeBlakeHash": "0xfac1a27a101d4caeeda886682b2dda912a165844efd2660b6280f029ebb2ca09", "evmDeployedBytecodeLength": 62 }, + { + "contractName": "l1-contracts/ZKOSContractDeployer", + "zkBytecodeHash": "0x01000031f19f7e16e4a0b09f264bc8176d32826633dd5c1bd95e8fdc1b293759", + "zkBytecodePath": "/l1-contracts/zkout/ZKOSContractDeployer.sol/ZKOSContractDeployer.json", + "evmBytecodeHash": "0x1f1c60b396a70b24647ea3a584342505027ca1cf5816bd08c6cc3d84cce097c3", + "evmBytecodePath": "/l1-contracts/out/ZKOSContractDeployer.sol/ZKOSContractDeployer.json", + "evmDeployedBytecodeHash": "0xce786bf513a69ae5c1569452f86b110a778e0998629dcb50fb5cd8f39226c591", + "evmDeployedBytecodeBlakeHash": "0xc1744736999f5196f47b57c52b23a75627ce351c59506e87f97c71cfbdd06964", + "evmDeployedBytecodeLength": 752 + }, { "contractName": "l1-contracts/ZKSyncOSBytecodeInfo", "zkBytecodeHash": "0x01000007e73350af261498df3851101f840c3f45576aab6f45aadeb500bdf15e", @@ -1849,6 +1879,16 @@ "evmDeployedBytecodeBlakeHash": "0xe8fcc85943a267f175fbff93d888b0fb3c29d62ae880610062e39a7ee987590e", "evmDeployedBytecodeLength": 17226 }, + { + "contractName": "l1-contracts/Burner", + "evmBytecodeHash": "0x635c0d1d0b871b69f3dc668fcd4914c3dbdb89a03dee04276d2cd7ae6c95fbd2", + "evmBytecodePath": "/l1-contracts/out/Burner.sol/Burner.json", + "evmDeployedBytecodeHash": "0xea26ad98f944cb887e75db2b3f1d2ecdf25fa4d051bb18ffeb4dfab6bbef82fe", + "evmDeployedBytecodeBlakeHash": "0x11f66881906e5ffe5f70b8f597c276a39fb23ff69a70790eec0fbc690497b70c", + "evmDeployedBytecodeLength": 62, + "zkBytecodeHash": null, + "zkBytecodePath": null + }, { "contractName": "l1-contracts/Create2AndTransfer", "evmBytecodeHash": "0x598759953f0ac2961d9f2c462a452d7d1232ee715df0a233125f17fdccf9afec", @@ -1859,6 +1899,16 @@ "zkBytecodeHash": null, "zkBytecodePath": null }, + { + "contractName": "l1-contracts/L2BaseToken", + "evmBytecodeHash": "0x5477ac7ebb0345351c2e4ab7869997990c8bb742c6a00ccdcd06307f58cc1eeb", + "evmBytecodePath": "/l1-contracts/out/L2BaseToken.sol/L2BaseToken.json", + "evmDeployedBytecodeHash": "0x8bbef2823223f6c6c9b0b4c06c904fb74a792c2081ffdedc558afd689db7e05e", + "evmDeployedBytecodeBlakeHash": "0x07f03f6a601719d40fec6ca1eb701df8aa27ab98684fca14e569478aa24326dc", + "evmDeployedBytecodeLength": 1732, + "zkBytecodeHash": null, + "zkBytecodePath": null + }, { "contractName": "l1-contracts/MockERC20", "evmBytecodeHash": "0x71cdfca8fbccd49a36e2310efc21ac79451ca9c56ad3d4e7747e20da2d461f85", diff --git a/l1-contracts/contracts/common/Config.sol b/l1-contracts/contracts/common/Config.sol index 6ce6a2cc40..0ab97d287e 100644 --- a/l1-contracts/contracts/common/Config.sol +++ b/l1-contracts/contracts/common/Config.sol @@ -227,3 +227,9 @@ enum L2DACommitmentScheme { /// @dev The L2 data availability commitment scheme that permanent rollups are expected to use. L2DACommitmentScheme constant ROLLUP_L2_DA_COMMITMENT_SCHEME = L2DACommitmentScheme.BLOBS_AND_PUBDATA_KECCAK256; + +/// @dev Minimal allowed code size limit, equals to EVM EIP-170 value. +uint32 constant MIN_CODE_SIZE_LIMIT = 0x6000; + +/// @dev Maximal allowed code size limit, 1 MB. +uint32 constant MAX_CODE_SIZE_LIMIT = 0x100000; diff --git a/l1-contracts/contracts/common/L1ContractErrors.sol b/l1-contracts/contracts/common/L1ContractErrors.sol index e288260c6e..28bdffd407 100644 --- a/l1-contracts/contracts/common/L1ContractErrors.sol +++ b/l1-contracts/contracts/common/L1ContractErrors.sol @@ -134,6 +134,8 @@ error IncorrectBatchBounds( ); // 0xc1b4bc7b error IncorrectBatchChainId(uint256, uint256); +// 0x55424854 +error IncorrectBatchCodeSizeLimit(uint32, uint32); // 0xdd381a4c error IncorrectBridgeHubAddress(address bridgehub); // 0x1929b7de @@ -394,6 +396,10 @@ error ZeroGasPriceL1TxZKsyncOS(); error ZKChainLimitReached(); // 0x646ac57e error ZKsyncOSNotForceDeployForExistingContract(address); +// 0xbcfe4b69 +error CodeSizeLimitTooLow(uint32 codeSizeLimit, uint32 minCodeSizeLimit); +// 0x47386ac7 +error CodeSizeLimitTooBig(uint32 codeSizeLimit, uint32 maxCodeSizeLimit); enum SharedBridgeKey { PostUpgradeFirstBatch, diff --git a/l1-contracts/contracts/common/l2-helpers/IL2ToL1Messenger.sol b/l1-contracts/contracts/common/l2-helpers/IL2ToL1MessengerEra.sol similarity index 99% rename from l1-contracts/contracts/common/l2-helpers/IL2ToL1Messenger.sol rename to l1-contracts/contracts/common/l2-helpers/IL2ToL1MessengerEra.sol index 3486b87b2b..829dd1be8f 100644 --- a/l1-contracts/contracts/common/l2-helpers/IL2ToL1Messenger.sol +++ b/l1-contracts/contracts/common/l2-helpers/IL2ToL1MessengerEra.sol @@ -45,7 +45,7 @@ uint256 constant STATE_DIFF_COMPRESSION_VERSION_NUMBER = 1; * - The contract on L1 accepts all sent messages and if the message came from this system contract * it requires the preimage of `value` to be provided. */ -interface IL2ToL1Messenger { +interface IL2ToL1MessengerEra { // Possibly in the future we will be able to track the messages sent to L1 with // some hooks in the VM. For now, it is much easier to track them with L2 events. event L1MessageSent(address indexed _sender, bytes32 indexed _hash, bytes _message); diff --git a/l1-contracts/contracts/common/l2-helpers/IL2ToL1MessengerZKSyncOS.sol b/l1-contracts/contracts/common/l2-helpers/IL2ToL1MessengerZKSyncOS.sol new file mode 100644 index 0000000000..df1296d364 --- /dev/null +++ b/l1-contracts/contracts/common/l2-helpers/IL2ToL1MessengerZKSyncOS.sol @@ -0,0 +1,25 @@ +// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. +pragma solidity ^0.8.20; + +/** + * @author Matter Labs + * @custom:security-contact security@matterlabs.dev + * @notice Smart contract for sending arbitrary length messages to L1 + * @dev by default ZkSync can send fixed-length messages on L1. + * A fixed length message has 4 parameters `senderAddress`, `isService`, `key`, `value`, + * the first one is taken from the context, the other three are chosen by the sender. + * @dev To send a variable-length message we use this trick: + * - This system contract accepts an arbitrary length message and sends a fixed length message with + * parameters `senderAddress == this`, `isService == true`, `key == msg.sender`, `value == keccak256(message)`. + * - The contract on L1 accepts all sent messages and if the message came from this system contract + * it requires that the preimage of `value` be provided. + */ +interface IL2ToL1MessengerZKSyncOS { + /// @notice L2 event emitted to track L1 messages. + event L1MessageSent(address indexed _sender, bytes32 indexed _hash, bytes _message); + + /// @notice Sends an arbitrary length message to L1. + /// @param _message The variable length message to be sent to L1. + /// @return Returns the keccak256 hashed value of the message. + function sendToL1(bytes calldata _message) external returns (bytes32); +} diff --git a/l1-contracts/contracts/common/l2-helpers/L2ContractAddresses.sol b/l1-contracts/contracts/common/l2-helpers/L2ContractAddresses.sol index 3ce1bb29c0..f4fc873f2a 100644 --- a/l1-contracts/contracts/common/l2-helpers/L2ContractAddresses.sol +++ b/l1-contracts/contracts/common/l2-helpers/L2ContractAddresses.sol @@ -2,7 +2,7 @@ // We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. pragma solidity ^0.8.21; -import {IL2ToL1Messenger} from "./IL2ToL1Messenger.sol"; +import {IL2ToL1MessengerEra} from "./IL2ToL1MessengerEra.sol"; import {IL2InteropRootStorage} from "../interfaces/IL2InteropRootStorage.sol"; import {IMessageVerification} from "../../state-transition/chain-interfaces/IMessageVerification.sol"; @@ -33,7 +33,7 @@ address constant L2_FORCE_DEPLOYER_ADDR = address(SYSTEM_CONTRACTS_OFFSET + 0x07 /// @dev The address of the L2ToL1Messenger system contract address constant L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR = address(SYSTEM_CONTRACTS_OFFSET + 0x08); /// @dev The address of the special smart contract that can send arbitrary length message as an L2 log -IL2ToL1Messenger constant L2_TO_L1_MESSENGER_SYSTEM_CONTRACT = IL2ToL1Messenger( +IL2ToL1MessengerEra constant L2_TO_L1_MESSENGER_SYSTEM_CONTRACT = IL2ToL1MessengerEra( L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR ); @@ -99,3 +99,12 @@ address constant L2_CHAIN_ASSET_HANDLER_ADDR = address(USER_CONTRACTS_OFFSET + 0 address constant L2_NTV_BEACON_DEPLOYER_ADDR = address(USER_CONTRACTS_OFFSET + 0x0b); address constant L2_SYSTEM_CONTRACT_PROXY_ADMIN_ADDR = address(USER_CONTRACTS_OFFSET + 0x0c); + +/// @dev the offset for the system hooks for ZKsync OS +uint160 constant SYSTEM_HOOKS_OFFSET = 0x7000; + +/// @dev The address of the L2ToL1Messenger system hook +address constant L1_MESSENGER_HOOK = address(SYSTEM_HOOKS_OFFSET + 0x01); + +/// @dev The address of the system hook responsible for setting bytecode on address. Can only be called from L2_COMPLEX_UPGRADER address +address constant SET_BYTECODE_ON_ADDRESS_HOOK = address(SYSTEM_HOOKS_OFFSET + 0x02); diff --git a/l1-contracts/contracts/l2-system/zksync-os/Burner.sol b/l1-contracts/contracts/l2-system/zksync-os/Burner.sol new file mode 100644 index 0000000000..07fdc4ca5d --- /dev/null +++ b/l1-contracts/contracts/l2-system/zksync-os/Burner.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +/** + * @author Matter Labs + * @custom:security-contact security@matterlabs.dev + * @notice Helper burner contract used for base token withdrawals. + */ +contract Burner { + constructor() payable { + selfdestruct(payable(address(this))); + } +} diff --git a/l1-contracts/contracts/l2-system/zksync-os/L1MessageGasLib.sol b/l1-contracts/contracts/l2-system/zksync-os/L1MessageGasLib.sol new file mode 100644 index 0000000000..5aa0a41ec8 --- /dev/null +++ b/l1-contracts/contracts/l2-system/zksync-os/L1MessageGasLib.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.28; + +library L1MessageGasLib { + uint256 internal constant SHA3 = 30; + uint256 internal constant SHA3WORD = 6; + uint256 internal constant LOG = 375; + uint256 internal constant LOGDATA = 8; + uint256 internal constant L2_TO_L1_LOG_SERIALIZE_SIZE = 88; + + function ceilDiv(uint256 x, uint256 y) internal pure returns (uint256) { + return (x + y - 1) / y; + } + + /// @dev Exact Solidity equivalent of `keccak256_ergs_cost(len) / ERGS_PER_GAS` + function gasKeccak(uint256 len) internal pure returns (uint256) { + uint256 words = ceilDiv(len, 32); + return SHA3 + SHA3WORD * words; + } + + /// @dev Exact Solidity equivalent of `l1_message_ergs_cost / ERGS_PER_GAS` + function estimateL1MessageGas(uint256 messageLen) internal pure returns (uint256) { + uint256 hashing = gasKeccak(L2_TO_L1_LOG_SERIALIZE_SIZE) + gasKeccak(64) * 3 + gasKeccak(messageLen); + uint256 logCost = LOG + LOGDATA * messageLen; + return hashing + logCost; + } +} diff --git a/l1-contracts/contracts/l2-system/zksync-os/L1Messenger.sol b/l1-contracts/contracts/l2-system/zksync-os/L1Messenger.sol new file mode 100644 index 0000000000..0f0137f29a --- /dev/null +++ b/l1-contracts/contracts/l2-system/zksync-os/L1Messenger.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {L1_MESSENGER_HOOK} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {IL2ToL1MessengerZKSyncOS} from "contracts/common/l2-helpers/IL2ToL1MessengerZKSyncOS.sol"; +import {L1MessengerHookFailed, NotEnoughGasSupplied, NotSelfCall} from "./errors/ZKOSContractErrors.sol"; +import {L1MessageGasLib} from "./L1MessageGasLib.sol"; + +/** + * @author Matter Labs + * @custom:security-contact security@matterlabs.dev + * @notice Smart contract for sending arbitrary length messages to L1 + * @dev by default ZKsync can send fixed length messages on L1. + * A fixed length message has 4 parameters `senderAddress` `isService`, `key`, `value`, + * the first one is taken from the context, the other three are chosen by the sender. + * @dev To send a variable length message we use this trick: + * - This system contract accepts a arbitrary length message and sends a fixed length message with + * parameters `senderAddress == this`, `marker == true`, `key == msg.sender`, `value == keccak256(message)`. + * - The contract on L1 accepts all sent messages and if the message came from this system contract + * it requires that the preimage of `value` be provided. + */ +contract L1Messenger is IL2ToL1MessengerZKSyncOS { + function burnGas(bytes calldata _message) internal { + uint256 gasToBurn = L1MessageGasLib.estimateL1MessageGas(_message.length); + + // If not enough gas to burn the desired amount, revert + if ((gasleft() * 63) / 64 < gasToBurn) { + revert NotEnoughGasSupplied(); + } + + (bool success, ) = address(this).call{gas: gasToBurn}(""); + success; // ignored + } + + /// @notice Public functionality to send messages to L1. + /// @param _message The message intended to be sent to L1. + function sendToL1(bytes calldata _message) external returns (bytes32 hash) { + // As a first step we burn the respective amount of gas, which is the explicit cost of sending L2->L1 message. + burnGas(_message); + + // Call system hook at the known system address. + // Calldata to the hook is exactly `message`. + (bool ok, ) = L1_MESSENGER_HOOK.call(abi.encodePacked(msg.sender, _message)); + require(ok, L1MessengerHookFailed()); + hash = keccak256(_message); + + emit L1MessageSent(msg.sender, hash, _message); + } + + // --- Burner entrypoint: only callable by self --- + fallback() external { + // This fallback is used *only* for self-call burning + require(msg.sender == address(this), NotSelfCall()); + assembly { + invalid() + } + } +} diff --git a/l1-contracts/contracts/l2-system/zksync-os/L2BaseToken.sol b/l1-contracts/contracts/l2-system/zksync-os/L2BaseToken.sol new file mode 100644 index 0000000000..15f5ef89f5 --- /dev/null +++ b/l1-contracts/contracts/l2-system/zksync-os/L2BaseToken.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {L2_TO_L1_MESSENGER_SYSTEM_CONTRACT} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {IMailboxImpl} from "contracts/state-transition/chain-interfaces/IMailbox.sol"; +import {Burner} from "./Burner.sol"; +import {IBaseToken} from "./ZKOSContractHelper.sol"; +import {L1MessengerSendFailed} from "./errors/ZKOSContractErrors.sol"; + +/** + * @author Matter Labs + * @custom:security-contact security@matterlabs.dev + * @notice Native ETH contract. + * @dev It does NOT provide interfaces for personal interaction with tokens like `transfer`, `approve`, and `transferFrom`. + * Instead, this contract is used only as an entrypoint for native token withdrawals. + */ +contract L2BaseToken is IBaseToken { + /// @notice Initiate the withdrawal of the base token, funds will be available to claim on L1 `finalizeEthWithdrawal` method. + /// @param _l1Receiver The address on L1 to receive the funds. + function withdraw(address _l1Receiver) external payable { + uint256 amount = _burnMsgValue(); + + // Send the L2 log, a user could use it as proof of the withdrawal + bytes memory message = _getL1WithdrawMessage(_l1Receiver, amount); + bytes32 msgHash = L2_TO_L1_MESSENGER_SYSTEM_CONTRACT.sendToL1(message); + if (msgHash == bytes32(0)) revert L1MessengerSendFailed(); + + emit Withdrawal(msg.sender, _l1Receiver, amount); + } + + /// @notice Initiate the withdrawal of the base token, with the sent message. The funds will be available to claim on L1 `finalizeEthWithdrawal` method. + /// @param _l1Receiver The address on L1 to receive the funds. + /// @param _additionalData Additional data to be sent to L1 with the withdrawal. + function withdrawWithMessage(address _l1Receiver, bytes calldata _additionalData) external payable { + uint256 amount = _burnMsgValue(); + + // Send the L2 log, a user could use it as proof of the withdrawal + bytes memory message = _getExtendedWithdrawMessage(_l1Receiver, amount, msg.sender, _additionalData); + bytes32 msgHash = L2_TO_L1_MESSENGER_SYSTEM_CONTRACT.sendToL1(message); + if (msgHash == bytes32(0)) revert L1MessengerSendFailed(); + + emit WithdrawalWithMessage(msg.sender, _l1Receiver, amount, _additionalData); + } + + /// @dev The function burn the sent `msg.value`. + /// NOTE: Since this contract holds the mapping of all ether balances of the system, + /// the sent `msg.value` is added to the `this` balance before the call. + /// So the balance of `address(this)` is always bigger or equal to the `msg.value`! + function _burnMsgValue() internal returns (uint256 amount) { + amount = msg.value; + + if (amount == 0) return 0; + new Burner{value: amount}(); + } + + /// @dev Get the message to be sent to L1 to initiate a withdrawal. + function _getL1WithdrawMessage(address _to, uint256 _amount) internal pure returns (bytes memory) { + return abi.encodePacked(IMailboxImpl.finalizeEthWithdrawal.selector, _to, _amount); + } + + /// @dev Get the message to be sent to L1 to initiate a withdrawal. + function _getExtendedWithdrawMessage( + address _to, + uint256 _amount, + address _sender, + bytes memory _additionalData + ) internal pure returns (bytes memory) { + // solhint-disable-next-line func-named-parameters + return abi.encodePacked(IMailboxImpl.finalizeEthWithdrawal.selector, _to, _amount, _sender, _additionalData); + } +} diff --git a/l1-contracts/contracts/l2-system/zksync-os/ZKOSContractDeployer.sol b/l1-contracts/contracts/l2-system/zksync-os/ZKOSContractDeployer.sol new file mode 100644 index 0000000000..47871117a5 --- /dev/null +++ b/l1-contracts/contracts/l2-system/zksync-os/ZKOSContractDeployer.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.28; + +import {L2_COMPLEX_UPGRADER_ADDR, SET_BYTECODE_ON_ADDRESS_HOOK} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {IZKOSContractDeployer} from "./interfaces/IZKOSContractDeployer.sol"; +import {SetBytecodeOnAddressHookFailed, Unauthorized} from "./errors/ZKOSContractErrors.sol"; + +/// @title ZKOSContractDeployer +/// @notice Minimal wrapper that forwards to the set bytecode on address system hook at a hardcoded address. +contract ZKOSContractDeployer is IZKOSContractDeployer { + /// @notice Checks that the message sender is the native token vault. + modifier onlyComplexUpgrader() { + if (msg.sender != L2_COMPLEX_UPGRADER_ADDR) { + revert Unauthorized(msg.sender); + } + _; + } + + /// @inheritdoc IZKOSContractDeployer + function setBytecodeDetailsEVM( + address _addr, + bytes32 _bytecodeHash, + uint32 _bytecodeLength, + bytes32 _observableBytecodeHash, + uint32 _observableBytecodeLength + ) external override onlyComplexUpgrader { + (bool ok, ) = SET_BYTECODE_ON_ADDRESS_HOOK.call( + abi.encode(_addr, _bytecodeHash, _bytecodeLength, _observableBytecodeHash, _observableBytecodeLength) + ); + + if (!ok) { + revert SetBytecodeOnAddressHookFailed(); + } + } +} diff --git a/l1-contracts/contracts/l2-system/zksync-os/ZKOSContractHelper.sol b/l1-contracts/contracts/l2-system/zksync-os/ZKOSContractHelper.sol new file mode 100644 index 0000000000..9a48905788 --- /dev/null +++ b/l1-contracts/contracts/l2-system/zksync-os/ZKOSContractHelper.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. +pragma solidity ^0.8.20; + +/** + * @author Matter Labs + * @custom:security-contact security@matterlabs.dev + * @notice Interface for the contract that is used to simulate Base Token on L2. + */ +interface IBaseToken { + /// @notice Allows the withdrawal of Base Token to a given L1 receiver. + /// @param _l1Receiver The address on L1 to receive the withdrawn Base Token. + function withdraw(address _l1Receiver) external payable; + + /// @notice Allows the withdrawal of Base Token to a given L1 receiver along with an additional message. + /// @param _l1Receiver The address on L1 to receive the withdrawn Base Token. + /// @param _additionalData Additional message or data to be sent alongside the withdrawal. + function withdrawWithMessage(address _l1Receiver, bytes memory _additionalData) external payable; + + /// @notice Emitted when a base-token withdrawal is initiated. + /// @param _l2Sender The L2 address that initiated the withdrawal. + /// @param _l1Receiver The L1 address that will receive the withdrawn Base Token. + /// @param _amount The amount of Base Token (in wei) withdrawn. + event Withdrawal(address indexed _l2Sender, address indexed _l1Receiver, uint256 _amount); + + /// @notice Emitted when a base-token withdrawal with an additional message is initiated. + /// @param _l2Sender The L2 address that initiated the withdrawal. + /// @param _l1Receiver The L1 address that will receive the withdrawn Base Token. + /// @param _amount The amount of Base Token (in wei) withdrawn. + /// @param _additionalData Arbitrary data/message forwarded alongside the withdrawal. + event WithdrawalWithMessage( + address indexed _l2Sender, + address indexed _l1Receiver, + uint256 _amount, + bytes _additionalData + ); +} diff --git a/l1-contracts/contracts/l2-system/zksync-os/errors/ZKOSContractErrors.sol b/l1-contracts/contracts/l2-system/zksync-os/errors/ZKOSContractErrors.sol new file mode 100644 index 0000000000..6a017f2f7b --- /dev/null +++ b/l1-contracts/contracts/l2-system/zksync-os/errors/ZKOSContractErrors.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. +pragma solidity ^0.8.20; + +// 0xf801b069 +error L1MessengerHookFailed(); +// 0xa3628b43 +error L1MessengerSendFailed(); +// 0x497087ab +error NotEnoughGasSupplied(); +// 0xec7cdc0a +error NotSelfCall(); +// 0x058f5efe +error SetBytecodeOnAddressHookFailed(); +// 0x8e4a23d6 +error Unauthorized(address); diff --git a/l1-contracts/contracts/l2-upgrades/IZKOSContractDeployer.sol b/l1-contracts/contracts/l2-system/zksync-os/interfaces/IZKOSContractDeployer.sol similarity index 91% rename from l1-contracts/contracts/l2-upgrades/IZKOSContractDeployer.sol rename to l1-contracts/contracts/l2-system/zksync-os/interfaces/IZKOSContractDeployer.sol index 5c420fa14c..688b4d13d8 100644 --- a/l1-contracts/contracts/l2-upgrades/IZKOSContractDeployer.sol +++ b/l1-contracts/contracts/l2-system/zksync-os/interfaces/IZKOSContractDeployer.sol @@ -17,6 +17,7 @@ interface IZKOSContractDeployer { address _addr, bytes32 _bytecodeHash, uint32 _bytecodeLength, - bytes32 _observableBytecodeHash + bytes32 _observableBytecodeHash, + uint32 _observableBytecodeLength ) external; } diff --git a/l1-contracts/contracts/l2-upgrades/L2GenesisForceDeploymentsHelper.sol b/l1-contracts/contracts/l2-upgrades/L2GenesisForceDeploymentsHelper.sol index 605d2bd002..7dc77a6661 100644 --- a/l1-contracts/contracts/l2-upgrades/L2GenesisForceDeploymentsHelper.sol +++ b/l1-contracts/contracts/l2-upgrades/L2GenesisForceDeploymentsHelper.sol @@ -8,7 +8,7 @@ import {FixedForceDeploymentsData, ZKChainSpecificForceDeploymentsData} from ".. import {IL2WrappedBaseToken} from "../bridge/interfaces/IL2WrappedBaseToken.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; import {SystemContractProxyAdmin} from "./SystemContractProxyAdmin.sol"; -import {IZKOSContractDeployer} from "./IZKOSContractDeployer.sol"; +import {IZKOSContractDeployer} from "contracts/l2-system/zksync-os/interfaces/IZKOSContractDeployer.sol"; import {L2NativeTokenVault} from "../bridge/ntv/L2NativeTokenVault.sol"; import {L2MessageRoot} from "../bridgehub/L2MessageRoot.sol"; import {L2Bridgehub} from "../bridgehub/L2Bridgehub.sol"; @@ -50,14 +50,16 @@ library L2GenesisForceDeploymentsHelper { } function unsafeForceDeployZKsyncOS(bytes memory _bytecodeInfo, address _newAddress) internal { - (bytes32 bytecodeHash, uint32 bytecodeLength, bytes32 observableBytecodeHash) = abi.decode( - _bytecodeInfo, - (bytes32, uint32, bytes32) - ); + ( + bytes32 bytecodeHash, + uint32 bytecodeLength, + bytes32 observableBytecodeHash, + uint32 observableBytecodeLength + ) = abi.decode(_bytecodeInfo, (bytes32, uint32, bytes32, uint32)); bytes memory data = abi.encodeCall( IZKOSContractDeployer.setBytecodeDetailsEVM, - (_newAddress, bytecodeHash, bytecodeLength, observableBytecodeHash) + (_newAddress, bytecodeHash, bytecodeLength, observableBytecodeHash, observableBytecodeLength) ); // Note, that we dont use interface, but raw call to avoid Solidity checking for empty bytecode diff --git a/l1-contracts/contracts/state-transition/ChainTypeManagerBase.sol b/l1-contracts/contracts/state-transition/ChainTypeManagerBase.sol index b515a9bfb1..56643e4d82 100644 --- a/l1-contracts/contracts/state-transition/ChainTypeManagerBase.sol +++ b/l1-contracts/contracts/state-transition/ChainTypeManagerBase.sol @@ -438,7 +438,8 @@ abstract contract ChainTypeManagerBase is IChainTypeManager, ReentrancyGuard, Ow // construct init data bytes memory initData; - /// all together 4+9*32=292 bytes for the selector + mandatory data + // It consists from chain specific part and general part(which is same for all the chains and it's fixed as part of `initialCutHash`) + // all together 4+8*32=260 bytes for the selector and chain specific part + general part // solhint-disable-next-line func-named-parameters initData = bytes.concat( IDiamondInit.initialize.selector, diff --git a/l1-contracts/contracts/state-transition/chain-deps/DiamondInit.sol b/l1-contracts/contracts/state-transition/chain-deps/DiamondInit.sol index fd5b508fff..e50dad1df3 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/DiamondInit.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/DiamondInit.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.28; import {Diamond} from "../libraries/Diamond.sol"; import {ZKChainBase} from "./facets/ZKChainBase.sol"; -import {L2_TO_L1_LOG_SERIALIZE_SIZE, MAX_GAS_PER_TRANSACTION, DEFAULT_PRECOMMITMENT_FOR_THE_LAST_BATCH} from "../../common/Config.sol"; +import {L2_TO_L1_LOG_SERIALIZE_SIZE, MAX_GAS_PER_TRANSACTION, DEFAULT_PRECOMMITMENT_FOR_THE_LAST_BATCH, MIN_CODE_SIZE_LIMIT} from "../../common/Config.sol"; import {IDiamondInit, InitializeData} from "../chain-interfaces/IDiamondInit.sol"; import {PriorityQueue} from "../libraries/PriorityQueue.sol"; import {PriorityTree} from "../libraries/PriorityTree.sol"; @@ -84,6 +84,8 @@ contract DiamondInit is ZKChainBase, IDiamondInit { s.priorityTree.setup(s.__DEPRECATED_priorityQueue.getTotalPriorityTxs()); s.precommitmentForTheLatestBatch = DEFAULT_PRECOMMITMENT_FOR_THE_LAST_BATCH; s.zksyncOS = IS_ZKSYNC_OS; + // by default we set code size limit to minimal(EVM) value, can be changed later by admin. + s.codeSizeLimit = MIN_CODE_SIZE_LIMIT; // While this does not provide a protection in the production, it is needed for local testing // Length of the L2Log encoding should not be equal to the length of other L2Logs' tree nodes preimages diff --git a/l1-contracts/contracts/state-transition/chain-deps/ZKChainStorage.sol b/l1-contracts/contracts/state-transition/chain-deps/ZKChainStorage.sol index 7c975626d7..1ccc439a0d 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/ZKChainStorage.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/ZKChainStorage.sol @@ -183,4 +183,6 @@ struct ZKChainStorage { bool zksyncOS; /// @dev The scheme of L2 DA commitment. Different L1 validators may use different schemes. L2DACommitmentScheme l2DACommitmentScheme; + /// @dev The code size limit. Used ONLY for ZKsync OS, ignored for Era VM. + uint32 codeSizeLimit; } diff --git a/l1-contracts/contracts/state-transition/chain-deps/facets/Admin.sol b/l1-contracts/contracts/state-transition/chain-deps/facets/Admin.sol index b00496abbb..f0f818f3b3 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/facets/Admin.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/facets/Admin.sol @@ -14,12 +14,12 @@ import {IL1Bridgehub} from "../../../bridgehub/IL1Bridgehub.sol"; import {ZKChainBase} from "./ZKChainBase.sol"; import {IChainTypeManager} from "../../IChainTypeManager.sol"; import {IL1GenesisUpgrade} from "../../../upgrades/IL1GenesisUpgrade.sol"; -import {AlreadyPermanentRollup, DenominatorIsZero, DiamondAlreadyFrozen, DiamondNotFrozen, HashMismatch, InvalidDAForPermanentRollup, InvalidPubdataPricingMode, PriorityTxPubdataExceedsMaxPubDataPerBatch, NotAZKChain, ProtocolIdMismatch, ProtocolIdNotGreater, TooMuchGas, Unauthorized, InvalidL2DACommitmentScheme} from "../../../common/L1ContractErrors.sol"; +import {AlreadyPermanentRollup, DenominatorIsZero, DiamondAlreadyFrozen, DiamondNotFrozen, HashMismatch, InvalidDAForPermanentRollup, InvalidPubdataPricingMode, PriorityTxPubdataExceedsMaxPubDataPerBatch, NotAZKChain, ProtocolIdMismatch, ProtocolIdNotGreater, TooMuchGas, Unauthorized, InvalidL2DACommitmentScheme, CodeSizeLimitTooLow, CodeSizeLimitTooBig} from "../../../common/L1ContractErrors.sol"; import {AlreadyMigrated, ContractNotDeployed, ExecutedIsNotConsistentWithVerified, InvalidNumberOfBatchHashes, L1DAValidatorAddressIsZero, NotAllBatchesExecuted, NotChainAdmin, NotEraChain, NotHistoricalRoot, NotL1, NotMigrated, OutdatedProtocolVersion, ProtocolVersionNotUpToDate, VerifiedIsNotConsistentWithCommitted} from "../../L1StateTransitionErrors.sol"; import {RollupDAManager} from "../../data-availability/RollupDAManager.sol"; import {L2_DEPLOYER_SYSTEM_CONTRACT_ADDR} from "../../../common/l2-helpers/L2ContractAddresses.sol"; import {AllowedBytecodeTypes, IL2ContractDeployer} from "../../../common/interfaces/IL2ContractDeployer.sol"; -import {L1_SETTLEMENT_LAYER_VIRTUAL_ADDRESS} from "../../../common/Config.sol"; +import {L1_SETTLEMENT_LAYER_VIRTUAL_ADDRESS, MIN_CODE_SIZE_LIMIT, MAX_CODE_SIZE_LIMIT} from "../../../common/Config.sol"; // While formally the following import is not used, it is needed to inherit documentation from it import {IZKChainBase} from "../../chain-interfaces/IZKChainBase.sol"; @@ -207,6 +207,17 @@ contract AdminFacet is ZKChainBase, IAdmin { emit EnableEvmEmulator(); } + /// @inheritdoc IAdmin + function setCodeSizeLimit(uint32 _codeSizeLimit) external onlyAdmin { + if (_codeSizeLimit < MIN_CODE_SIZE_LIMIT) { + revert CodeSizeLimitTooLow(_codeSizeLimit, MIN_CODE_SIZE_LIMIT); + } + if (_codeSizeLimit > MAX_CODE_SIZE_LIMIT) { + revert CodeSizeLimitTooBig(_codeSizeLimit, MAX_CODE_SIZE_LIMIT); + } + s.codeSizeLimit = _codeSizeLimit; + } + /*////////////////////////////////////////////////////////////// UPGRADE EXECUTION //////////////////////////////////////////////////////////////*/ diff --git a/l1-contracts/contracts/state-transition/chain-deps/facets/Executor.sol b/l1-contracts/contracts/state-transition/chain-deps/facets/Executor.sol index ccb0a0ce1a..2c2ad4bbc9 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/facets/Executor.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/facets/Executor.sol @@ -15,7 +15,7 @@ import {L2_BOOTLOADER_ADDRESS, L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, L2_TO_L1_ import {IChainTypeManager} from "../../IChainTypeManager.sol"; import {PriorityOpsBatchInfo, PriorityTree} from "../../libraries/PriorityTree.sol"; import {IL1DAValidator, L1DAValidatorOutput} from "../../chain-interfaces/IL1DAValidator.sol"; -import {IncorrectBatchChainId, BatchHashMismatch, BatchNumberMismatch, CanOnlyProcessOneBatch, CantExecuteUnprovenBatches, CantRevertExecutedBatch, HashMismatch, InvalidLogSender, InvalidMessageRoot, InvalidNumberOfBlobs, InvalidProof, InvalidProtocolVersion, InvalidSystemLogsLength, L2TimestampTooBig, LogAlreadyProcessed, MissingSystemLogs, NonIncreasingTimestamp, NonSequentialBatch, PriorityOperationsRollingHashMismatch, RevertedBatchNotAfterNewLastBatch, SystemLogsSizeTooBig, TimeNotReached, TimestampError, TxHashMismatch, UnexpectedSystemLog, UpgradeBatchNumberIsNotZero, ValueMismatch, VerifiedBatchesExceedsCommittedBatches, InvalidBatchNumber, EmptyPrecommitData, PrecommitmentMismatch, InvalidPackedPrecommitmentLength, NonZeroBlobToVerifyZKsyncOS, InvalidBlockRange} from "../../../common/L1ContractErrors.sol"; +import {IncorrectBatchChainId, IncorrectBatchCodeSizeLimit, BatchHashMismatch, BatchNumberMismatch, CanOnlyProcessOneBatch, CantExecuteUnprovenBatches, CantRevertExecutedBatch, HashMismatch, InvalidLogSender, InvalidMessageRoot, InvalidNumberOfBlobs, InvalidProof, InvalidProtocolVersion, InvalidSystemLogsLength, L2TimestampTooBig, LogAlreadyProcessed, MissingSystemLogs, NonIncreasingTimestamp, NonSequentialBatch, PriorityOperationsRollingHashMismatch, RevertedBatchNotAfterNewLastBatch, SystemLogsSizeTooBig, TimeNotReached, TimestampError, TxHashMismatch, UnexpectedSystemLog, UpgradeBatchNumberIsNotZero, ValueMismatch, VerifiedBatchesExceedsCommittedBatches, InvalidBatchNumber, EmptyPrecommitData, PrecommitmentMismatch, InvalidPackedPrecommitmentLength, NonZeroBlobToVerifyZKsyncOS, InvalidBlockRange} from "../../../common/L1ContractErrors.sol"; import {CommitBasedInteropNotSupported, DependencyRootsRollingHashMismatch, InvalidBatchesDataLength, MessageRootIsZero, MismatchNumberOfLayer1Txs, MismatchL2DACommitmentScheme} from "../../L1StateTransitionErrors.sol"; // While formally the following import is not used, it is needed to inherit documentation from it @@ -193,6 +193,9 @@ contract ExecutorFacet is ZKChainBase, IExecutor { if (_newBatch.chainId != s.chainId) { revert IncorrectBatchChainId(_newBatch.chainId, s.chainId); } + if (_newBatch.codeSizeLimit != s.codeSizeLimit) { + revert IncorrectBatchCodeSizeLimit(_newBatch.codeSizeLimit, s.codeSizeLimit); + } if (_newBatch.daCommitmentScheme != s.l2DACommitmentScheme) { revert MismatchL2DACommitmentScheme(uint256(_newBatch.daCommitmentScheme), uint256(s.l2DACommitmentScheme)); } @@ -203,6 +206,7 @@ contract ExecutorFacet is ZKChainBase, IExecutor { bytes32 batchOutputHash = keccak256( abi.encodePacked( _newBatch.chainId, + _newBatch.codeSizeLimit, _newBatch.firstBlockTimestamp, _newBatch.lastBlockTimestamp, uint256(_newBatch.daCommitmentScheme), diff --git a/l1-contracts/contracts/state-transition/chain-deps/facets/Getters.sol b/l1-contracts/contracts/state-transition/chain-deps/facets/Getters.sol index a878497417..2b7f558fc0 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/facets/Getters.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/facets/Getters.sol @@ -243,6 +243,11 @@ contract GettersFacet is ZKChainBase, IGetters, ILegacyGetters { return (s.l1DAValidator, s.l2DACommitmentScheme); } + /// @inheritdoc IGetters + function getCodeSizeLimit() external view returns (uint32) { + return s.codeSizeLimit; + } + /*////////////////////////////////////////////////////////////// DIAMOND LOUPE //////////////////////////////////////////////////////////////*/ diff --git a/l1-contracts/contracts/state-transition/chain-interfaces/IAdmin.sol b/l1-contracts/contracts/state-transition/chain-interfaces/IAdmin.sol index d45b830d0d..c7b4c9b31e 100644 --- a/l1-contracts/contracts/state-transition/chain-interfaces/IAdmin.sol +++ b/l1-contracts/contracts/state-transition/chain-interfaces/IAdmin.sol @@ -50,6 +50,9 @@ interface IAdmin is IZKChainBase { /// @notice Allow EVM emulation on chain function allowEvmEmulation() external returns (bytes32 canonicalTxHash); + /// @notice set contracts code size limit for the chain + function setCodeSizeLimit(uint32 _codeSizeLimit) external; + /// @notice Perform the upgrade from the current protocol version with the corresponding upgrade data /// @param _protocolVersion The current protocol version from which upgrade is executed /// @param _cutData The diamond cut parameters that is executed in the upgrade diff --git a/l1-contracts/contracts/state-transition/chain-interfaces/IDiamondInit.sol b/l1-contracts/contracts/state-transition/chain-interfaces/IDiamondInit.sol index 721e202513..9bc7561df8 100644 --- a/l1-contracts/contracts/state-transition/chain-interfaces/IDiamondInit.sol +++ b/l1-contracts/contracts/state-transition/chain-interfaces/IDiamondInit.sol @@ -5,6 +5,7 @@ pragma solidity ^0.8.21; import {IVerifier, VerifierParams} from "./IVerifier.sol"; import {FeeParams} from "../chain-deps/ZKChainStorage.sol"; +/// @dev Chain initialization data /// @param chainId the id of the chain /// @param bridgehub the address of the bridgehub contract /// @param chainTypeManager contract's address @@ -39,6 +40,7 @@ struct InitializeData { FeeParams feeParams; } +/// @dev General part of the chain initialize data, this part of data is same for all chains. /// @param verifier address of Verifier contract /// @param verifierParams Verifier config parameters that describes the circuit to be verified /// @param l2BootloaderBytecodeHash The hash of bootloader L2 bytecode diff --git a/l1-contracts/contracts/state-transition/chain-interfaces/IExecutor.sol b/l1-contracts/contracts/state-transition/chain-interfaces/IExecutor.sol index 236e67f22c..916f17d646 100644 --- a/l1-contracts/contracts/state-transition/chain-interfaces/IExecutor.sol +++ b/l1-contracts/contracts/state-transition/chain-interfaces/IExecutor.sol @@ -134,9 +134,16 @@ interface IExecutor is IZKChainBase { /// (state root, block number, bloch hashes) /// @param numberOfLayer1Txs Number of priority operations to be processed /// @param priorityOperationsHash Hash of all priority operations from this batch + /// @param dependencyRootsRollingHash Hash of imported dependency interop roots /// @param l2LogsTreeRoot Root hash of tree that contains L2 -> L1 messages from this batch /// @param daCommitmentScheme commitment scheme used to generate pubdata commitment for this batch /// @param daCommitment commitment to the batch pubdata to validate DA in the l1 da validator + /// @param firstBlockTimestamp timestamp of the first block in the batch + /// @param firstBlockNumber number of the first block in the batch + /// @param lastBlockTimestamp timestamp of the last block in the batch + /// @param lastBlockNumber number of the last block in the batch + /// @param chainId chain id used during batch execution + /// @param codeSizeLimit code size limit used during batch execution // solhint-disable-next-line gas-struct-packing struct CommitBatchInfoZKsyncOS { uint64 batchNumber; @@ -152,6 +159,7 @@ interface IExecutor is IZKChainBase { uint64 lastBlockTimestamp; uint64 lastBlockNumber; uint256 chainId; + uint32 codeSizeLimit; bytes operatorDAInput; } diff --git a/l1-contracts/contracts/state-transition/chain-interfaces/IGetters.sol b/l1-contracts/contracts/state-transition/chain-interfaces/IGetters.sol index 1f0364aeb7..12eb91382e 100644 --- a/l1-contracts/contracts/state-transition/chain-interfaces/IGetters.sol +++ b/l1-contracts/contracts/state-transition/chain-interfaces/IGetters.sol @@ -174,4 +174,7 @@ interface IGetters is IZKChainBase { /// @return DA configuration. function getDAValidatorPair() external view returns (address, L2DACommitmentScheme); + + /// @return codeSizeLimit chain contract size limit. + function getCodeSizeLimit() external view returns (uint32); } diff --git a/l1-contracts/contracts/state-transition/libraries/BatchDecoder.sol b/l1-contracts/contracts/state-transition/libraries/BatchDecoder.sol index 7c42685f55..a6c5cfdb2c 100644 --- a/l1-contracts/contracts/state-transition/libraries/BatchDecoder.sol +++ b/l1-contracts/contracts/state-transition/libraries/BatchDecoder.sol @@ -17,7 +17,7 @@ library BatchDecoder { uint8 internal constant SUPPORTED_ENCODING_VERSION = 1; /// @notice The currently supported encoding version for ZKSync OS commit data. /// We use different encoding only for commit, while prove/execute are common for Era VM and ZKsync OS chains. - uint8 internal constant SUPPORTED_ENCODING_VERSION_COMMIT_ZKSYNC_OS = 3; + uint8 internal constant SUPPORTED_ENCODING_VERSION_COMMIT_ZKSYNC_OS = 4; /// @notice Decodes commit data from a calldata bytes into the last committed batch data and an array of new batch data. /// @param _commitData The calldata byte array containing the data for committing batches. diff --git a/l1-contracts/package.json b/l1-contracts/package.json index 19b717c1ff..8b9e71e59e 100644 --- a/l1-contracts/package.json +++ b/l1-contracts/package.json @@ -58,7 +58,7 @@ "scripts": { "build": "hardhat compile && CONTRACTS_BASE_NETWORK_ZKSYNC=true hardhat compile ", "build-l1": "hardhat compile", - "build:foundry": "forge build && forge build --zksync --skip '*/l1-contracts/test/*'", + "build:foundry": "forge build && forge build --zksync --skip '*/l1-contracts/test/*' 'L2BaseToken.sol' 'Burner.sol'", "clean": "hardhat clean && CONTRACTS_BASE_NETWORK_ZKSYNC=true hardhat clean", "clean:foundry": "forge clean", "test": "yarn workspace da-contracts build && hardhat test test/unit_tests/*.spec.ts --network hardhat", diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Executor/_Executor_Shared.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Executor/_Executor_Shared.t.sol index e7393d1823..ab9d7a67c4 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Executor/_Executor_Shared.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Executor/_Executor_Shared.t.sol @@ -336,7 +336,8 @@ contract ExecutorTest is Test { lastBlockTimestamp: uint64(currentTimestamp), lastBlockNumber: uint64(2), chainId: l2ChainId, - operatorDAInput: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + operatorDAInput: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + codeSizeLimit: 0x6000 }); dummyBridgehub.setZKChain(l2ChainId, address(diamondProxy)); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/data-availability/RelayedSLDAValidator.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/data-availability/RelayedSLDAValidator.t.sol index a8ddbb608e..3927d7bd29 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/data-availability/RelayedSLDAValidator.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/data-availability/RelayedSLDAValidator.t.sol @@ -7,7 +7,7 @@ import {Utils} from "../../Utils/Utils.sol"; import {RelayedSLDAValidator} from "contracts/state-transition/data-availability/RelayedSLDAValidator.sol"; import {L1DAValidatorOutput, PubdataSource} from "contracts/state-transition/chain-interfaces/IL1DAValidator.sol"; import {L2_BRIDGEHUB_ADDR, L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IL2ToL1Messenger} from "contracts/common/l2-helpers/IL2ToL1Messenger.sol"; +import {IL2ToL1MessengerEra} from "contracts/common/l2-helpers/IL2ToL1MessengerEra.sol"; import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; import {InvalidPubdataSource, L1DAValidatorInvalidSender, PubdataInputTooSmall} from "contracts/state-transition/L1StateTransitionErrors.sol"; @@ -21,7 +21,7 @@ contract RelayedSLDAValidatorTest is Test { vm.etch(address(L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR), abi.encode(address(daValidator))); vm.mockCall( address(L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR), - abi.encodeWithSelector(IL2ToL1Messenger.sendToL1.selector), + abi.encodeWithSelector(IL2ToL1MessengerEra.sendToL1.selector), abi.encode(bytes32(0)) ); vm.mockCall( diff --git a/l1-contracts/test/foundry/zksync-os/unit/L1MessengerTest.t.sol b/l1-contracts/test/foundry/zksync-os/unit/L1MessengerTest.t.sol new file mode 100644 index 0000000000..91fd94cddc --- /dev/null +++ b/l1-contracts/test/foundry/zksync-os/unit/L1MessengerTest.t.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.28; + +import "forge-std/Test.sol"; +import {L1_MESSENGER_HOOK} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import "contracts/l2-system/zksync-os/L1Messenger.sol"; +import {IL2ToL1MessengerZKSyncOS} from "contracts/common/l2-helpers/IL2ToL1MessengerZKSyncOS.sol"; + +contract L1MessengerTest is Test { + L1Messenger messenger; + + function setUp() public { + messenger = new L1Messenger(); + } + + function test_sendToL1_works_andEmitsEvent() public { + bytes memory message = hex"aaaaaaaaaaaaaaaa"; // arbitrary payload + bytes32 expectedHash = keccak256(message); + + // The hook is called with abi.encodePacked(msg.sender, _message) + bytes memory hookCalldata = abi.encodePacked(address(this), message); + + // Mock the system hook call to always succeed and return empty bytes + vm.mockCall( + L1_MESSENGER_HOOK, + hookCalldata, + "" // return data (unused) + ); + + // Expect the event + // expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData) + // Only `sender` is indexed; `hash` and `message` are in data. + vm.expectEmit(true, false, false, true); + emit IL2ToL1MessengerZKSyncOS.L1MessageSent(address(this), expectedHash, message); + + uint256 gasBefore = gasleft(); + bytes32 retHash = messenger.sendToL1(message); + uint256 gasAfter = gasleft(); + + uint256 gasUsed = gasBefore - gasAfter; + emit log_named_uint("gas used by sendToL1", gasUsed); + + assertEq(retHash, expectedHash, "returned hash mismatch"); + } +}