Contract 0xb88690461ddbab6f04dfad7df66b7725942feb9c 17

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x2bf97b48940e1bd134f62dc1ab135f208f4eaf83d0902b80f0087cdcbc33676dDeposit1360653682023-09-30 9:41:44147 days 6 hrs ago0x788da985a3d5cf6f42f52b658b7c10700873475d IN  Across Protocol: Arbitrum Spoke Pool V20.00105899551222 ETH0.00003680.1
0x64c3a995ed92d6f1688bc6b91220a0cfc363216220b6451c967a43f9356a84adDeposit1360642242023-09-30 9:36:57147 days 6 hrs ago0x090dc78ab251f423868fd90e0d3c4117af0bf41b IN  Across Protocol: Arbitrum Spoke Pool V20.000880546932484 ETH0.00003880.1
0xf3a4c95e59d700012f0a921e0e9e5858d6c0ce719a67e262cb01b1192344326fTransfer1040654682023-06-23 10:03:29246 days 6 hrs ago0x69345a224c7f30babc2aff1f0f8fc539c26cbe48 IN  Across Protocol: Arbitrum Spoke Pool V20.001226305696978 ETH0.000020670.1
0x3ba03db07d912802d749a2debc85b01383144a765560c23d9e84f8d507f202a7Execute Relayer ...842587562023-04-25 20:23:11304 days 19 hrs ago0x9a8f92a830a5cb89a3816e3d267cb7791c16b04d IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000160460.1
0x199bcdfacc11877166c4f85537ceb008530212d008c211f9a8ea11b0709d60cdExecute Relayer ...842584282023-04-25 20:21:48304 days 19 hrs ago0x9a8f92a830a5cb89a3816e3d267cb7791c16b04d IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000160880.1
0x458d98c9e8ae9c96f0cd4a7dfa3bc302012fd0df7e2f4ddb004a533b399f8263Relay Root Bundl...842560382023-04-25 20:11:13304 days 20 hrs ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.00000580.1
0x190c4537438f21572cfbf599aff0917e92e06d250ceef70f6e9a0dab317fc437Relay Root Bundl...842285842023-04-25 18:16:27304 days 21 hrs ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.00000580.1
0xfc82718bf98ec4851b0765e9df1d20b197eaa6be30912c33b7570b05e54b5decSet Enable Route841869132023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0xdaf56b286ac4f499fb6817b8fbf531b24f2ea9df326ce501ce1e4811b4928390Set Enable Route841869122023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0x4b69a93d6802526b0cd66a72e97d4bd98ea6a7b90c334cc77f76a83040e53b82Set Enable Route841869112023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0x963104f584c5ef2676815dd30029743576660e823e8b9fc04232fa8fc7a283b4Set Enable Route841869102023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0xf0e4c2dbc81038dd54fe1e45ab824fa6b7b3f30e4b60d15733b4370d3850849aSet Enable Route841869092023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0x7b0f8b4f7ae28f3e09f59fba3a12fea5fad436cec5839c019e6c72931b0f28d4Set Enable Route841869082023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0x9467cad7eaa027b32f8010308c222ee0be2b1c772b165740b805c62d9f18f3a6Set Enable Route841869072023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0x264a1faca9d07f2c6cad6b3dce8cfc1afdbf0d5f53ceb1e969546a9dd77de5dcSet Enable Route841869062023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0xd6421c53b153cdcad0066b6041116b0e67b4fcbd6d4200a20aa105f764a004e0Set Enable Route841869052023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0xad026de8214bc291c7af54a06741a241d860a7dbb52b26787509a6fa892221f8Set Enable Route841869042023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0x3348a021895a729e67d698fb6d9dddcef9501def510d7985544171f17492956cSet Enable Route841869032023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0x20946bf45205d8e41d100370b3c96c55aaafd2cf3fc8a18c49794f10bea2aa80Set Enable Route841869022023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0x088564841ab695a5df53c2c958961d025f4aabfff1e93a319781203ac834a5e5Set Enable Route841869012023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0xba6b531ab7fdd575a4568c9294ab24c8b3c07d9ca72cf84c69c35b6190651797Set Enable Route841869002023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0x7b06d213a28525676adbcd91da7054c95e1573adfdc91bcf7d00edf08a2da3deSet Enable Route841868992023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0x5667331e9a392334764f264fa9ff13ba31426a0ba9aa1cf53cedeed2ad511104Set Enable Route841868982023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0xf4e2680c8690163c207a9f43cca5e3f384eae317b52184e60af658277077fdbeSet Enable Route841868972023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
0xbcf682a04c3be6eebbffed78cc306c28ec6b6e57091188b9e3af564576ff0306Set Enable Route841868962023-04-25 15:23:23305 days 51 mins ago0xd297fa914353c44b2e33ebe05f21846f1048cfeb IN  Across Protocol: Arbitrum Spoke Pool V20 ETH0.000002940.1
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x1f9f809166d77388f15dc72c6ef41cca35b7d03a8d5650b14167c5cc17ef94a6861991842023-05-01 13:18:19299 days 2 hrs ago Socket: Across L2 Implementation Across Protocol: Arbitrum Spoke Pool V23.069458938870913636 ETH
0xdc62269da36a0b5937814a52ad6e41031a9df8099783cd1bcb6d8c275df1eff3858013172023-04-30 9:31:39300 days 6 hrs ago Socket: Across L2 Implementation Across Protocol: Arbitrum Spoke Pool V20.219474770606062198 ETH
0x9d85bd9df6829093fd6abbdab7ab1bea7c16732d76b00f5e26faea15316b18d0843711292023-04-26 4:30:27304 days 11 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.025395385 ETH
0x832c1625b3896792c61ec6f8ee703e6aa84edb4dbeec7828695a21c0926bbc34843706422023-04-26 4:28:17304 days 11 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.024875 ETH
0xc5041f928f91a8c6cef6b69a0dc6e779337abc46a25afa483093fd6b6acc3cd3843704712023-04-26 4:27:31304 days 11 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.024875 ETH
0xe9c85ceece0a45b7f2335b629ccf6640ba789cf15dabc17e1e0070856635ae4b843702602023-04-26 4:26:36304 days 11 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.024875 ETH
0x52b76fccd065f5aa3275e04628240b0c7cfcdebfd221fe3e9f94e0c9dc89fcde843691722023-04-26 4:21:49304 days 11 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.026410285 ETH
0x8806496b3c8e9916cedc96e0799a55d14d5430e3147751ca6ad74ba81a647a81843676592023-04-26 4:15:10304 days 11 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.026705190894099101 ETH
0xec4d17f2e69cc79dd1da75e99ab2a0fab9cfdbe72f569838fdba2991210218b1843672192023-04-26 4:13:16304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.02431587534086207 ETH
0xe67092e394f26b28ac173264f4983a355588c3f69593f1052524b8c500d9a932843670172023-04-26 4:12:24304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.02454423182086207 ETH
0xf596455aab2720c2dfbba9caa99f02277b943ba54ef8b8c1a1c66301a3f95585843666892023-04-26 4:11:00304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.026607295 ETH
0xbb5342b1f24875dfd0c9ef8524b57aee36536d76f7e21c256b18f2e937c9209f843658282023-04-26 4:07:11304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.024875 ETH
0x06cb46d735b54a5c402db441e8d2abec8bcbd1863431185ab7e23ca9be5d868c843655972023-04-26 4:06:11304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.025334182575083978 ETH
0x7af6183d50e811a05a87df61d2c6c269a5af0c4b489da042e72f0276ab9b5fa3843655892023-04-26 4:06:09304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.027148369565599101 ETH
0x0b519ce60ae9d7c4e765401e78cbbcbe3bad69307acff18e2a5ef5fe54981e90843655832023-04-26 4:06:07304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.02520031153786207 ETH
0x55677d87fcc0ecfce6f14bd3fd31ad14cd6077fc5ea6387cfdf590b73e9131fa843654822023-04-26 4:05:42304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.025395385 ETH
0x5cdd1e31afed296b82a3fc125aa4de40b3b8b2d8b56d21c662b197912fcedd1d843650922023-04-26 4:04:02304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.025334182575083978 ETH
0x0c432d095978edfdcfd6d53095cb642125c4bf4ca4cbe2f80244c5f4fee7247b843650782023-04-26 4:03:59304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.027148369565599101 ETH
0x4608fd90119b4b22df54a0a78cef4174e6f0c8860aaa1bf0f0cee78911d794d7843650242023-04-26 4:03:45304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.02520031153786207 ETH
0x0a6bdee2e92d22fe185319ad34ecee2afe40498f6fb8c7426f3cf05c8ce80b9d843649162023-04-26 4:03:18304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.025395385 ETH
0x2ac2a3e33fa2243273773519016ea9f422c9cdc6a1a2e1a6239fcc8cb9a86930843620252023-04-26 3:50:50304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.026865 ETH
0x16e3eddd84b03d45a6b868f7dfe8a5dcb3531d557bafb3b48eed8f26f0844364843616812023-04-26 3:49:20304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.026865 ETH
0x20a8bd2cd0ece018814ccd4f8af53ab99a80f720d207c153cd73c2ede7549bf9843616742023-04-26 3:49:19304 days 12 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.026865 ETH
0x698a9dbff64f5d80e0dc241cb7433df3fa2901e929f27e148b42ed2777cfd6df843407242023-04-26 2:20:07304 days 13 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.024875 ETH
0xc7111e89ad878da284226422c6dc0dd95d84498fff241f568c9d4a47d46a3f4b843402362023-04-26 2:18:01304 days 13 hrs ago 0x777777773fdd8b28bb03377d10fcea75ad9768da Across Protocol: Arbitrum Spoke Pool V20.002946574061706959 ETH
[ Download CSV Export 
Latest 25 Deposits
L2 Txn Hash L1 Deposit Txn Value Token
0x69de78afca5b046f4be6519578ba1245482201bebda44de3186e64f52e41aa102023-04-25 9:10:59305 days 7 hrs ago0xfbe9dec32ba126e9cefecb74a53a8a3b921d1ac54d81af467ddafd6bd471b75e78,803.573434 Bridged USDC (USDC.e)
0x258cd214882df21e8bf0176c4818e9871e52a78fa46a20ed296811df725fb62c2023-04-25 6:40:47305 days 9 hrs ago0x627abf97d041bf9cb1488fe80b87a47ca4a55da2801fe41c5eb2fb7b29c9530751.790477329849647559 Wrapped Ethe... (WETH)
0x84d50d5b188522b611c6e9e33011a39110e6aba85bcdad875f831e420e8c67512023-04-25 4:10:47305 days 12 hrs ago0xf93b46c26d9a6745e651c01bff7e0e47e89007c3aa2bef18b52f415d895bd14824,525.919627 Bridged USDC (USDC.e)
0xd7300bcad0b4cdeb193f79982533c28d9985b6231eecd9a00f4f14a0d6c434742023-04-25 4:10:47305 days 12 hrs ago0xf93b46c26d9a6745e651c01bff7e0e47e89007c3aa2bef18b52f415d895bd148763.538605816478190855 Dai Stableco... (DAI)
0x76c0690d253f55cd21ee3e54f0b199eafe6e331372c2790fc399fc91f6a849172023-04-25 1:40:47305 days 14 hrs ago0x0aedcf41dfe68675c4a155ed38eaa138baca270145811df45c610f596d1ede6b5,003.261347114095658002 Dai Stableco... (DAI)
0x88a9619d3912b11caf29a785be054475748c21a50606a4a51a93467dfe9a64f52023-04-24 20:40:47305 days 19 hrs ago0xe3d800d4c230530c671260115aebbfa9f31f4ffcd9e8eedb1b71a50755e9d20f0.68099816 Wrapped BTC (WBTC)
0x9fb7e724f5c44243a35bea63906a4758561dabec2f3dbe3ac649028a4e85116e2023-04-23 14:40:47307 days 1 hr ago0xe01bfef0bb2a547992e43e6eab2d1f2e6c93489fc86350db1121c8a7cd2f29d628,444.803295995404559834 Dai Stableco... (DAI)
0x387f19dd8437f2ee0209b8c919989a0ee9dbb790faaeed4446cf1b825e6ae31e2023-04-23 7:10:47307 days 9 hrs ago0xf3181a23d99bf1bc19bf8a00bc5fa72de3848398b8d8f9cba0e0cea35d00e6f370.685165840556292618 Dai Stableco... (DAI)
0x985e4bf89991ae3eba0215d09a55d39816bc0a6edaf41f046eb7b381eb21d6db2023-04-23 4:40:59307 days 11 hrs ago0xc045848d4118f64b77bfb8a3b196de6098228877062f6c0660114d98e532bbf81.3986139 Wrapped BTC (WBTC)
0x3fcf3d466e740e2d54fa86f1f8ca8ca4eba49240d943b7c0c4ac36de3e54a0072023-04-22 23:41:11307 days 16 hrs ago0xff8b7b184950034b46714c8a1b5ce0c83397647a67b900e40c9421cdfc7f1dde350.587850465490720883 Dai Stableco... (DAI)
0x668f5b0767e36a317d627bdbd29f213523dd91af68101f887493e266623436542023-04-22 13:40:59308 days 2 hrs ago0x9c87fe2c66b7ea48f445ca2b3476c29a0f0c7e60704a6cdfe19165fa6ed39dc71,362.371795813309276572 Dai Stableco... (DAI)
0xde29f5fdcdc5d8697b79e67872c980a46678eeecf3fa5d99272daeda6c6204bd2023-04-22 11:10:59308 days 5 hrs ago0x74c5fcb617cfcda47531d1c7d0fb65326119bc618eb2e8afa72df9c4b12b56631,560.1646051758247617 Dai Stableco... (DAI)
0xb69b573170bb0ff8ab41f60508381ec30747dd18fb3b171f18de33402a3e2c8d2023-04-19 14:40:59311 days 1 hr ago0x41b8a855f2b9cd3556d8620052c6f87088aee61850b34c90b4500ebf11a45e4d592.328521205215880008 Dai Stableco... (DAI)
0xeba757dd05e30f3d3c52e2ac8e9268b5b75ac68bd83b6d9a2707cd7ac8f5e8ac2023-04-19 12:10:59311 days 4 hrs ago0x87ba32df4baa3c4eee213de727d6dd1f7f0a8d4d728d630f94165ef3101feda62,620.518390905607239946 Dai Stableco... (DAI)
0x324b0e3a810ba2b7109d7b14d98e917a018241ddc690ddde28c9d6ec4ab265e82023-04-17 12:40:47313 days 3 hrs ago0xa1e67f5b88db4be088474c669f9cff1c403e004ebf55f0518fda68fd96bd8d257,194.232770157100880544 Dai Stableco... (DAI)
0xfc0b44828aabab261e2411290a68c59c83c86a9508d98d8dec1cc0793800b6232023-04-17 2:40:59313 days 13 hrs ago0xb65c7e3670d2d8fc1b0e3a14dea071f6ee427a09fa77093a9da6051da6f4b30a2,055.763777092848812137 Dai Stableco... (DAI)
0xbdae7444c446d6564667ac81d5e73c2fb4ef8117538c6f446a7f9835fca5f0b62023-04-17 0:10:47313 days 16 hrs ago0xacf499619d0594209cca753b11d32f335186fd450e0f4da16e3c2c13b4c1b30980.105699709833249796 Dai Stableco... (DAI)
0xf49b48fe0cffb48eef364480c9975782e4f40b70e6deb231255346b9796860322023-04-16 21:40:59313 days 18 hrs ago0x31607a3aa942d0fcca41a10d516b740fd74fa65b7f87e83aa9617f4c34006e86293.8655538616277935 Dai Stableco... (DAI)
0x6f64c87abcc149c37c860dfcbf841374667f9ff6dae3d45af6786648187f46482023-04-16 19:10:59313 days 21 hrs ago0x7d36e9ec4743461af1270c36e3f1234d81bded28b720ade53e130bbee8941d233,979.370334588358049838 Dai Stableco... (DAI)
0x8104714792063e0e7df0abcf80e91dd7b1ef4aefb4e3923be85210d21fc674132023-04-15 15:40:47315 days 34 mins ago0xe886be93cf729a7b7fe2d26fdf2b302f8cb3eae51f25ee1a280749dc9521ebd91,601.499162818536631757 Dai Stableco... (DAI)
0xfa6b5a4e1a339ce6794349991f5848cec864532df2d8edf275b2e9d4c0f934832023-04-14 17:10:47315 days 23 hrs ago0x9f2dc2364b4dda56475d1129ae649846e3fe38fb6d5c85335b2c42712d0f76dd1,915.584882605886941248 Dai Stableco... (DAI)
0xec7e57baf7036998a14e4cad1f44c4704a850ed2bd9334a89eff52bd3ff1350a2023-04-14 12:10:47316 days 4 hrs ago0x6f340b37117875ea0861c7e5b0fe63153be3815f4c1dd61784f6d9a65e7d641f3,122.076057614381469051 Dai Stableco... (DAI)
0xb2078ddd8f7a10f313f079c576b21bf55dfa35df6913c5a00d6fae3d5d4884982023-04-14 7:11:11316 days 9 hrs ago0x5c6f0b15b18144a5de9a827199ce93a1bacf5368e22023fe350d79a60c987f26338.975854019408744513 Dai Stableco... (DAI)
0x0e92a931672728990c62678e010e1023f47799c593ee16ca57d0b9ff8c57fd5d2023-04-13 21:11:23316 days 19 hrs ago0x5d5f4f81ae2aeffa3666d5084a185b64985f07ad30b56e571f838f0cec08fba74,454.699475898202409323 Across Proto... (ACX)
0xf7a893695239533001aa297e1c729d21be4f2adeaa80396303bb5a440dcd46702023-04-13 18:40:47316 days 21 hrs ago0x10d7bc2bcaa13ebb1e4d325eb730e426c206473c51cedca487235900bec1a01e4,154.251663334069526869 Dai Stableco... (DAI)
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Arbitrum_SpokePool

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion, GNU AGPLv3 license
File 1 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 2 of 17 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 3 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 4 of 17 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 5 of 17 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 6 of 17 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 7 of 17 : MultiCaller.sol
// This contract is taken from Uniswaps's multi call implementation (https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/base/Multicall.sol)
// and was modified to be solidity 0.8 compatible. Additionally, the method was restricted to only work with msg.value
// set to 0 to avoid any nasty attack vectors on function calls that use value sent with deposits.
pragma solidity ^0.8.0;

/// @title MultiCaller
/// @notice Enables calling multiple methods in a single call to the contract
contract MultiCaller {
    function multicall(bytes[] calldata data) external payable returns (bytes[] memory results) {
        require(msg.value == 0, "Only multicall with 0 value");
        results = new bytes[](data.length);
        for (uint256 i = 0; i < data.length; i++) {
            (bool success, bytes memory result) = address(this).delegatecall(data[i]);

            if (!success) {
                // Next 5 lines from https://ethereum.stackexchange.com/a/83577
                if (result.length < 68) revert();
                assembly {
                    result := add(result, 0x04)
                }
                revert(abi.decode(result, (string)));
            }

            results[i] = result;
        }
    }
}

File 8 of 17 : Testable.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.0;

import "./Timer.sol";

/**
 * @title Base class that provides time overrides, but only if being run in test mode.
 */
abstract contract Testable {
    // If the contract is being run in production, then `timerAddress` will be the 0x0 address.
    // Note: this variable should be set on construction and never modified.
    address public timerAddress;

    /**
     * @notice Constructs the Testable contract. Called by child contracts.
     * @param _timerAddress Contract that stores the current time in a testing environment.
     * Must be set to 0x0 for production environments that use live time.
     */
    constructor(address _timerAddress) {
        timerAddress = _timerAddress;
    }

    /**
     * @notice Reverts if not running in test mode.
     */
    modifier onlyIfTest {
        require(timerAddress != address(0x0));
        _;
    }

    /**
     * @notice Sets the current time.
     * @dev Will revert if not running in test mode.
     * @param time timestamp to set current Testable time to.
     */
    function setCurrentTime(uint256 time) external onlyIfTest {
        Timer(timerAddress).setCurrentTime(time);
    }

    /**
     * @notice Gets the current time. Will return the last time set in `setCurrentTime` if running in test mode.
     * Otherwise, it will return the block timestamp.
     * @return uint for the current Testable timestamp.
     */
    function getCurrentTime() public view virtual returns (uint256) {
        if (timerAddress != address(0x0)) {
            return Timer(timerAddress).getCurrentTime();
        } else {
            return block.timestamp; // solhint-disable-line not-rely-on-time
        }
    }
}

File 9 of 17 : Timer.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.0;

/**
 * @title Universal store of current contract time for testing environments.
 */
contract Timer {
    uint256 private currentTime;

    constructor() {
        currentTime = block.timestamp; // solhint-disable-line not-rely-on-time
    }

    /**
     * @notice Sets the current time.
     * @dev Will revert if not running in test mode.
     * @param time timestamp to set `currentTime` to.
     */
    function setCurrentTime(uint256 time) external {
        currentTime = time;
    }

    /**
     * @notice Gets the currentTime variable set in the Timer.
     * @return uint256 for the current Testable timestamp.
     */
    function getCurrentTime() public view returns (uint256) {
        return currentTime;
    }
}

File 10 of 17 : Arbitrum_SpokePool.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "./SpokePool.sol";

interface StandardBridgeLike {
    function outboundTransfer(
        address _l1Token,
        address _to,
        uint256 _amount,
        bytes calldata _data
    ) external payable returns (bytes memory);
}

/**
 * @notice AVM specific SpokePool. Uses AVM cross-domain-enabled logic to implement admin only access to functions.
 */
contract Arbitrum_SpokePool is SpokePool {
    // Address of the Arbitrum L2 token gateway to send funds to L1.
    address public l2GatewayRouter;

    // Admin controlled mapping of arbitrum tokens to L1 counterpart. L1 counterpart addresses
    // are necessary params used when bridging tokens to L1.
    mapping(address => address) public whitelistedTokens;

    event ArbitrumTokensBridged(address indexed l1Token, address target, uint256 numberOfTokensBridged);
    event SetL2GatewayRouter(address indexed newL2GatewayRouter);
    event WhitelistedTokens(address indexed l2Token, address indexed l1Token);

    /**
     * @notice Construct the AVM SpokePool.
     * @param _l2GatewayRouter Address of L2 token gateway. Can be reset by admin.
     * @param _crossDomainAdmin Cross domain admin to set. Can be changed by admin.
     * @param _hubPool Hub pool address to set. Can be changed by admin.
     * @param _wethAddress Weth address for this network to set.
     * @param timerAddress Timer address to set.
     */
    constructor(
        address _l2GatewayRouter,
        address _crossDomainAdmin,
        address _hubPool,
        address _wethAddress,
        address timerAddress
    ) SpokePool(_crossDomainAdmin, _hubPool, _wethAddress, timerAddress) {
        _setL2GatewayRouter(_l2GatewayRouter);
    }

    modifier onlyFromCrossDomainAdmin() {
        require(msg.sender == _applyL1ToL2Alias(crossDomainAdmin), "ONLY_COUNTERPART_GATEWAY");
        _;
    }

    /********************************************************
     *    ARBITRUM-SPECIFIC CROSS-CHAIN ADMIN FUNCTIONS     *
     ********************************************************/

    /**
     * @notice Change L2 gateway router. Callable only by admin.
     * @param newL2GatewayRouter New L2 gateway router.
     */
    function setL2GatewayRouter(address newL2GatewayRouter) public onlyAdmin nonReentrant {
        _setL2GatewayRouter(newL2GatewayRouter);
    }

    /**
     * @notice Add L2 -> L1 token mapping. Callable only by admin.
     * @param l2Token Arbitrum token.
     * @param l1Token Ethereum version of l2Token.
     */
    function whitelistToken(address l2Token, address l1Token) public onlyAdmin nonReentrant {
        _whitelistToken(l2Token, l1Token);
    }

    /**************************************
     *        INTERNAL FUNCTIONS          *
     **************************************/

    function _bridgeTokensToHubPool(RelayerRefundLeaf memory relayerRefundLeaf) internal override {
        // Check that the Ethereum counterpart of the L2 token is stored on this contract.
        address ethereumTokenToBridge = whitelistedTokens[relayerRefundLeaf.l2TokenAddress];
        require(ethereumTokenToBridge != address(0), "Uninitialized mainnet token");
        StandardBridgeLike(l2GatewayRouter).outboundTransfer(
            ethereumTokenToBridge, // _l1Token. Address of the L1 token to bridge over.
            hubPool, // _to. Withdraw, over the bridge, to the l1 hub pool contract.
            relayerRefundLeaf.amountToReturn, // _amount.
            "" // _data. We don't need to send any data for the bridging action.
        );
        emit ArbitrumTokensBridged(address(0), hubPool, relayerRefundLeaf.amountToReturn);
    }

    function _setL2GatewayRouter(address _l2GatewayRouter) internal {
        l2GatewayRouter = _l2GatewayRouter;
        emit SetL2GatewayRouter(l2GatewayRouter);
    }

    function _whitelistToken(address _l2Token, address _l1Token) internal {
        whitelistedTokens[_l2Token] = _l1Token;
        emit WhitelistedTokens(_l2Token, _l1Token);
    }

    // L1 addresses are transformed during l1->l2 calls.
    // See https://developer.offchainlabs.com/docs/l1_l2_messages#address-aliasing for more information.
    // This cannot be pulled directly from Arbitrum contracts because their contracts are not 0.8.X compatible and
    // this operation takes advantage of overflows, whose behavior changed in 0.8.0.
    function _applyL1ToL2Alias(address l1Address) internal pure returns (address l2Address) {
        // Allows overflows as explained above.
        unchecked {
            l2Address = address(uint160(l1Address) + uint160(0x1111000000000000000000000000000000001111));
        }
    }

    // Apply AVM-specific transformation to cross domain admin address on L1.
    function _requireAdminSender() internal override onlyFromCrossDomainAdmin {}
}

File 11 of 17 : HubPoolInterface.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "./interfaces/AdapterInterface.sol";

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/**
 * @notice Concise list of functions in HubPool implementation.
 */
interface HubPoolInterface {
    // This leaf is meant to be decoded in the HubPool to rebalance tokens between HubPool and SpokePool.
    struct PoolRebalanceLeaf {
        // This is used to know which chain to send cross-chain transactions to (and which SpokePool to send to).
        uint256 chainId;
        // Total LP fee amount per token in this bundle, encompassing all associated bundled relays.
        uint256[] bundleLpFees;
        // Represents the amount to push to or pull from the SpokePool. If +, the pool pays the SpokePool. If negative
        // the SpokePool pays the HubPool. There can be arbitrarily complex rebalancing rules defined offchain. This
        // number is only nonzero when the rules indicate that a rebalancing action should occur. When a rebalance does
        // occur, runningBalances must be set to zero for this token and netSendAmounts should be set to the previous
        // runningBalances + relays - deposits in this bundle. If non-zero then it must be set on the SpokePool's
        // RelayerRefundLeaf amountToReturn as -1 * this value to show if funds are being sent from or to the SpokePool.
        int256[] netSendAmounts;
        // This is only here to be emitted in an event to track a running unpaid balance between the L2 pool and the L1
        // pool. A positive number indicates that the HubPool owes the SpokePool funds. A negative number indicates that
        // the SpokePool owes the HubPool funds. See the comment above for the dynamics of this and netSendAmounts.
        int256[] runningBalances;
        // Used by data worker to mark which leaves should relay roots to SpokePools, and to otherwise organize leaves.
        // For example, each leaf should contain all the rebalance information for a single chain, but in the case where
        // the list of l1Tokens is very large such that they all can't fit into a single leaf that can be executed under
        // the block gas limit, then the data worker can use this groupIndex to organize them. Any leaves with
        // a groupIndex equal to 0 will relay roots to the SpokePool, so the data worker should ensure that only one
        // leaf for a specific chainId should have a groupIndex equal to 0.
        uint256 groupIndex;
        // Used as the index in the bitmap to track whether this leaf has been executed or not.
        uint8 leafId;
        // The bundleLpFees, netSendAmounts, and runningBalances are required to be the same length. They are parallel
        // arrays for the given chainId and should be ordered by the l1Tokens field. All whitelisted tokens with nonzero
        // relays on this chain in this bundle in the order of whitelisting.
        address[] l1Tokens;
    }

    // A data worker can optimistically store several merkle roots on this contract by staking a bond and calling
    // proposeRootBundle. By staking a bond, the data worker is alleging that the merkle roots all contain valid leaves
    // that can be executed later to:
    // - Send funds from this contract to a SpokePool or vice versa
    // - Send funds from a SpokePool to Relayer as a refund for a relayed deposit
    // - Send funds from a SpokePool to a deposit recipient to fulfill a "slow" relay
    // Anyone can dispute this struct if the merkle roots contain invalid leaves before the
    // challengePeriodEndTimestamp. Once the expiration timestamp is passed, executeRootBundle to execute a leaf
    // from the poolRebalanceRoot on this contract and it will simultaneously publish the relayerRefundRoot and
    // slowRelayRoot to a SpokePool. The latter two roots, once published to the SpokePool, contain
    // leaves that can be executed on the SpokePool to pay relayers or recipients.
    struct RootBundle {
        // Contains leaves instructing this contract to send funds to SpokePools.
        bytes32 poolRebalanceRoot;
        // Relayer refund merkle root to be published to a SpokePool.
        bytes32 relayerRefundRoot;
        // Slow relay merkle root to be published to a SpokePool.
        bytes32 slowRelayRoot;
        // This is a 1D bitmap, with max size of 256 elements, limiting us to 256 chainsIds.
        uint256 claimedBitMap;
        // Proposer of this root bundle.
        address proposer;
        // Number of pool rebalance leaves to execute in the poolRebalanceRoot. After this number
        // of leaves are executed, a new root bundle can be proposed
        uint8 unclaimedPoolRebalanceLeafCount;
        // When root bundle challenge period passes and this root bundle becomes executable.
        uint32 challengePeriodEndTimestamp;
    }

    // Each whitelisted L1 token has an associated pooledToken struct that contains all information used to track the
    // cumulative LP positions and if this token is enabled for deposits.
    struct PooledToken {
        // LP token given to LPs of a specific L1 token.
        address lpToken;
        // True if accepting new LP's.
        bool isEnabled;
        // Timestamp of last LP fee update.
        uint32 lastLpFeeUpdate;
        // Number of LP funds sent via pool rebalances to SpokePools and are expected to be sent
        // back later.
        int256 utilizedReserves;
        // Number of LP funds held in contract less utilized reserves.
        uint256 liquidReserves;
        // Number of LP funds reserved to pay out to LPs as fees.
        uint256 undistributedLpFees;
    }

    // Helper contracts to facilitate cross chain actions between HubPool and SpokePool for a specific network.
    struct CrossChainContract {
        address adapter;
        address spokePool;
    }

    function setPaused(bool pause) external;

    function emergencyDeleteProposal() external;

    function relaySpokePoolAdminFunction(uint256 chainId, bytes memory functionData) external;

    function setProtocolFeeCapture(address newProtocolFeeCaptureAddress, uint256 newProtocolFeeCapturePct) external;

    function setBond(IERC20 newBondToken, uint256 newBondAmount) external;

    function setLiveness(uint32 newLiveness) external;

    function setIdentifier(bytes32 newIdentifier) external;

    function setCrossChainContracts(
        uint256 l2ChainId,
        address adapter,
        address spokePool
    ) external;

    function enableL1TokenForLiquidityProvision(address l1Token) external;

    function disableL1TokenForLiquidityProvision(address l1Token) external;

    function addLiquidity(address l1Token, uint256 l1TokenAmount) external payable;

    function removeLiquidity(
        address l1Token,
        uint256 lpTokenAmount,
        bool sendEth
    ) external;

    function exchangeRateCurrent(address l1Token) external returns (uint256);

    function liquidityUtilizationCurrent(address l1Token) external returns (uint256);

    function liquidityUtilizationPostRelay(address l1Token, uint256 relayedAmount) external returns (uint256);

    function sync(address l1Token) external;

    function proposeRootBundle(
        uint256[] memory bundleEvaluationBlockNumbers,
        uint8 poolRebalanceLeafCount,
        bytes32 poolRebalanceRoot,
        bytes32 relayerRefundRoot,
        bytes32 slowRelayRoot
    ) external;

    function executeRootBundle(
        uint256 chainId,
        uint256 groupIndex,
        uint256[] memory bundleLpFees,
        int256[] memory netSendAmounts,
        int256[] memory runningBalances,
        uint8 leafId,
        address[] memory l1Tokens,
        bytes32[] memory proof
    ) external;

    function disputeRootBundle() external;

    function claimProtocolFeesCaptured(address l1Token) external;

    function setPoolRebalanceRoute(
        uint256 destinationChainId,
        address l1Token,
        address destinationToken
    ) external;

    function setDepositRoute(
        uint256 originChainId,
        uint256 destinationChainId,
        address originToken,
        bool depositsEnabled
    ) external;

    function poolRebalanceRoute(uint256 destinationChainId, address l1Token)
        external
        view
        returns (address destinationToken);

    function loadEthForL2Calls() external payable;
}

File 12 of 17 : Lockable.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.0;

/**
 * @title A contract that provides modifiers to prevent reentrancy to state-changing and view-only methods. This contract
 * is inspired by https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/ReentrancyGuard.sol
 * and https://github.com/balancer-labs/balancer-core/blob/master/contracts/BPool.sol.
 * @dev The reason why we use this local contract instead of importing from uma/contracts is because of the addition
 * of the internal method `functionCallStackOriginatesFromOutsideThisContract` which doesn't exist in the one exported
 * by uma/contracts.
 */
contract Lockable {
    bool internal _notEntered;

    constructor() {
        // Storing an initial non-zero value makes deployment a bit more expensive, but in exchange the refund on every
        // call to nonReentrant will be lower in amount. Since refunds are capped to a percentage of the total
        // transaction's gas, it is best to keep them low in cases like this one, to increase the likelihood of the full
        // refund coming into effect.
        _notEntered = true;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a nonReentrant function from another nonReentrant function is not supported. It is possible to
     * prevent this from happening by making the nonReentrant function external, and making it call a private
     * function that does the actual state modification.
     */
    modifier nonReentrant() {
        _preEntranceCheck();
        _preEntranceSet();
        _;
        _postEntranceReset();
    }

    /**
     * @dev Designed to prevent a view-only method from being re-entered during a call to a nonReentrant() state-changing method.
     */
    modifier nonReentrantView() {
        _preEntranceCheck();
        _;
    }

    /**
     * @dev Returns true if the contract is currently in a non-entered state, meaning that the origination of the call
     * came from outside the contract. This is relevant with fallback/receive methods to see if the call came from ETH
     * being dropped onto the contract externally or due to ETH dropped on the the contract from within a method in this
     * contract, such as unwrapping WETH to ETH within the contract.
     */
    function functionCallStackOriginatesFromOutsideThisContract() internal view returns (bool) {
        return _notEntered;
    }

    // Internal methods are used to avoid copying the require statement's bytecode to every nonReentrant() method.
    // On entry into a function, _preEntranceCheck() should always be called to check if the function is being
    // re-entered. Then, if the function modifies state, it should call _postEntranceSet(), perform its logic, and
    // then call _postEntranceReset().
    // View-only methods can simply call _preEntranceCheck() to make sure that it is not being re-entered.
    function _preEntranceCheck() internal view {
        // On the first call to nonReentrant, _notEntered will be true
        require(_notEntered, "ReentrancyGuard: reentrant call");
    }

    function _preEntranceSet() internal {
        // Any calls to nonReentrant after this point will fail
        _notEntered = false;
    }

    function _postEntranceReset() internal {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _notEntered = true;
    }
}

File 13 of 17 : MerkleLib.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "./SpokePoolInterface.sol";
import "./HubPoolInterface.sol";

import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

/**
 * @notice Library to help with merkle roots, proofs, and claims.
 */
library MerkleLib {
    /**
     * @notice Verifies that a repayment is contained within a merkle root.
     * @param root the merkle root.
     * @param rebalance the rebalance struct.
     * @param proof the merkle proof.
     * @return bool to signal if the pool rebalance proof correctly shows inclusion of the rebalance within the tree.
     */
    function verifyPoolRebalance(
        bytes32 root,
        HubPoolInterface.PoolRebalanceLeaf memory rebalance,
        bytes32[] memory proof
    ) internal pure returns (bool) {
        return MerkleProof.verify(proof, root, keccak256(abi.encode(rebalance)));
    }

    /**
     * @notice Verifies that a relayer refund is contained within a merkle root.
     * @param root the merkle root.
     * @param refund the refund struct.
     * @param proof the merkle proof.
     * @return bool to signal if the relayer refund proof correctly shows inclusion of the refund within the tree.
     */
    function verifyRelayerRefund(
        bytes32 root,
        SpokePoolInterface.RelayerRefundLeaf memory refund,
        bytes32[] memory proof
    ) internal pure returns (bool) {
        return MerkleProof.verify(proof, root, keccak256(abi.encode(refund)));
    }

    /**
     * @notice Verifies that a distribution is contained within a merkle root.
     * @param root the merkle root.
     * @param slowRelayFulfillment the relayData fulfillment struct.
     * @param proof the merkle proof.
     * @return bool to signal if the slow relay's proof correctly shows inclusion of the slow relay within the tree.
     */
    function verifySlowRelayFulfillment(
        bytes32 root,
        SpokePoolInterface.RelayData memory slowRelayFulfillment,
        bytes32[] memory proof
    ) internal pure returns (bool) {
        return MerkleProof.verify(proof, root, keccak256(abi.encode(slowRelayFulfillment)));
    }

    // The following functions are primarily copied from
    // https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol with minor changes.

    /**
     * @notice Tests whether a claim is contained within a claimedBitMap mapping.
     * @param claimedBitMap a simple uint256 mapping in storage used as a bitmap.
     * @param index the index to check in the bitmap.
     * @return bool indicating if the index within the claimedBitMap has been marked as claimed.
     */
    function isClaimed(mapping(uint256 => uint256) storage claimedBitMap, uint256 index) internal view returns (bool) {
        uint256 claimedWordIndex = index / 256;
        uint256 claimedBitIndex = index % 256;
        uint256 claimedWord = claimedBitMap[claimedWordIndex];
        uint256 mask = (1 << claimedBitIndex);
        return claimedWord & mask == mask;
    }

    /**
     * @notice Marks an index in a claimedBitMap as claimed.
     * @param claimedBitMap a simple uint256 mapping in storage used as a bitmap.
     * @param index the index to mark in the bitmap.
     */
    function setClaimed(mapping(uint256 => uint256) storage claimedBitMap, uint256 index) internal {
        uint256 claimedWordIndex = index / 256;
        uint256 claimedBitIndex = index % 256;
        claimedBitMap[claimedWordIndex] = claimedBitMap[claimedWordIndex] | (1 << claimedBitIndex);
    }

    /**
     * @notice Tests whether a claim is contained within a 1D claimedBitMap mapping.
     * @param claimedBitMap a simple uint256 value, encoding a 1D bitmap.
     * @param index the index to check in the bitmap. Uint8 type enforces that index can't be > 255.
     * @return bool indicating if the index within the claimedBitMap has been marked as claimed.
     */
    function isClaimed1D(uint256 claimedBitMap, uint8 index) internal pure returns (bool) {
        uint256 mask = (1 << index);
        return claimedBitMap & mask == mask;
    }

    /**
     * @notice Marks an index in a claimedBitMap as claimed.
     * @param claimedBitMap a simple uint256 mapping in storage used as a bitmap. Uint8 type enforces that index
     * can't be > 255.
     * @param index the index to mark in the bitmap.
     * @return uint256 representing the modified input claimedBitMap with the index set to true.
     */
    function setClaimed1D(uint256 claimedBitMap, uint8 index) internal pure returns (uint256) {
        return claimedBitMap | (1 << index % 256);
    }
}

File 14 of 17 : SpokePool.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "./MerkleLib.sol";
import "./interfaces/WETH9.sol";
import "./Lockable.sol";
import "./SpokePoolInterface.sol";

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@uma/core/contracts/common/implementation/Testable.sol";
import "@uma/core/contracts/common/implementation/MultiCaller.sol";

/**
 * @title SpokePool
 * @notice Base contract deployed on source and destination chains enabling depositors to transfer assets from source to
 * destination. Deposit orders are fulfilled by off-chain relayers who also interact with this contract. Deposited
 * tokens are locked on the source chain and relayers send the recipient the desired token currency and amount
 * on the destination chain. Locked source chain tokens are later sent over the canonical token bridge to L1 HubPool.
 * Relayers are refunded with destination tokens out of this contract after another off-chain actor, a "data worker",
 * submits a proof that the relayer correctly submitted a relay on this SpokePool.
 */
abstract contract SpokePool is SpokePoolInterface, Testable, Lockable, MultiCaller {
    using SafeERC20 for IERC20;
    using Address for address;

    // Address of the L1 contract that acts as the owner of this SpokePool. If this contract is deployed on Ethereum,
    // then this address should be set to the same owner as the HubPool and the whole system.
    address public crossDomainAdmin;

    // Address of the L1 contract that will send tokens to and receive tokens from this contract to fund relayer
    // refunds and slow relays.
    address public hubPool;

    // Address of wrappedNativeToken contract for this network. If an origin token matches this, then the caller can
    // optionally instruct this contract to wrap native tokens when depositing (ie ETH->WETH or MATIC->WMATIC).
    WETH9 public immutable wrappedNativeToken;

    // Any deposit quote times greater than or less than this value to the current contract time is blocked. Forces
    // caller to use an approximately "current" realized fee. Defaults to 10 minutes.
    uint32 public depositQuoteTimeBuffer = 600;

    // Count of deposits is used to construct a unique deposit identifier for this spoke pool.
    uint32 public numberOfDeposits;

    // This contract can store as many root bundles as the HubPool chooses to publish here.
    RootBundle[] public rootBundles;

    // Origin token to destination token routings can be turned on or off, which can enable or disable deposits.
    mapping(address => mapping(uint256 => bool)) public enabledDepositRoutes;

    // Each relay is associated with the hash of parameters that uniquely identify the original deposit and a relay
    // attempt for that deposit. The relay itself is just represented as the amount filled so far. The total amount to
    // relay, the fees, and the agents are all parameters included in the hash key.
    mapping(bytes32 => uint256) public relayFills;

    /****************************************
     *                EVENTS                *
     ****************************************/
    event SetXDomainAdmin(address indexed newAdmin);
    event SetHubPool(address indexed newHubPool);
    event EnabledDepositRoute(address indexed originToken, uint256 indexed destinationChainId, bool enabled);
    event SetDepositQuoteTimeBuffer(uint32 newBuffer);
    event FundsDeposited(
        uint256 amount,
        uint256 originChainId,
        uint256 destinationChainId,
        uint64 relayerFeePct,
        uint32 indexed depositId,
        uint32 quoteTimestamp,
        address indexed originToken,
        address recipient,
        address indexed depositor
    );
    event RequestedSpeedUpDeposit(
        uint64 newRelayerFeePct,
        uint32 indexed depositId,
        address indexed depositor,
        bytes depositorSignature
    );
    event FilledRelay(
        uint256 amount,
        uint256 totalFilledAmount,
        uint256 fillAmount,
        uint256 repaymentChainId,
        uint256 originChainId,
        uint256 destinationChainId,
        uint64 relayerFeePct,
        uint64 appliedRelayerFeePct,
        uint64 realizedLpFeePct,
        uint32 depositId,
        address destinationToken,
        address indexed relayer,
        address indexed depositor,
        address recipient,
        bool isSlowRelay
    );
    event RelayedRootBundle(
        uint32 indexed rootBundleId,
        bytes32 indexed relayerRefundRoot,
        bytes32 indexed slowRelayRoot
    );
    event ExecutedRelayerRefundRoot(
        uint256 amountToReturn,
        uint256 indexed chainId,
        uint256[] refundAmounts,
        uint32 indexed rootBundleId,
        uint32 indexed leafId,
        address l2TokenAddress,
        address[] refundAddresses,
        address caller
    );
    event TokensBridged(
        uint256 amountToReturn,
        uint256 indexed chainId,
        uint32 indexed leafId,
        address indexed l2TokenAddress,
        address caller
    );
    event EmergencyDeleteRootBundle(uint256 indexed rootBundleId);

    /**
     * @notice Construct the base SpokePool.
     * @param _crossDomainAdmin Cross domain admin to set. Can be changed by admin.
     * @param _hubPool Hub pool address to set. Can be changed by admin.
     * @param _wrappedNativeTokenAddress wrappedNativeToken address for this network to set.
     * @param timerAddress Timer address to set.
     */
    constructor(
        address _crossDomainAdmin,
        address _hubPool,
        address _wrappedNativeTokenAddress,
        address timerAddress
    ) Testable(timerAddress) {
        _setCrossDomainAdmin(_crossDomainAdmin);
        _setHubPool(_hubPool);
        wrappedNativeToken = WETH9(_wrappedNativeTokenAddress);
    }

    /****************************************
     *               MODIFIERS              *
     ****************************************/

    // Implementing contract needs to override _requireAdminSender() to ensure that admin functions are protected
    // appropriately.
    modifier onlyAdmin() {
        _requireAdminSender();
        _;
    }

    /**************************************
     *          ADMIN FUNCTIONS           *
     **************************************/

    /**
     * @notice Change cross domain admin address. Callable by admin only.
     * @param newCrossDomainAdmin New cross domain admin.
     */
    function setCrossDomainAdmin(address newCrossDomainAdmin) public override onlyAdmin nonReentrant {
        _setCrossDomainAdmin(newCrossDomainAdmin);
    }

    /**
     * @notice Change L1 hub pool address. Callable by admin only.
     * @param newHubPool New hub pool.
     */
    function setHubPool(address newHubPool) public override onlyAdmin nonReentrant {
        _setHubPool(newHubPool);
    }

    /**
     * @notice Enable/Disable an origin token => destination chain ID route for deposits. Callable by admin only.
     * @param originToken Token that depositor can deposit to this contract.
     * @param destinationChainId Chain ID for where depositor wants to receive funds.
     * @param enabled True to enable deposits, False otherwise.
     */
    function setEnableRoute(
        address originToken,
        uint256 destinationChainId,
        bool enabled
    ) public override onlyAdmin nonReentrant {
        enabledDepositRoutes[originToken][destinationChainId] = enabled;
        emit EnabledDepositRoute(originToken, destinationChainId, enabled);
    }

    /**
     * @notice Change allowance for deposit quote time to differ from current block time. Callable by admin only.
     * @param newDepositQuoteTimeBuffer New quote time buffer.
     */
    function setDepositQuoteTimeBuffer(uint32 newDepositQuoteTimeBuffer) public override onlyAdmin nonReentrant {
        depositQuoteTimeBuffer = newDepositQuoteTimeBuffer;
        emit SetDepositQuoteTimeBuffer(newDepositQuoteTimeBuffer);
    }

    /**
     * @notice This method stores a new root bundle in this contract that can be executed to refund relayers, fulfill
     * slow relays, and send funds back to the HubPool on L1. This method can only be called by the admin and is
     * designed to be called as part of a cross-chain message from the HubPool's executeRootBundle method.
     * @param relayerRefundRoot Merkle root containing relayer refund leaves that can be individually executed via
     * executeRelayerRefundLeaf().
     * @param slowRelayRoot Merkle root containing slow relay fulfillment leaves that can be individually executed via
     * executeSlowRelayLeaf().
     */
    function relayRootBundle(bytes32 relayerRefundRoot, bytes32 slowRelayRoot) public override onlyAdmin nonReentrant {
        uint32 rootBundleId = uint32(rootBundles.length);
        RootBundle storage rootBundle = rootBundles.push();
        rootBundle.relayerRefundRoot = relayerRefundRoot;
        rootBundle.slowRelayRoot = slowRelayRoot;
        emit RelayedRootBundle(rootBundleId, relayerRefundRoot, slowRelayRoot);
    }

    /**
     * @notice This method is intended to only be used in emergencies where a bad root bundle has reached the
     * SpokePool.
     * @param rootBundleId Index of the root bundle that needs to be deleted. Note: this is intentionally a uint256
     * to ensure that a small input range doesn't limit which indices this method is able to reach.
     */
    function emergencyDeleteRootBundle(uint256 rootBundleId) public override onlyAdmin nonReentrant {
        delete rootBundles[rootBundleId];
        emit EmergencyDeleteRootBundle(rootBundleId);
    }

    /**************************************
     *         DEPOSITOR FUNCTIONS        *
     **************************************/

    /**
     * @notice Called by user to bridge funds from origin to destination chain. Depositor will effectively lock
     * tokens in this contract and receive a destination token on the destination chain. The origin => destination
     * token mapping is stored on the L1 HubPool.
     * @notice The caller must first approve this contract to spend amount of originToken.
     * @notice The originToken => destinationChainId must be enabled.
     * @notice This method is payable because the caller is able to deposit native token if the originToken is
     * wrappedNativeToken and this function will handle wrapping the native token to wrappedNativeToken.
     * @param recipient Address to receive funds at on destination chain.
     * @param originToken Token to lock into this contract to initiate deposit.
     * @param amount Amount of tokens to deposit. Will be amount of tokens to receive less fees.
     * @param destinationChainId Denotes network where user will receive funds from SpokePool by a relayer.
     * @param relayerFeePct % of deposit amount taken out to incentivize a fast relayer.
     * @param quoteTimestamp Timestamp used by relayers to compute this deposit's realizedLPFeePct which is paid
     * to LP pool on HubPool.
     */
    function deposit(
        address recipient,
        address originToken,
        uint256 amount,
        uint256 destinationChainId,
        uint64 relayerFeePct,
        uint32 quoteTimestamp
    ) public payable override nonReentrant {
        // Check that deposit route is enabled.
        require(enabledDepositRoutes[originToken][destinationChainId], "Disabled route");

        // We limit the relay fees to prevent the user spending all their funds on fees.
        require(relayerFeePct < 0.5e18, "invalid relayer fee");
        // This function assumes that L2 timing cannot be compared accurately and consistently to L1 timing. Therefore,
        // block.timestamp is different from the L1 EVM's. Therefore, the quoteTimestamp must be within a configurable
        // buffer of this contract's block time to allow for this variance.
        // Note also that quoteTimestamp cannot be less than the buffer otherwise the following arithmetic can result
        // in underflow. This isn't a problem as the deposit will revert, but the error might be unexpected for clients.
        require(
            getCurrentTime() >= quoteTimestamp - depositQuoteTimeBuffer &&
                getCurrentTime() <= quoteTimestamp + depositQuoteTimeBuffer,
            "invalid quote time"
        );
        // If the address of the origin token is a wrappedNativeToken contract and there is a msg.value with the
        // transaction then the user is sending ETH. In this case, the ETH should be deposited to wrappedNativeToken.
        if (originToken == address(wrappedNativeToken) && msg.value > 0) {
            require(msg.value == amount, "msg.value must match amount");
            wrappedNativeToken.deposit{ value: msg.value }();
            // Else, it is a normal ERC20. In this case pull the token from the user's wallet as per normal.
            // Note: this includes the case where the L2 user has WETH (already wrapped ETH) and wants to bridge them.
            // In this case the msg.value will be set to 0, indicating a "normal" ERC20 bridging action.
        } else IERC20(originToken).safeTransferFrom(msg.sender, address(this), amount);

        _emitDeposit(
            amount,
            chainId(),
            destinationChainId,
            relayerFeePct,
            numberOfDeposits,
            quoteTimestamp,
            originToken,
            recipient,
            msg.sender
        );

        // Increment count of deposits so that deposit ID for this spoke pool is unique.
        // @dev: Use pre-increment to save gas:
        // i++ --> Load, Store, Add, Store
        // ++i --> Load, Add, Store
        ++numberOfDeposits;
    }

    /**
     * @notice Convenience method that depositor can use to signal to relayer to use updated fee.
     * @notice Relayer should only use events emitted by this function to submit fills with updated fees, otherwise they
     * risk their fills getting disputed for being invalid, for example if the depositor never actually signed the
     * update fee message.
     * @notice This function will revert if the depositor did not sign a message containing the updated fee for the
     * deposit ID stored in this contract. If the deposit ID is for another contract, or the depositor address is
     * incorrect, or the updated fee is incorrect, then the signature will not match and this function will revert.
     * @param depositor Signer of the update fee message who originally submitted the deposit. If the deposit doesn't
     * exist, then the relayer will not be able to fill any relay, so the caller should validate that the depositor
     * did in fact submit a relay.
     * @param newRelayerFeePct New relayer fee that relayers can use.
     * @param depositId Deposit to update fee for that originated in this contract.
     * @param depositorSignature Signed message containing the depositor address, this contract chain ID, the updated
     * relayer fee %, and the deposit ID. This signature is produced by signing a hash of data according to the
     * EIP-1271 standard. See more in the _verifyUpdateRelayerFeeMessage() comments.
     */
    function speedUpDeposit(
        address depositor,
        uint64 newRelayerFeePct,
        uint32 depositId,
        bytes memory depositorSignature
    ) public override nonReentrant {
        require(newRelayerFeePct < 0.5e18, "invalid relayer fee");

        _verifyUpdateRelayerFeeMessage(depositor, chainId(), newRelayerFeePct, depositId, depositorSignature);

        // Assuming the above checks passed, a relayer can take the signature and the updated relayer fee information
        // from the following event to submit a fill with an updated fee %.
        emit RequestedSpeedUpDeposit(newRelayerFeePct, depositId, depositor, depositorSignature);
    }

    /**************************************
     *         RELAYER FUNCTIONS          *
     **************************************/

    /**
     * @notice Called by relayer to fulfill part of a deposit by sending destination tokens to the recipient.
     * Relayer is expected to pass in unique identifying information for deposit that they want to fulfill, and this
     * relay submission will be validated by off-chain data workers who can dispute this relay if any part is invalid.
     * If the relay is valid, then the relayer will be refunded on their desired repayment chain. If relay is invalid,
     * then relayer will not receive any refund.
     * @notice All of the deposit data can be found via on-chain events from the origin SpokePool, except for the
     * realizedLpFeePct which is a function of the HubPool's utilization at the deposit quote time. This fee %
     * is deterministic based on the quote time, so the relayer should just compute it using the canonical algorithm
     * as described in a UMIP linked to the HubPool's identifier.
     * @param depositor Depositor on origin chain who set this chain as the destination chain.
     * @param recipient Specified recipient on this chain.
     * @param destinationToken Token to send to recipient. Should be mapped to the origin token, origin chain ID
     * and this chain ID via a mapping on the HubPool.
     * @param amount Full size of the deposit.
     * @param maxTokensToSend Max amount of tokens to send recipient. If higher than amount, then caller will
     * send recipient the full relay amount.
     * @param repaymentChainId Chain of SpokePool where relayer wants to be refunded after the challenge window has
     * passed.
     * @param originChainId Chain of SpokePool where deposit originated.
     * @param realizedLpFeePct Fee % based on L1 HubPool utilization at deposit quote time. Deterministic based on
     * quote time.
     * @param relayerFeePct Fee % to keep as relayer, specified by depositor.
     * @param depositId Unique deposit ID on origin spoke pool.
     */
    function fillRelay(
        address depositor,
        address recipient,
        address destinationToken,
        uint256 amount,
        uint256 maxTokensToSend,
        uint256 repaymentChainId,
        uint256 originChainId,
        uint64 realizedLpFeePct,
        uint64 relayerFeePct,
        uint32 depositId
    ) public nonReentrant {
        // Each relay attempt is mapped to the hash of data uniquely identifying it, which includes the deposit data
        // such as the origin chain ID and the deposit ID, and the data in a relay attempt such as who the recipient
        // is, which chain and currency the recipient wants to receive funds on, and the relay fees.
        SpokePoolInterface.RelayData memory relayData = SpokePoolInterface.RelayData({
            depositor: depositor,
            recipient: recipient,
            destinationToken: destinationToken,
            amount: amount,
            realizedLpFeePct: realizedLpFeePct,
            relayerFeePct: relayerFeePct,
            depositId: depositId,
            originChainId: originChainId,
            destinationChainId: chainId()
        });
        bytes32 relayHash = _getRelayHash(relayData);

        uint256 fillAmountPreFees = _fillRelay(relayHash, relayData, maxTokensToSend, relayerFeePct, false);

        _emitFillRelay(relayHash, fillAmountPreFees, repaymentChainId, relayerFeePct, relayData, false);
    }

    /**
     * @notice Called by relayer to execute same logic as calling fillRelay except that relayer is using an updated
     * relayer fee %. The fee % must have been emitted in a message cryptographically signed by the depositor.
     * @notice By design, the depositor probably emitted the message with the updated fee by calling speedUpRelay().
     * @param depositor Depositor on origin chain who set this chain as the destination chain.
     * @param recipient Specified recipient on this chain.
     * @param destinationToken Token to send to recipient. Should be mapped to the origin token, origin chain ID
     * and this chain ID via a mapping on the HubPool.
     * @param amount Full size of the deposit.
     * @param maxTokensToSend Max amount of tokens to send recipient. If higher than amount, then caller will
     * send recipient the full relay amount.
     * @param repaymentChainId Chain of SpokePool where relayer wants to be refunded after the challenge window has
     * passed.
     * @param originChainId Chain of SpokePool where deposit originated.
     * @param realizedLpFeePct Fee % based on L1 HubPool utilization at deposit quote time. Deterministic based on
     * quote time.
     * @param relayerFeePct Original fee % to keep as relayer set by depositor.
     * @param newRelayerFeePct New fee % to keep as relayer also specified by depositor.
     * @param depositId Unique deposit ID on origin spoke pool.
     * @param depositorSignature Depositor-signed message containing updated fee %.
     */
    function fillRelayWithUpdatedFee(
        address depositor,
        address recipient,
        address destinationToken,
        uint256 amount,
        uint256 maxTokensToSend,
        uint256 repaymentChainId,
        uint256 originChainId,
        uint64 realizedLpFeePct,
        uint64 relayerFeePct,
        uint64 newRelayerFeePct,
        uint32 depositId,
        bytes memory depositorSignature
    ) public override nonReentrant {
        _verifyUpdateRelayerFeeMessage(depositor, originChainId, newRelayerFeePct, depositId, depositorSignature);

        // Now follow the default fillRelay flow with the updated fee and the original relay hash.
        RelayData memory relayData = RelayData({
            depositor: depositor,
            recipient: recipient,
            destinationToken: destinationToken,
            amount: amount,
            realizedLpFeePct: realizedLpFeePct,
            relayerFeePct: relayerFeePct,
            depositId: depositId,
            originChainId: originChainId,
            destinationChainId: chainId()
        });
        bytes32 relayHash = _getRelayHash(relayData);
        uint256 fillAmountPreFees = _fillRelay(relayHash, relayData, maxTokensToSend, newRelayerFeePct, false);

        _emitFillRelay(relayHash, fillAmountPreFees, repaymentChainId, newRelayerFeePct, relayData, false);
    }

    /**************************************
     *         DATA WORKER FUNCTIONS      *
     **************************************/

    /**
     * @notice Executes a slow relay leaf stored as part of a root bundle. Will send the full amount remaining in the
     * relay to the recipient, less fees.
     * @dev This function assumes that the relay's destination chain ID is the current chain ID, which prevents
     * the caller from executing a slow relay intended for another chain on this chain.
     * @param depositor Depositor on origin chain who set this chain as the destination chain.
     * @param recipient Specified recipient on this chain.
     * @param destinationToken Token to send to recipient. Should be mapped to the origin token, origin chain ID
     * and this chain ID via a mapping on the HubPool.
     * @param amount Full size of the deposit.
     * @param originChainId Chain of SpokePool where deposit originated.
     * @param realizedLpFeePct Fee % based on L1 HubPool utilization at deposit quote time. Deterministic based on
     * quote time.
     * @param relayerFeePct Original fee % to keep as relayer set by depositor.
     * @param depositId Unique deposit ID on origin spoke pool.
     * @param rootBundleId Unique ID of root bundle containing slow relay root that this leaf is contained in.
     * @param proof Inclusion proof for this leaf in slow relay root in root bundle.
     */
    function executeSlowRelayLeaf(
        address depositor,
        address recipient,
        address destinationToken,
        uint256 amount,
        uint256 originChainId,
        uint64 realizedLpFeePct,
        uint64 relayerFeePct,
        uint32 depositId,
        uint32 rootBundleId,
        bytes32[] memory proof
    ) public virtual override nonReentrant {
        _executeSlowRelayLeaf(
            depositor,
            recipient,
            destinationToken,
            amount,
            originChainId,
            chainId(),
            realizedLpFeePct,
            relayerFeePct,
            depositId,
            rootBundleId,
            proof
        );
    }

    /**
     * @notice Executes a relayer refund leaf stored as part of a root bundle. Will send the relayer the amount they
     * sent to the recipient plus a relayer fee.
     * @param rootBundleId Unique ID of root bundle containing relayer refund root that this leaf is contained in.
     * @param relayerRefundLeaf Contains all data necessary to reconstruct leaf contained in root bundle and to
     * refund relayer. This data structure is explained in detail in the SpokePoolInterface.
     * @param proof Inclusion proof for this leaf in relayer refund root in root bundle.
     */
    function executeRelayerRefundLeaf(
        uint32 rootBundleId,
        SpokePoolInterface.RelayerRefundLeaf memory relayerRefundLeaf,
        bytes32[] memory proof
    ) public virtual override nonReentrant {
        _executeRelayerRefundLeaf(rootBundleId, relayerRefundLeaf, proof);
    }

    /**************************************
     *           VIEW FUNCTIONS           *
     **************************************/

    /**
     * @notice Returns chain ID for this network.
     * @dev Some L2s like ZKSync don't support the CHAIN_ID opcode so we allow the implementer to override this.
     */
    function chainId() public view virtual override returns (uint256) {
        return block.chainid;
    }

    /**************************************
     *         INTERNAL FUNCTIONS         *
     **************************************/

    // Verifies inclusion proof of leaf in root, sends relayer their refund, and sends to HubPool any rebalance
    // transfers.
    function _executeRelayerRefundLeaf(
        uint32 rootBundleId,
        SpokePoolInterface.RelayerRefundLeaf memory relayerRefundLeaf,
        bytes32[] memory proof
    ) internal {
        // Check integrity of leaf structure:
        require(relayerRefundLeaf.chainId == chainId(), "Invalid chainId");
        require(relayerRefundLeaf.refundAddresses.length == relayerRefundLeaf.refundAmounts.length, "invalid leaf");

        RootBundle storage rootBundle = rootBundles[rootBundleId];

        // Check that inclusionProof proves that relayerRefundLeaf is contained within the relayer refund root.
        // Note: This should revert if the relayerRefundRoot is uninitialized.
        require(MerkleLib.verifyRelayerRefund(rootBundle.relayerRefundRoot, relayerRefundLeaf, proof), "Bad Proof");

        // Verify the leafId in the leaf has not yet been claimed.
        require(!MerkleLib.isClaimed(rootBundle.claimedBitmap, relayerRefundLeaf.leafId), "Already claimed");

        // Set leaf as claimed in bitmap. This is passed by reference to the storage rootBundle.
        MerkleLib.setClaimed(rootBundle.claimedBitmap, relayerRefundLeaf.leafId);

        // Send each relayer refund address the associated refundAmount for the L2 token address.
        // Note: Even if the L2 token is not enabled on this spoke pool, we should still refund relayers.
        uint256 length = relayerRefundLeaf.refundAmounts.length;
        for (uint256 i = 0; i < length; ) {
            uint256 amount = relayerRefundLeaf.refundAmounts[i];
            if (amount > 0)
                IERC20(relayerRefundLeaf.l2TokenAddress).safeTransfer(relayerRefundLeaf.refundAddresses[i], amount);

            // OK because we assume refund array length won't be > types(uint256).max.
            // Based on the stress test results in /test/gas-analytics/SpokePool.RelayerRefundLeaf.ts, the UMIP should
            // limit the refund count in valid proposals to be ~800 so any RelayerRefundLeaves with > 800 refunds should
            // not make it to this stage.

            unchecked {
                ++i;
            }
        }

        // If leaf's amountToReturn is positive, then send L2 --> L1 message to bridge tokens back via
        // chain-specific bridging method.
        if (relayerRefundLeaf.amountToReturn > 0) {
            _bridgeTokensToHubPool(relayerRefundLeaf);

            emit TokensBridged(
                relayerRefundLeaf.amountToReturn,
                relayerRefundLeaf.chainId,
                relayerRefundLeaf.leafId,
                relayerRefundLeaf.l2TokenAddress,
                msg.sender
            );
        }

        emit ExecutedRelayerRefundRoot(
            relayerRefundLeaf.amountToReturn,
            relayerRefundLeaf.chainId,
            relayerRefundLeaf.refundAmounts,
            rootBundleId,
            relayerRefundLeaf.leafId,
            relayerRefundLeaf.l2TokenAddress,
            relayerRefundLeaf.refundAddresses,
            msg.sender
        );
    }

    // Verifies inclusion proof of leaf in root and sends recipient remainder of relay. Marks relay as filled.
    function _executeSlowRelayLeaf(
        address depositor,
        address recipient,
        address destinationToken,
        uint256 amount,
        uint256 originChainId,
        uint256 destinationChainId,
        uint64 realizedLpFeePct,
        uint64 relayerFeePct,
        uint32 depositId,
        uint32 rootBundleId,
        bytes32[] memory proof
    ) internal {
        RelayData memory relayData = RelayData({
            depositor: depositor,
            recipient: recipient,
            destinationToken: destinationToken,
            amount: amount,
            originChainId: originChainId,
            destinationChainId: destinationChainId,
            realizedLpFeePct: realizedLpFeePct,
            relayerFeePct: relayerFeePct,
            depositId: depositId
        });

        require(
            MerkleLib.verifySlowRelayFulfillment(rootBundles[rootBundleId].slowRelayRoot, relayData, proof),
            "Invalid proof"
        );

        bytes32 relayHash = _getRelayHash(relayData);

        // Note: use relayAmount as the max amount to send, so the relay is always completely filled by the contract's
        // funds in all cases. As this is a slow relay we set the relayerFeePct to 0. This effectively refunds the
        // relayer component of the relayerFee thereby only charging the depositor the LpFee.
        uint256 fillAmountPreFees = _fillRelay(relayHash, relayData, relayData.amount, 0, true);

        // Note: Set repayment chain ID to 0 to indicate that there is no repayment to be made. The off-chain data
        // worker can use repaymentChainId=0 as a signal to ignore such relays for refunds. Also, set the relayerFeePct
        // to 0 as slow relays do not pay the caller of this method (depositor is refunded this fee).
        _emitFillRelay(relayHash, fillAmountPreFees, 0, 0, relayData, true);
    }

    function _setCrossDomainAdmin(address newCrossDomainAdmin) internal {
        require(newCrossDomainAdmin != address(0), "Bad bridge router address");
        crossDomainAdmin = newCrossDomainAdmin;
        emit SetXDomainAdmin(newCrossDomainAdmin);
    }

    function _setHubPool(address newHubPool) internal {
        require(newHubPool != address(0), "Bad hub pool address");
        hubPool = newHubPool;
        emit SetHubPool(newHubPool);
    }

    // Should be overriden by implementing contract depending on how L2 handles sending tokens to L1.
    function _bridgeTokensToHubPool(SpokePoolInterface.RelayerRefundLeaf memory relayerRefundLeaf) internal virtual;

    function _verifyUpdateRelayerFeeMessage(
        address depositor,
        uint256 originChainId,
        uint64 newRelayerFeePct,
        uint32 depositId,
        bytes memory depositorSignature
    ) internal view {
        // A depositor can request to speed up an un-relayed deposit by signing a hash containing the relayer
        // fee % to update to and information uniquely identifying the deposit to relay. This information ensures
        // that this signature cannot be re-used for other deposits. The version string is included as a precaution
        // in case this contract is upgraded.
        // Note: we use encode instead of encodePacked because it is more secure, more in the "warning" section
        // here: https://docs.soliditylang.org/en/v0.8.11/abi-spec.html#non-standard-packed-mode
        bytes32 expectedDepositorMessageHash = keccak256(
            abi.encode("ACROSS-V2-FEE-1.0", newRelayerFeePct, depositId, originChainId)
        );

        // Check the hash corresponding to the https://eth.wiki/json-rpc/API#eth_sign[eth_sign]
        // If the depositor signed a message with a different updated fee (or any other param included in the
        // above keccak156 hash), then this will revert.
        bytes32 ethSignedMessageHash = ECDSA.toEthSignedMessageHash(expectedDepositorMessageHash);

        _verifyDepositorUpdateFeeMessage(depositor, ethSignedMessageHash, depositorSignature);
    }

    // This function is isolated and made virtual to allow different L2's to implement chain specific recovery of
    // signers from signatures because some L2s might not support ecrecover. To be safe, consider always reverting
    // this function for L2s where ecrecover is different from how it works on Ethereum, otherwise there is the
    // potential to forge a signature from the depositor using a different private key than the original depositor's.
    function _verifyDepositorUpdateFeeMessage(
        address depositor,
        bytes32 ethSignedMessageHash,
        bytes memory depositorSignature
    ) internal view virtual {
        // Note: We purposefully do not support EIP-1271 signatures (meaning that multisigs and smart contract wallets
        // like Argent are not supported) because of the possibility that a multisig that signed a message on the origin
        // chain does not have a parallel on this destination chain.
        require(depositor == ECDSA.recover(ethSignedMessageHash, depositorSignature), "invalid signature");
    }

    function _computeAmountPreFees(uint256 amount, uint64 feesPct) private pure returns (uint256) {
        return (1e18 * amount) / (1e18 - feesPct);
    }

    function _computeAmountPostFees(uint256 amount, uint64 feesPct) private pure returns (uint256) {
        return (amount * (1e18 - feesPct)) / 1e18;
    }

    function _getRelayHash(SpokePoolInterface.RelayData memory relayData) private pure returns (bytes32) {
        return keccak256(abi.encode(relayData));
    }

    // Unwraps ETH and does a transfer to a recipient address. If the recipient is a smart contract then sends wrappedNativeToken.
    function _unwrapwrappedNativeTokenTo(address payable to, uint256 amount) internal {
        if (address(to).isContract()) {
            IERC20(address(wrappedNativeToken)).safeTransfer(to, amount);
        } else {
            wrappedNativeToken.withdraw(amount);
            to.transfer(amount);
        }
    }

    /**
     * @notice Caller specifies the max amount of tokens to send to user. Based on this amount and the amount of the
     * relay remaining (as stored in the relayFills mapping), pull the amount of tokens from the caller
     * and send to the recipient.
     * @dev relayFills keeps track of pre-fee fill amounts as a convenience to relayers who want to specify round
     * numbers for the maxTokensToSend parameter or convenient numbers like 100 (i.e. relayers who will fully
     * fill any relay up to 100 tokens, and partial fill with 100 tokens for larger relays).
     * @dev Caller must approve this contract to transfer up to maxTokensToSend of the relayData.destinationToken.
     * The amount to be sent might end up less if there is insufficient relay amount remaining to be sent.
     */
    function _fillRelay(
        bytes32 relayHash,
        RelayData memory relayData,
        uint256 maxTokensToSend,
        uint64 updatableRelayerFeePct,
        bool useContractFunds
    ) internal returns (uint256 fillAmountPreFees) {
        // We limit the relay fees to prevent the user spending all their funds on fees. Note that 0.5e18 (i.e. 50%)
        // fees are just magic numbers. The important point is to prevent the total fee from being 100%, otherwise
        // computing the amount pre fees runs into divide-by-0 issues.
        require(updatableRelayerFeePct < 0.5e18 && relayData.realizedLpFeePct < 0.5e18, "invalid fees");

        // Check that the relay has not already been completely filled. Note that the relays mapping will point to
        // the amount filled so far for a particular relayHash, so this will start at 0 and increment with each fill.
        require(relayFills[relayHash] < relayData.amount, "relay filled");

        // Stores the equivalent amount to be sent by the relayer before fees have been taken out.
        if (maxTokensToSend == 0) return 0;

        // Derive the amount of the relay filled if the caller wants to send exactly maxTokensToSend tokens to
        // the recipient. For example, if the user wants to send 10 tokens to the recipient, the full relay amount
        // is 100, and the fee %'s total 5%, then this computation would return ~10.5, meaning that to fill 10.5/100
        // of the full relay size, the caller would need to send 10 tokens to the user.
        fillAmountPreFees = _computeAmountPreFees(
            maxTokensToSend,
            (relayData.realizedLpFeePct + updatableRelayerFeePct)
        );
        // If user's specified max amount to send is greater than the amount of the relay remaining pre-fees,
        // we'll pull exactly enough tokens to complete the relay.
        uint256 amountToSend = maxTokensToSend;
        uint256 amountRemainingInRelay = relayData.amount - relayFills[relayHash];
        if (amountRemainingInRelay < fillAmountPreFees) {
            fillAmountPreFees = amountRemainingInRelay;

            // The user will fulfill the remainder of the relay, so we need to compute exactly how many tokens post-fees
            // that they need to send to the recipient. Note that if the relayer is filled using contract funds then
            // this is a slow relay.
            amountToSend = _computeAmountPostFees(
                fillAmountPreFees,
                relayData.realizedLpFeePct + updatableRelayerFeePct
            );
        }

        // relayFills keeps track of pre-fee fill amounts as a convenience to relayers who want to specify round
        // numbers for the maxTokensToSend parameter or convenient numbers like 100 (i.e. relayers who will fully
        // fill any relay up to 100 tokens, and partial fill with 100 tokens for larger relays).
        relayFills[relayHash] += fillAmountPreFees;

        // If relay token is wrappedNativeToken then unwrap and send native token.
        if (relayData.destinationToken == address(wrappedNativeToken)) {
            // Note: useContractFunds is True if we want to send funds to the recipient directly out of this contract,
            // otherwise we expect the caller to send funds to the recipient. If useContractFunds is True and the
            // recipient wants wrappedNativeToken, then we can assume that wrappedNativeToken is already in the
            // contract, otherwise we'll need the user to send wrappedNativeToken to this contract. Regardless, we'll
            // need to unwrap it to native token before sending to the user.
            if (!useContractFunds)
                IERC20(relayData.destinationToken).safeTransferFrom(msg.sender, address(this), amountToSend);
            _unwrapwrappedNativeTokenTo(payable(relayData.recipient), amountToSend);
            // Else, this is a normal ERC20 token. Send to recipient.
        } else {
            // Note: Similar to note above, send token directly from the contract to the user in the slow relay case.
            if (!useContractFunds)
                IERC20(relayData.destinationToken).safeTransferFrom(msg.sender, relayData.recipient, amountToSend);
            else IERC20(relayData.destinationToken).safeTransfer(relayData.recipient, amountToSend);
        }
    }

    // The following internal methods emit events with many params to overcome solidity stack too deep issues.
    function _emitFillRelay(
        bytes32 relayHash,
        uint256 fillAmount,
        uint256 repaymentChainId,
        uint64 appliedRelayerFeePct,
        RelayData memory relayData,
        bool isSlowRelay
    ) internal {
        emit FilledRelay(
            relayData.amount,
            relayFills[relayHash],
            fillAmount,
            repaymentChainId,
            relayData.originChainId,
            relayData.destinationChainId,
            relayData.relayerFeePct,
            appliedRelayerFeePct,
            relayData.realizedLpFeePct,
            relayData.depositId,
            relayData.destinationToken,
            msg.sender,
            relayData.depositor,
            relayData.recipient,
            isSlowRelay
        );
    }

    function _emitDeposit(
        uint256 amount,
        uint256 originChainId,
        uint256 destinationChainId,
        uint64 relayerFeePct,
        uint32 depositId,
        uint32 quoteTimestamp,
        address originToken,
        address recipient,
        address depositor
    ) internal {
        emit FundsDeposited(
            amount,
            originChainId,
            destinationChainId,
            relayerFeePct,
            depositId,
            quoteTimestamp,
            originToken,
            recipient,
            depositor
        );
    }

    // Implementing contract needs to override this to ensure that only the appropriate cross chain admin can execute
    // certain admin functions. For L2 contracts, the cross chain admin refers to some L1 address or contract, and for
    // L1, this would just be the same admin of the HubPool.
    function _requireAdminSender() internal virtual;

    // Added to enable the this contract to receive native token (ETH). Used when unwrapping wrappedNativeToken.
    receive() external payable {}
}

File 15 of 17 : SpokePoolInterface.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

/**
 * @notice Contains common data structures and functions used by all SpokePool implementations.
 */
interface SpokePoolInterface {
    // This leaf is meant to be decoded in the SpokePool to pay out successful relayers.
    struct RelayerRefundLeaf {
        // This is the amount to return to the HubPool. This occurs when there is a PoolRebalanceLeaf netSendAmount that
        // is negative. This is just the negative of this value.
        uint256 amountToReturn;
        // Used to verify that this is being executed on the correct destination chainId.
        uint256 chainId;
        // This array designates how much each of those addresses should be refunded.
        uint256[] refundAmounts;
        // Used as the index in the bitmap to track whether this leaf has been executed or not.
        uint32 leafId;
        // The associated L2TokenAddress that these claims apply to.
        address l2TokenAddress;
        // Must be same length as refundAmounts and designates each address that must be refunded.
        address[] refundAddresses;
    }

    // This struct represents the data to fully specify a relay. If any portion of this data differs, the relay is
    // considered to be completely distinct. Only one relay for a particular depositId, chainId pair should be
    // considered valid and repaid. This data is hashed and inserted into the slow relay merkle root so that an off
    // chain validator can choose when to refund slow relayers.
    struct RelayData {
        // The address that made the deposit on the origin chain.
        address depositor;
        // The recipient address on the destination chain.
        address recipient;
        // The corresponding token address on the destination chain.
        address destinationToken;
        // The total relay amount before fees are taken out.
        uint256 amount;
        // Origin chain id.
        uint256 originChainId;
        // Destination chain id.
        uint256 destinationChainId;
        // The LP Fee percentage computed by the relayer based on the deposit's quote timestamp
        // and the HubPool's utilization.
        uint64 realizedLpFeePct;
        // The relayer fee percentage specified in the deposit.
        uint64 relayerFeePct;
        // The id uniquely identifying this deposit on the origin chain.
        uint32 depositId;
    }

    // Stores collection of merkle roots that can be published to this contract from the HubPool, which are referenced
    // by "data workers" via inclusion proofs to execute leaves in the roots.
    struct RootBundle {
        // Merkle root of slow relays that were not fully filled and whose recipient is still owed funds from the LP pool.
        bytes32 slowRelayRoot;
        // Merkle root of relayer refunds for successful relays.
        bytes32 relayerRefundRoot;
        // This is a 2D bitmap tracking which leaves in the relayer refund root have been claimed, with max size of
        // 256x(2^248) leaves per root.
        mapping(uint256 => uint256) claimedBitmap;
    }

    function setCrossDomainAdmin(address newCrossDomainAdmin) external;

    function setHubPool(address newHubPool) external;

    function setEnableRoute(
        address originToken,
        uint256 destinationChainId,
        bool enable
    ) external;

    function setDepositQuoteTimeBuffer(uint32 buffer) external;

    function relayRootBundle(bytes32 relayerRefundRoot, bytes32 slowRelayRoot) external;

    function emergencyDeleteRootBundle(uint256 rootBundleId) external;

    function deposit(
        address recipient,
        address originToken,
        uint256 amount,
        uint256 destinationChainId,
        uint64 relayerFeePct,
        uint32 quoteTimestamp
    ) external payable;

    function speedUpDeposit(
        address depositor,
        uint64 newRelayerFeePct,
        uint32 depositId,
        bytes memory depositorSignature
    ) external;

    function fillRelay(
        address depositor,
        address recipient,
        address destinationToken,
        uint256 amount,
        uint256 maxTokensToSend,
        uint256 repaymentChainId,
        uint256 originChainId,
        uint64 realizedLpFeePct,
        uint64 relayerFeePct,
        uint32 depositId
    ) external;

    function fillRelayWithUpdatedFee(
        address depositor,
        address recipient,
        address destinationToken,
        uint256 amount,
        uint256 maxTokensToSend,
        uint256 repaymentChainId,
        uint256 originChainId,
        uint64 realizedLpFeePct,
        uint64 relayerFeePct,
        uint64 newRelayerFeePct,
        uint32 depositId,
        bytes memory depositorSignature
    ) external;

    function executeSlowRelayLeaf(
        address depositor,
        address recipient,
        address destinationToken,
        uint256 amount,
        uint256 originChainId,
        uint64 realizedLpFeePct,
        uint64 relayerFeePct,
        uint32 depositId,
        uint32 rootBundleId,
        bytes32[] memory proof
    ) external;

    function executeRelayerRefundLeaf(
        uint32 rootBundleId,
        SpokePoolInterface.RelayerRefundLeaf memory relayerRefundLeaf,
        bytes32[] memory proof
    ) external;

    function chainId() external view returns (uint256);
}

File 16 of 17 : AdapterInterface.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.0;

/**
 * @notice Sends cross chain messages and tokens to contracts on a specific L2 network.
 */

interface AdapterInterface {
    event MessageRelayed(address target, bytes message);

    event TokensRelayed(address l1Token, address l2Token, uint256 amount, address to);

    function relayMessage(address target, bytes calldata message) external payable;

    function relayTokens(
        address l1Token,
        address l2Token,
        uint256 amount,
        address to
    ) external payable;
}

File 17 of 17 : WETH9.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

interface WETH9 {
    function withdraw(uint256 wad) external;

    function deposit() external payable;

    function balanceOf(address guy) external view returns (uint256 wad);

    function transfer(address guy, uint256 wad) external;
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_l2GatewayRouter","type":"address"},{"internalType":"address","name":"_crossDomainAdmin","type":"address"},{"internalType":"address","name":"_hubPool","type":"address"},{"internalType":"address","name":"_wethAddress","type":"address"},{"internalType":"address","name":"timerAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"l1Token","type":"address"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"numberOfTokensBridged","type":"uint256"}],"name":"ArbitrumTokensBridged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"rootBundleId","type":"uint256"}],"name":"EmergencyDeleteRootBundle","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"originToken","type":"address"},{"indexed":true,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"EnabledDepositRoute","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amountToReturn","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"refundAmounts","type":"uint256[]"},{"indexed":true,"internalType":"uint32","name":"rootBundleId","type":"uint32"},{"indexed":true,"internalType":"uint32","name":"leafId","type":"uint32"},{"indexed":false,"internalType":"address","name":"l2TokenAddress","type":"address"},{"indexed":false,"internalType":"address[]","name":"refundAddresses","type":"address[]"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"ExecutedRelayerRefundRoot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalFilledAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fillAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"repaymentChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"originChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"relayerFeePct","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"appliedRelayerFeePct","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"realizedLpFeePct","type":"uint64"},{"indexed":false,"internalType":"uint32","name":"depositId","type":"uint32"},{"indexed":false,"internalType":"address","name":"destinationToken","type":"address"},{"indexed":true,"internalType":"address","name":"relayer","type":"address"},{"indexed":true,"internalType":"address","name":"depositor","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"bool","name":"isSlowRelay","type":"bool"}],"name":"FilledRelay","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"originChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"relayerFeePct","type":"uint64"},{"indexed":true,"internalType":"uint32","name":"depositId","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"quoteTimestamp","type":"uint32"},{"indexed":true,"internalType":"address","name":"originToken","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"address","name":"depositor","type":"address"}],"name":"FundsDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"rootBundleId","type":"uint32"},{"indexed":true,"internalType":"bytes32","name":"relayerRefundRoot","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"slowRelayRoot","type":"bytes32"}],"name":"RelayedRootBundle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"newRelayerFeePct","type":"uint64"},{"indexed":true,"internalType":"uint32","name":"depositId","type":"uint32"},{"indexed":true,"internalType":"address","name":"depositor","type":"address"},{"indexed":false,"internalType":"bytes","name":"depositorSignature","type":"bytes"}],"name":"RequestedSpeedUpDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"newBuffer","type":"uint32"}],"name":"SetDepositQuoteTimeBuffer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newHubPool","type":"address"}],"name":"SetHubPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newL2GatewayRouter","type":"address"}],"name":"SetL2GatewayRouter","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAdmin","type":"address"}],"name":"SetXDomainAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amountToReturn","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"uint32","name":"leafId","type":"uint32"},{"indexed":true,"internalType":"address","name":"l2TokenAddress","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"TokensBridged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"l2Token","type":"address"},{"indexed":true,"internalType":"address","name":"l1Token","type":"address"}],"name":"WhitelistedTokens","type":"event"},{"inputs":[],"name":"chainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crossDomainAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"originToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint64","name":"relayerFeePct","type":"uint64"},{"internalType":"uint32","name":"quoteTimestamp","type":"uint32"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"depositQuoteTimeBuffer","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rootBundleId","type":"uint256"}],"name":"emergencyDeleteRootBundle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"enabledDepositRoutes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"rootBundleId","type":"uint32"},{"components":[{"internalType":"uint256","name":"amountToReturn","type":"uint256"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"uint256[]","name":"refundAmounts","type":"uint256[]"},{"internalType":"uint32","name":"leafId","type":"uint32"},{"internalType":"address","name":"l2TokenAddress","type":"address"},{"internalType":"address[]","name":"refundAddresses","type":"address[]"}],"internalType":"struct SpokePoolInterface.RelayerRefundLeaf","name":"relayerRefundLeaf","type":"tuple"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"executeRelayerRefundLeaf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"depositor","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"destinationToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"originChainId","type":"uint256"},{"internalType":"uint64","name":"realizedLpFeePct","type":"uint64"},{"internalType":"uint64","name":"relayerFeePct","type":"uint64"},{"internalType":"uint32","name":"depositId","type":"uint32"},{"internalType":"uint32","name":"rootBundleId","type":"uint32"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"executeSlowRelayLeaf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"depositor","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"destinationToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"maxTokensToSend","type":"uint256"},{"internalType":"uint256","name":"repaymentChainId","type":"uint256"},{"internalType":"uint256","name":"originChainId","type":"uint256"},{"internalType":"uint64","name":"realizedLpFeePct","type":"uint64"},{"internalType":"uint64","name":"relayerFeePct","type":"uint64"},{"internalType":"uint32","name":"depositId","type":"uint32"}],"name":"fillRelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"depositor","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"destinationToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"maxTokensToSend","type":"uint256"},{"internalType":"uint256","name":"repaymentChainId","type":"uint256"},{"internalType":"uint256","name":"originChainId","type":"uint256"},{"internalType":"uint64","name":"realizedLpFeePct","type":"uint64"},{"internalType":"uint64","name":"relayerFeePct","type":"uint64"},{"internalType":"uint64","name":"newRelayerFeePct","type":"uint64"},{"internalType":"uint32","name":"depositId","type":"uint32"},{"internalType":"bytes","name":"depositorSignature","type":"bytes"}],"name":"fillRelayWithUpdatedFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hubPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l2GatewayRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"numberOfDeposits","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"relayFills","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"relayerRefundRoot","type":"bytes32"},{"internalType":"bytes32","name":"slowRelayRoot","type":"bytes32"}],"name":"relayRootBundle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rootBundles","outputs":[{"internalType":"bytes32","name":"slowRelayRoot","type":"bytes32"},{"internalType":"bytes32","name":"relayerRefundRoot","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newCrossDomainAdmin","type":"address"}],"name":"setCrossDomainAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"setCurrentTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"newDepositQuoteTimeBuffer","type":"uint32"}],"name":"setDepositQuoteTimeBuffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"originToken","type":"address"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setEnableRoute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newHubPool","type":"address"}],"name":"setHubPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newL2GatewayRouter","type":"address"}],"name":"setL2GatewayRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"depositor","type":"address"},{"internalType":"uint64","name":"newRelayerFeePct","type":"uint64"},{"internalType":"uint32","name":"depositId","type":"uint32"},{"internalType":"bytes","name":"depositorSignature","type":"bytes"}],"name":"speedUpDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"l2Token","type":"address"},{"internalType":"address","name":"l1Token","type":"address"}],"name":"whitelistToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wrappedNativeToken","outputs":[{"internalType":"contract WETH9","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a06040526002805463ffffffff60a01b1916604b60a31b1790553480156200002757600080fd5b506040516200482a3803806200482a8339810160408190526200004a916200025a565b600080546001600160a81b0319166001600160a01b03831617600160a01b179055838383836200007a84620000ab565b620000858362000151565b506001600160a01b031660805250620000a0905085620001f3565b5050505050620002ca565b6001600160a01b038116620001075760405162461bcd60e51b815260206004820152601960248201527f4261642062726964676520726f7574657220616464726573730000000000000060448201526064015b60405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517fa9e8c42c9e7fca7f62755189a16b2f5314d43d8fb24e91ba54e6d65f9314e84990600090a250565b6001600160a01b038116620001a95760405162461bcd60e51b815260206004820152601460248201527f4261642068756220706f6f6c20616464726573730000000000000000000000006044820152606401620000fe565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f1f17a88f67b0f49060a34bec1a4723a563620e6aa265eb640b5046dcee0759a090600090a250565b600680546001600160a01b0319166001600160a01b0383169081179091556040517fdc4a5f4c066ad14c1306e624550b42395e08f992a76b416cc7b1ad11503d376c90600090a250565b80516001600160a01b03811681146200025557600080fd5b919050565b600080600080600060a086880312156200027357600080fd5b6200027e866200023d565b94506200028e602087016200023d565b93506200029e604087016200023d565b9250620002ae606087016200023d565b9150620002be608087016200023d565b90509295509295909350565b60805161452162000309600039600081816101e401528181610dd001528181610e990152818161237e01528181612d2c0152612d8201526145216000f3fe6080604052600436106101c65760003560e01c806357f6dcb8116100f7578063c835685911610095578063e282d5b911610064578063e282d5b9146105e0578063ee2a53f814610600578063f06850f614610635578063ffc351a31461066257600080fd5b8063c835685914610523578063daf9c21014610550578063de7eba7814610593578063e1904402146105b357600080fd5b80639a8a0592116100d15780639a8a059214610497578063a1244c67146104aa578063ac9650d8146104e3578063be3576ee1461050357600080fd5b806357f6dcb81461040d57806389a153cc146104575780638a7860ce1461047757600080fd5b806329cb924d11610164578063493a4f841161013e578063493a4f84146103555780634e3485c8146103755780635249fef1146103955780635285e058146103e057600080fd5b806329cb924d146102ff578063364f01a614610322578063492289781461034257600080fd5b80631dfb2d02116101a05780631dfb2d021461027f57806322f8e5661461029f578063272751c7146102bf5780632752042e146102df57600080fd5b806317fcb39b146101d25780631b3d5559146102305780631c39c38d1461025257600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506102067f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561023c57600080fd5b5061025061024b3660046137c6565b610682565b005b34801561025e57600080fd5b506000546102069073ffffffffffffffffffffffffffffffffffffffff1681565b34801561028b57600080fd5b5061025061029a3660046138c2565b61070b565b3480156102ab57600080fd5b506102506102ba3660046138dd565b610798565b3480156102cb57600080fd5b506102506102da366004613904565b610841565b3480156102eb57600080fd5b506102506102fa366004613944565b610953565b34801561030b57600080fd5b50610314610a54565b604051908152602001610227565b34801561032e57600080fd5b5061025061033d36600461395f565b610b0c565b6102506103503660046139aa565b610b9b565b34801561036157600080fd5b50610250610370366004613a10565b611012565b34801561038157600080fd5b506102506103903660046138c2565b611128565b3480156103a157600080fd5b506103d06103b0366004613a32565b600460209081526000928352604080842090915290825290205460ff1681565b6040519015158152602001610227565b3480156103ec57600080fd5b506001546102069073ffffffffffffffffffffffffffffffffffffffff1681565b34801561041957600080fd5b506002546104429074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610227565b34801561046357600080fd5b50610250610472366004613a5c565b61116e565b34801561048357600080fd5b506102506104923660046138dd565b6112ca565b3480156104a357600080fd5b5046610314565b3480156104b657600080fd5b50600254610442907801000000000000000000000000000000000000000000000000900463ffffffff1681565b6104f66104f1366004613afa565b61139e565b6040516102279190613be5565b34801561050f57600080fd5b5061025061051e366004613c65565b611578565b34801561052f57600080fd5b506006546102069073ffffffffffffffffffffffffffffffffffffffff1681565b34801561055c57600080fd5b5061020661056b3660046138c2565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561059f57600080fd5b506102506105ae3660046138c2565b611604565b3480156105bf57600080fd5b506002546102069073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105ec57600080fd5b506102506105fb366004613dc3565b61164a565b34801561060c57600080fd5b5061062061061b3660046138dd565b6117a8565b60408051928352602083019190915201610227565b34801561064157600080fd5b506103146106503660046138dd565b60056020526000908152604090205481565b34801561066e57600080fd5b5061025061067d366004613e32565b6117d6565b61068a611941565b6106b7600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6106c28383836119c7565b610706600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b505050565b610713611d73565b61071b611941565b610748600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b61075181611e3d565b610795600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b50565b60005473ffffffffffffffffffffffffffffffffffffffff166107ba57600080fd5b6000546040517f22f8e5660000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff909116906322f8e56690602401600060405180830381600087803b15801561082657600080fd5b505af115801561083a573d6000803e3d6000fd5b5050505050565b610849611d73565b610851611941565b61087e600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b73ffffffffffffffffffffffffffffffffffffffff8316600081815260046020908152604080832086845282529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182528492917f0a21fdd43d0ad0c62689ee7230a47309a050755bcc52eba00310add65297692a910160405180910390a3610706600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b61095b611d73565b610963611941565b610990600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b600280547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff8416908102919091179091556040519081527f0e55dd180fa793d9036c804d0a116e6a7617a48e72cee1f83d92793a793fcc039060200160405180910390a1610795600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b6000805473ffffffffffffffffffffffffffffffffffffffff1615610b075760008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166329cb924d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ade573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b029190613f10565b905090565b504290565b610b14611d73565b610b1c611941565b610b49600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b610b538282611f29565b610b97600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b5050565b610ba3611941565b610bd0600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260046020908152604080832086845290915290205460ff16610c6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f44697361626c656420726f75746500000000000000000000000000000000000060448201526064015b60405180910390fd5b6706f05b59d3b200008267ffffffffffffffff1610610cea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c69642072656c6179657220666565000000000000000000000000006044820152606401610c66565b600254610d159074010000000000000000000000000000000000000000900463ffffffff1682613f58565b63ffffffff16610d23610a54565b10158015610d685750600254610d579074010000000000000000000000000000000000000000900463ffffffff1682613f7d565b63ffffffff16610d65610a54565b11155b610dce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c69642071756f74652074696d6500000000000000000000000000006044820152606401610c66565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148015610e295750600034115b15610f1d57833414610e97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d73672e76616c7565206d757374206d6174636820616d6f756e7400000000006044820152606401610c66565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610eff57600080fd5b505af1158015610f13573d6000803e3d6000fd5b5050505050610f3f565b610f3f73ffffffffffffffffffffffffffffffffffffffff8616333087611fa5565b610f768446600254869086907801000000000000000000000000000000000000000000000000900463ffffffff16868b8d33612081565b60028054601890610fa8907801000000000000000000000000000000000000000000000000900463ffffffff16613fa5565b91906101000a81548163ffffffff021916908363ffffffff16021790555061100a600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b505050505050565b61101a611d73565b611022611941565b61104f600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6003805460018101825560008281529181027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c81018590557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01838155604051919290918491869163ffffffff8616917fc86ba04c55bc5eb2f2876b91c438849a296dbec7b08751c3074d92e04f0a77af91a45050610b97600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b611130611d73565b611138611941565b611165600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b61075181612112565b611176611941565b6111a3600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b60006040518061012001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b73ffffffffffffffffffffffffffffffffffffffff1681526020018a73ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018681526020016112184690565b81526020018567ffffffffffffffff1681526020018467ffffffffffffffff1681526020018363ffffffff168152509050600061125482612181565b9050600061126682848b8860006121b1565b905061127782828a8887600061245e565b5050506112be600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b50505050505050505050565b6112d2611d73565b6112da611941565b611307600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6003818154811061131a5761131a613fc8565b60009182526020822060039091020181815560010181905560405182917f3569b846531b754c99cb80df3f49cd72fa6fe106aaee5ab8e0caf35a9d7ce88d91a2610795600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b60603415611408576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4f6e6c79206d756c746963616c6c207769746820302076616c756500000000006044820152606401610c66565b8167ffffffffffffffff8111156114215761142161360a565b60405190808252806020026020018201604052801561145457816020015b606081526020019060019003908161143f5790505b50905060005b82811015611571576000803086868581811061147857611478613fc8565b905060200281019061148a9190613ff7565b60405161149892919061405c565b600060405180830381855af49150503d80600081146114d3576040519150601f19603f3d011682016040523d82523d6000602084013e6114d8565b606091505b50915091508161153e576044815110156114f157600080fd5b6004810190508080602001905181019061150b919061409c565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6691906140ed565b8084848151811061155157611551613fc8565b60200260200101819052505050808061156990614100565b91505061145a565b5092915050565b611580611941565b6115ad600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6115c08a8a8a8a8a468b8b8b8b8b6125a0565b6112be600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b61160c611d73565b611614611941565b611641600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6107518161271f565b611652611941565b61167f600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6706f05b59d3b200008367ffffffffffffffff16106116fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c69642072656c6179657220666565000000000000000000000000006044820152606401610c66565b611707844685858561280b565b8373ffffffffffffffffffffffffffffffffffffffff168263ffffffff167fb9de16bf376724405019a10ef4fedac57fecd292bf86c08d81d7c42d394d5d378584604051611756929190614138565b60405180910390a36117a2600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b50505050565b600381815481106117b857600080fd5b60009182526020909120600390910201805460019091015490915082565b6117de611941565b61180b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6118188c8785858561280b565b60006040518061012001604052808e73ffffffffffffffffffffffffffffffffffffffff1681526020018d73ffffffffffffffffffffffffffffffffffffffff1681526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018b815260200188815260200161188d4690565b81526020018767ffffffffffffffff1681526020018667ffffffffffffffff1681526020018463ffffffff16815250905060006118c982612181565b905060006118db82848d8960006121b1565b90506118ec82828c8987600061245e565b505050611933600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b505050505050505050505050565b60005474010000000000000000000000000000000000000000900460ff166119c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c66565b565b46826020015114611a34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f496e76616c696420636861696e496400000000000000000000000000000000006044820152606401610c66565b8160400151518260a001515114611aa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f696e76616c6964206c65616600000000000000000000000000000000000000006044820152606401610c66565b600060038463ffffffff1681548110611ac257611ac2613fc8565b90600052602060002090600302019050611ae1816001015484846128a8565b611b47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4261642050726f6f6600000000000000000000000000000000000000000000006044820152606401610c66565b611b5e81600201846060015163ffffffff166128e5565b15611bc5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f416c726561647920636c61696d656400000000000000000000000000000000006044820152606401610c66565b611bdc81600201846060015163ffffffff16612926565b60408301515160005b81811015611c6d57600085604001518281518110611c0557611c05613fc8565b602002602001015190506000811115611c6457611c648660a001518381518110611c3157611c31613fc8565b602002602001015182886080015173ffffffffffffffffffffffffffffffffffffffff166129649092919063ffffffff16565b50600101611be5565b50835115611d0657611c7e846129ba565b836080015173ffffffffffffffffffffffffffffffffffffffff16846060015163ffffffff1685602001517f828fc203220356df8f072a91681caee7d5c75095e2a95e80ed5a14b384697f71876000015133604051611cfd92919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60405180910390a45b836060015163ffffffff168563ffffffff1685602001517ff8bd640004bcec1b89657020f561d0b070cbdf662d0b158db9dccb0a8301bfab8760000151886040015189608001518a60a0015133604051611d649594939291906141dc565b60405180910390a45050505050565b600154611da99073ffffffffffffffffffffffffffffffffffffffff167311110000000000000000000000000000000011110190565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146119c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4f4e4c595f434f554e544552504152545f4741544557415900000000000000006044820152606401610c66565b73ffffffffffffffffffffffffffffffffffffffff8116611eba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4261642068756220706f6f6c20616464726573730000000000000000000000006044820152606401610c66565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f1f17a88f67b0f49060a34bec1a4723a563620e6aa265eb640b5046dcee0759a090600090a250565b73ffffffffffffffffffffffffffffffffffffffff82811660008181526007602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055517f8d7f294eaa476236fe8cb5629376a12cd37dace3d21e6a7b98f1641c4ed5f09e9190a35050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526117a29085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612b86565b604080518a8152602081018a905290810188905267ffffffffffffffff8716606082015263ffffffff858116608083015273ffffffffffffffffffffffffffffffffffffffff84811660a084015280841692908616918816907f4a4fc49abd237bfd7f4ac82d6c7a284c69daaea5154430cff04ad7482c6c42549060c00160405180910390a4505050505050505050565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fdc4a5f4c066ad14c1306e624550b42395e08f992a76b416cc7b1ad11503d376c90600090a250565b600081604051602001612194919061423a565b604051602081830303815290604052805190602001209050919050565b60006706f05b59d3b200008367ffffffffffffffff161080156121e957506706f05b59d3b200008560c0015167ffffffffffffffff16105b61224f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f696e76616c6964206665657300000000000000000000000000000000000000006044820152606401610c66565b6060850151600087815260056020526040902054106122ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f72656c61792066696c6c656400000000000000000000000000000000000000006044820152606401610c66565b836000036122da57506000612455565b6122f384848760c001516122ee91906142e1565b612c92565b600087815260056020526040812054606088015192935086926123169190614304565b90508281101561233f5780925061233c83868960c0015161233791906142e1565b612ccc565b91505b6000888152600560205260408120805485929061235d90849061431b565b9091555050604087015173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081169116036123e557836123d25760408701516123d29073ffffffffffffffffffffffffffffffffffffffff16333085611fa5565b6123e0876020015183612cf5565b612452565b8361241f576123e0338860200151848a6040015173ffffffffffffffffffffffffffffffffffffffff16611fa5909392919063ffffffff16565b612452876020015183896040015173ffffffffffffffffffffffffffffffffffffffff166129649092919063ffffffff16565b50505b95945050505050565b816000015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f56450a30040c51955338a4a9fbafcf94f7ca4b75f4cd83c2f5e29ef77fbe0a3a8460600151600560008b815260200190815260200160002054898988608001518960a001518a60e001518c8c60c001518d61010001518e604001518f602001518f6040516125909d9c9b9a999897969594939291909c8d5260208d019b909b5260408c019990995260608b019790975260808a019590955260a089019390935267ffffffffffffffff91821660c0890152811660e08801521661010086015263ffffffff1661012085015273ffffffffffffffffffffffffffffffffffffffff9081166101408501521661016083015215156101808201526101a00190565b60405180910390a3505050505050565b60006040518061012001604052808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018b73ffffffffffffffffffffffffffffffffffffffff1681526020018a81526020018981526020018881526020018767ffffffffffffffff1681526020018667ffffffffffffffff1681526020018563ffffffff16815250905061267560038463ffffffff168154811061265c5761265c613fc8565b9060005260206000209060030201600001548284612e36565b6126db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642070726f6f66000000000000000000000000000000000000006044820152606401610c66565b60006126e682612181565b905060006126fd82848560600151600060016121b1565b905061270f828260008087600161245e565b5050505050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff811661279c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4261642062726964676520726f757465722061646472657373000000000000006044820152606401610c66565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fa9e8c42c9e7fca7f62755189a16b2f5314d43d8fb24e91ba54e6d65f9314e84990600090a250565b60408051608060208201819052601160a08301527f4143524f53532d56322d4645452d312e3000000000000000000000000000000060c083015267ffffffffffffffff86169282019290925263ffffffff8416606082015290810185905260009060e001604051602081830303815290604052805190602001209050600061289282612e4e565b905061289f878285612e89565b50505050505050565b60006128db8285856040516020016128c09190614333565b60405160208183030381529060405280519060200120612f27565b90505b9392505050565b6000806128f4610100846143fd565b9050600061290461010085614411565b6000928352602095909552506040902054600190931b92831690921492915050565b6000612934610100836143fd565b9050600061294461010084614411565b600092835260209490945250604090208054600190931b90921790915550565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526107069084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611fff565b608081015173ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541680612a4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f556e696e697469616c697a6564206d61696e6e657420746f6b656e00000000006044820152606401610c66565b60065460025483516040517f7b3a3c8b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152928316602482015260448101919091526080606482015260006084820152911690637b3a3c8b9060a4016000604051808303816000875af1158015612ae2573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052612b28919081019061409c565b5060025482516040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091526000917f997d81a0a8415d688a6c319736602098252bf6445e0e879326f682f11928e317910160405180910390a25050565b6000612be8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612f3d9092919063ffffffff16565b8051909150156107065780806020019051810190612c069190614425565b610706576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610c66565b6000612ca682670de0b6b3a7640000614442565b67ffffffffffffffff16612cc284670de0b6b3a7640000614463565b6128de91906143fd565b6000670de0b6b3a7640000612ce18382614442565b612cc29067ffffffffffffffff1685614463565b73ffffffffffffffffffffffffffffffffffffffff82163b15612d5357610b9773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168383612964565b6040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632e1a7d4d90602401600060405180830381600087803b158015612ddb57600080fd5b505af1158015612def573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff8516925083156108fc02915083906000818181858888f19350505050158015610706573d6000803e3d6000fd5b60006128db8285856040516020016128c0919061423a565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01612194565b612e938282612f4c565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610706576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f696e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610c66565b600082612f348584612f70565b14949350505050565b60606128db8484600085612fdc565b6000806000612f5b8585613172565b91509150612f68816131e0565b509392505050565b600081815b8451811015612f68576000858281518110612f9257612f92613fc8565b60200260200101519050808311612fb85760008381526020829052604090209250612fc9565b600081815260208490526040902092505b5080612fd481614100565b915050612f75565b60608247101561306e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610c66565b73ffffffffffffffffffffffffffffffffffffffff85163b6130ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c66565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161311591906144a0565b60006040518083038185875af1925050503d8060008114613152576040519150601f19603f3d011682016040523d82523d6000602084013e613157565b606091505b5091509150613167828286613434565b979650505050505050565b60008082516041036131a85760208301516040840151606085015160001a61319c87828585613487565b945094505050506131d9565b82516040036131d157602083015160408401516131c686838361359f565b9350935050506131d9565b506000905060025b9250929050565b60008160048111156131f4576131f46144bc565b036131fc5750565b6001816004811115613210576132106144bc565b03613277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c66565b600281600481111561328b5761328b6144bc565b036132f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c66565b6003816004811115613306576133066144bc565b03613393576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610c66565b60048160048111156133a7576133a76144bc565b03610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610c66565b606083156134435750816128de565b8251156134535782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6691906140ed565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156134be5750600090506003613596565b8460ff16601b141580156134d657508460ff16601c14155b156134e75750600090506004613596565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561353b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661358f57600060019250925050613596565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8316816135d560ff86901c601b61431b565b90506135e387828885613487565b935093505050935093915050565b803563ffffffff8116811461360557600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff8111828210171561365c5761365c61360a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156136a9576136a961360a565b604052919050565b600067ffffffffffffffff8211156136cb576136cb61360a565b5060051b60200190565b600082601f8301126136e657600080fd5b813560206136fb6136f6836136b1565b613662565b82815260059290921b8401810191818101908684111561371a57600080fd5b8286015b84811015613735578035835291830191830161371e565b509695505050505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461360557600080fd5b600082601f83011261377557600080fd5b813560206137856136f6836136b1565b82815260059290921b840181019181810190868411156137a457600080fd5b8286015b84811015613735576137b981613740565b83529183019183016137a8565b6000806000606084860312156137db57600080fd5b6137e4846135f1565b9250602084013567ffffffffffffffff8082111561380157600080fd5b9085019060c0828803121561381557600080fd5b61381d613639565b823581526020830135602082015260408301358281111561383d57600080fd5b613849898286016136d5565b60408301525061385b606084016135f1565b606082015261386c60808401613740565b608082015260a08301358281111561388357600080fd5b61388f89828601613764565b60a083015250935060408601359150808211156138ab57600080fd5b506138b8868287016136d5565b9150509250925092565b6000602082840312156138d457600080fd5b6128de82613740565b6000602082840312156138ef57600080fd5b5035919050565b801515811461079557600080fd5b60008060006060848603121561391957600080fd5b61392284613740565b9250602084013591506040840135613939816138f6565b809150509250925092565b60006020828403121561395657600080fd5b6128de826135f1565b6000806040838503121561397257600080fd5b61397b83613740565b915061398960208401613740565b90509250929050565b803567ffffffffffffffff8116811461360557600080fd5b60008060008060008060c087890312156139c357600080fd5b6139cc87613740565b95506139da60208801613740565b945060408701359350606087013592506139f660808801613992565b9150613a0460a088016135f1565b90509295509295509295565b60008060408385031215613a2357600080fd5b50508035926020909101359150565b60008060408385031215613a4557600080fd5b613a4e83613740565b946020939093013593505050565b6000806000806000806000806000806101408b8d031215613a7c57600080fd5b613a858b613740565b9950613a9360208c01613740565b9850613aa160408c01613740565b975060608b0135965060808b0135955060a08b0135945060c08b01359350613acb60e08c01613992565b9250613ada6101008c01613992565b9150613ae96101208c016135f1565b90509295989b9194979a5092959850565b60008060208385031215613b0d57600080fd5b823567ffffffffffffffff80821115613b2557600080fd5b818501915085601f830112613b3957600080fd5b813581811115613b4857600080fd5b8660208260051b8501011115613b5d57600080fd5b60209290920196919550909350505050565b60005b83811015613b8a578181015183820152602001613b72565b838111156117a25750506000910152565b60008151808452613bb3816020860160208601613b6f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613c58577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452613c46858351613b9b565b94509285019290850190600101613c0c565b5092979650505050505050565b6000806000806000806000806000806101408b8d031215613c8557600080fd5b613c8e8b613740565b9950613c9c60208c01613740565b9850613caa60408c01613740565b975060608b0135965060808b01359550613cc660a08c01613992565b9450613cd460c08c01613992565b9350613ce260e08c016135f1565b9250613cf16101008c016135f1565b91506101208b013567ffffffffffffffff811115613d0e57600080fd5b613d1a8d828e016136d5565b9150509295989b9194979a5092959850565b600067ffffffffffffffff821115613d4657613d4661360a565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613d8357600080fd5b8135613d916136f682613d2c565b818152846020838601011115613da657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215613dd957600080fd5b613de285613740565b9350613df060208601613992565b9250613dfe604086016135f1565b9150606085013567ffffffffffffffff811115613e1a57600080fd5b613e2687828801613d72565b91505092959194509250565b6000806000806000806000806000806000806101808d8f031215613e5557600080fd5b613e5e8d613740565b9b50613e6c60208e01613740565b9a50613e7a60408e01613740565b995060608d0135985060808d0135975060a08d0135965060c08d01359550613ea460e08e01613992565b9450613eb36101008e01613992565b9350613ec26101208e01613992565b9250613ed16101408e016135f1565b915067ffffffffffffffff6101608e01351115613eed57600080fd5b613efe8e6101608f01358f01613d72565b90509295989b509295989b509295989b565b600060208284031215613f2257600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff83811690831681811015613f7557613f75613f29565b039392505050565b600063ffffffff808316818516808303821115613f9c57613f9c613f29565b01949350505050565b600063ffffffff808316818103613fbe57613fbe613f29565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261402c57600080fd5b83018035915067ffffffffffffffff82111561404757600080fd5b6020019150368190038213156131d957600080fd5b8183823760009101908152919050565b600061407a6136f684613d2c565b905082815283838301111561408e57600080fd5b6128de836020830184613b6f565b6000602082840312156140ae57600080fd5b815167ffffffffffffffff8111156140c557600080fd5b8201601f810184136140d657600080fd5b6140e58482516020840161406c565b949350505050565b6020815260006128de6020830184613b9b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361413157614131613f29565b5060010190565b67ffffffffffffffff831681526040602082015260006128db6040830184613b9b565b600081518084526020808501945080840160005b8381101561418b5781518752958201959082019060010161416f565b509495945050505050565b600081518084526020808501945080840160005b8381101561418b57815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016141aa565b85815260a0602082015260006141f560a083018761415b565b73ffffffffffffffffffffffffffffffffffffffff808716604085015283820360608501526142248287614196565b9250808516608085015250509695505050505050565b815173ffffffffffffffffffffffffffffffffffffffff90811682526020808401518216908301526040808401519182169083015261012082019050606083015160608301526080830151608083015260a083015160a083015260c08301516142af60c084018267ffffffffffffffff169052565b5060e08301516142cb60e084018267ffffffffffffffff169052565b506101009283015163ffffffff16919092015290565b600067ffffffffffffffff808316818516808303821115613f9c57613f9c613f29565b60008282101561431657614316613f29565b500390565b6000821982111561432e5761432e613f29565b500190565b6020815281516020820152602082015160408201526000604083015160c0606084015261436360e084018261415b565b905063ffffffff606085015116608084015273ffffffffffffffffffffffffffffffffffffffff60808501511660a084015260a08401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160c08501526124558282614196565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261440c5761440c6143ce565b500490565b600082614420576144206143ce565b500690565b60006020828403121561443757600080fd5b81516128de816138f6565b600067ffffffffffffffff83811690831681811015613f7557613f75613f29565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561449b5761449b613f29565b500290565b600082516144b2818460208701613b6f565b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea2646970667358221220824fd71e31f6f23b9cad96da1db93c08eb986fdd4ea50840024056d9e4ecfab764736f6c634300080d00330000000000000000000000005288c571fd7ad117bea99bf60fe0846c4e84f933000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106101c65760003560e01c806357f6dcb8116100f7578063c835685911610095578063e282d5b911610064578063e282d5b9146105e0578063ee2a53f814610600578063f06850f614610635578063ffc351a31461066257600080fd5b8063c835685914610523578063daf9c21014610550578063de7eba7814610593578063e1904402146105b357600080fd5b80639a8a0592116100d15780639a8a059214610497578063a1244c67146104aa578063ac9650d8146104e3578063be3576ee1461050357600080fd5b806357f6dcb81461040d57806389a153cc146104575780638a7860ce1461047757600080fd5b806329cb924d11610164578063493a4f841161013e578063493a4f84146103555780634e3485c8146103755780635249fef1146103955780635285e058146103e057600080fd5b806329cb924d146102ff578063364f01a614610322578063492289781461034257600080fd5b80631dfb2d02116101a05780631dfb2d021461027f57806322f8e5661461029f578063272751c7146102bf5780632752042e146102df57600080fd5b806317fcb39b146101d25780631b3d5559146102305780631c39c38d1461025257600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506102067f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab181565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561023c57600080fd5b5061025061024b3660046137c6565b610682565b005b34801561025e57600080fd5b506000546102069073ffffffffffffffffffffffffffffffffffffffff1681565b34801561028b57600080fd5b5061025061029a3660046138c2565b61070b565b3480156102ab57600080fd5b506102506102ba3660046138dd565b610798565b3480156102cb57600080fd5b506102506102da366004613904565b610841565b3480156102eb57600080fd5b506102506102fa366004613944565b610953565b34801561030b57600080fd5b50610314610a54565b604051908152602001610227565b34801561032e57600080fd5b5061025061033d36600461395f565b610b0c565b6102506103503660046139aa565b610b9b565b34801561036157600080fd5b50610250610370366004613a10565b611012565b34801561038157600080fd5b506102506103903660046138c2565b611128565b3480156103a157600080fd5b506103d06103b0366004613a32565b600460209081526000928352604080842090915290825290205460ff1681565b6040519015158152602001610227565b3480156103ec57600080fd5b506001546102069073ffffffffffffffffffffffffffffffffffffffff1681565b34801561041957600080fd5b506002546104429074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610227565b34801561046357600080fd5b50610250610472366004613a5c565b61116e565b34801561048357600080fd5b506102506104923660046138dd565b6112ca565b3480156104a357600080fd5b5046610314565b3480156104b657600080fd5b50600254610442907801000000000000000000000000000000000000000000000000900463ffffffff1681565b6104f66104f1366004613afa565b61139e565b6040516102279190613be5565b34801561050f57600080fd5b5061025061051e366004613c65565b611578565b34801561052f57600080fd5b506006546102069073ffffffffffffffffffffffffffffffffffffffff1681565b34801561055c57600080fd5b5061020661056b3660046138c2565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561059f57600080fd5b506102506105ae3660046138c2565b611604565b3480156105bf57600080fd5b506002546102069073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105ec57600080fd5b506102506105fb366004613dc3565b61164a565b34801561060c57600080fd5b5061062061061b3660046138dd565b6117a8565b60408051928352602083019190915201610227565b34801561064157600080fd5b506103146106503660046138dd565b60056020526000908152604090205481565b34801561066e57600080fd5b5061025061067d366004613e32565b6117d6565b61068a611941565b6106b7600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6106c28383836119c7565b610706600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b505050565b610713611d73565b61071b611941565b610748600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b61075181611e3d565b610795600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b50565b60005473ffffffffffffffffffffffffffffffffffffffff166107ba57600080fd5b6000546040517f22f8e5660000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff909116906322f8e56690602401600060405180830381600087803b15801561082657600080fd5b505af115801561083a573d6000803e3d6000fd5b5050505050565b610849611d73565b610851611941565b61087e600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b73ffffffffffffffffffffffffffffffffffffffff8316600081815260046020908152604080832086845282529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182528492917f0a21fdd43d0ad0c62689ee7230a47309a050755bcc52eba00310add65297692a910160405180910390a3610706600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b61095b611d73565b610963611941565b610990600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b600280547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff8416908102919091179091556040519081527f0e55dd180fa793d9036c804d0a116e6a7617a48e72cee1f83d92793a793fcc039060200160405180910390a1610795600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b6000805473ffffffffffffffffffffffffffffffffffffffff1615610b075760008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166329cb924d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ade573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b029190613f10565b905090565b504290565b610b14611d73565b610b1c611941565b610b49600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b610b538282611f29565b610b97600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b5050565b610ba3611941565b610bd0600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260046020908152604080832086845290915290205460ff16610c6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f44697361626c656420726f75746500000000000000000000000000000000000060448201526064015b60405180910390fd5b6706f05b59d3b200008267ffffffffffffffff1610610cea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c69642072656c6179657220666565000000000000000000000000006044820152606401610c66565b600254610d159074010000000000000000000000000000000000000000900463ffffffff1682613f58565b63ffffffff16610d23610a54565b10158015610d685750600254610d579074010000000000000000000000000000000000000000900463ffffffff1682613f7d565b63ffffffff16610d65610a54565b11155b610dce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c69642071756f74652074696d6500000000000000000000000000006044820152606401610c66565b7f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148015610e295750600034115b15610f1d57833414610e97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d73672e76616c7565206d757374206d6174636820616d6f756e7400000000006044820152606401610c66565b7f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610eff57600080fd5b505af1158015610f13573d6000803e3d6000fd5b5050505050610f3f565b610f3f73ffffffffffffffffffffffffffffffffffffffff8616333087611fa5565b610f768446600254869086907801000000000000000000000000000000000000000000000000900463ffffffff16868b8d33612081565b60028054601890610fa8907801000000000000000000000000000000000000000000000000900463ffffffff16613fa5565b91906101000a81548163ffffffff021916908363ffffffff16021790555061100a600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b505050505050565b61101a611d73565b611022611941565b61104f600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6003805460018101825560008281529181027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c81018590557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01838155604051919290918491869163ffffffff8616917fc86ba04c55bc5eb2f2876b91c438849a296dbec7b08751c3074d92e04f0a77af91a45050610b97600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b611130611d73565b611138611941565b611165600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b61075181612112565b611176611941565b6111a3600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b60006040518061012001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b73ffffffffffffffffffffffffffffffffffffffff1681526020018a73ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018681526020016112184690565b81526020018567ffffffffffffffff1681526020018467ffffffffffffffff1681526020018363ffffffff168152509050600061125482612181565b9050600061126682848b8860006121b1565b905061127782828a8887600061245e565b5050506112be600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b50505050505050505050565b6112d2611d73565b6112da611941565b611307600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6003818154811061131a5761131a613fc8565b60009182526020822060039091020181815560010181905560405182917f3569b846531b754c99cb80df3f49cd72fa6fe106aaee5ab8e0caf35a9d7ce88d91a2610795600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b60603415611408576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4f6e6c79206d756c746963616c6c207769746820302076616c756500000000006044820152606401610c66565b8167ffffffffffffffff8111156114215761142161360a565b60405190808252806020026020018201604052801561145457816020015b606081526020019060019003908161143f5790505b50905060005b82811015611571576000803086868581811061147857611478613fc8565b905060200281019061148a9190613ff7565b60405161149892919061405c565b600060405180830381855af49150503d80600081146114d3576040519150601f19603f3d011682016040523d82523d6000602084013e6114d8565b606091505b50915091508161153e576044815110156114f157600080fd5b6004810190508080602001905181019061150b919061409c565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6691906140ed565b8084848151811061155157611551613fc8565b60200260200101819052505050808061156990614100565b91505061145a565b5092915050565b611580611941565b6115ad600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6115c08a8a8a8a8a468b8b8b8b8b6125a0565b6112be600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b61160c611d73565b611614611941565b611641600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6107518161271f565b611652611941565b61167f600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6706f05b59d3b200008367ffffffffffffffff16106116fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c69642072656c6179657220666565000000000000000000000000006044820152606401610c66565b611707844685858561280b565b8373ffffffffffffffffffffffffffffffffffffffff168263ffffffff167fb9de16bf376724405019a10ef4fedac57fecd292bf86c08d81d7c42d394d5d378584604051611756929190614138565b60405180910390a36117a2600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b50505050565b600381815481106117b857600080fd5b60009182526020909120600390910201805460019091015490915082565b6117de611941565b61180b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6118188c8785858561280b565b60006040518061012001604052808e73ffffffffffffffffffffffffffffffffffffffff1681526020018d73ffffffffffffffffffffffffffffffffffffffff1681526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018b815260200188815260200161188d4690565b81526020018767ffffffffffffffff1681526020018667ffffffffffffffff1681526020018463ffffffff16815250905060006118c982612181565b905060006118db82848d8960006121b1565b90506118ec82828c8987600061245e565b505050611933600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b505050505050505050505050565b60005474010000000000000000000000000000000000000000900460ff166119c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c66565b565b46826020015114611a34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f496e76616c696420636861696e496400000000000000000000000000000000006044820152606401610c66565b8160400151518260a001515114611aa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f696e76616c6964206c65616600000000000000000000000000000000000000006044820152606401610c66565b600060038463ffffffff1681548110611ac257611ac2613fc8565b90600052602060002090600302019050611ae1816001015484846128a8565b611b47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4261642050726f6f6600000000000000000000000000000000000000000000006044820152606401610c66565b611b5e81600201846060015163ffffffff166128e5565b15611bc5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f416c726561647920636c61696d656400000000000000000000000000000000006044820152606401610c66565b611bdc81600201846060015163ffffffff16612926565b60408301515160005b81811015611c6d57600085604001518281518110611c0557611c05613fc8565b602002602001015190506000811115611c6457611c648660a001518381518110611c3157611c31613fc8565b602002602001015182886080015173ffffffffffffffffffffffffffffffffffffffff166129649092919063ffffffff16565b50600101611be5565b50835115611d0657611c7e846129ba565b836080015173ffffffffffffffffffffffffffffffffffffffff16846060015163ffffffff1685602001517f828fc203220356df8f072a91681caee7d5c75095e2a95e80ed5a14b384697f71876000015133604051611cfd92919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60405180910390a45b836060015163ffffffff168563ffffffff1685602001517ff8bd640004bcec1b89657020f561d0b070cbdf662d0b158db9dccb0a8301bfab8760000151886040015189608001518a60a0015133604051611d649594939291906141dc565b60405180910390a45050505050565b600154611da99073ffffffffffffffffffffffffffffffffffffffff167311110000000000000000000000000000000011110190565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146119c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4f4e4c595f434f554e544552504152545f4741544557415900000000000000006044820152606401610c66565b73ffffffffffffffffffffffffffffffffffffffff8116611eba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4261642068756220706f6f6c20616464726573730000000000000000000000006044820152606401610c66565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f1f17a88f67b0f49060a34bec1a4723a563620e6aa265eb640b5046dcee0759a090600090a250565b73ffffffffffffffffffffffffffffffffffffffff82811660008181526007602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055517f8d7f294eaa476236fe8cb5629376a12cd37dace3d21e6a7b98f1641c4ed5f09e9190a35050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526117a29085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612b86565b604080518a8152602081018a905290810188905267ffffffffffffffff8716606082015263ffffffff858116608083015273ffffffffffffffffffffffffffffffffffffffff84811660a084015280841692908616918816907f4a4fc49abd237bfd7f4ac82d6c7a284c69daaea5154430cff04ad7482c6c42549060c00160405180910390a4505050505050505050565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fdc4a5f4c066ad14c1306e624550b42395e08f992a76b416cc7b1ad11503d376c90600090a250565b600081604051602001612194919061423a565b604051602081830303815290604052805190602001209050919050565b60006706f05b59d3b200008367ffffffffffffffff161080156121e957506706f05b59d3b200008560c0015167ffffffffffffffff16105b61224f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f696e76616c6964206665657300000000000000000000000000000000000000006044820152606401610c66565b6060850151600087815260056020526040902054106122ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f72656c61792066696c6c656400000000000000000000000000000000000000006044820152606401610c66565b836000036122da57506000612455565b6122f384848760c001516122ee91906142e1565b612c92565b600087815260056020526040812054606088015192935086926123169190614304565b90508281101561233f5780925061233c83868960c0015161233791906142e1565b612ccc565b91505b6000888152600560205260408120805485929061235d90849061431b565b9091555050604087015173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab181169116036123e557836123d25760408701516123d29073ffffffffffffffffffffffffffffffffffffffff16333085611fa5565b6123e0876020015183612cf5565b612452565b8361241f576123e0338860200151848a6040015173ffffffffffffffffffffffffffffffffffffffff16611fa5909392919063ffffffff16565b612452876020015183896040015173ffffffffffffffffffffffffffffffffffffffff166129649092919063ffffffff16565b50505b95945050505050565b816000015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f56450a30040c51955338a4a9fbafcf94f7ca4b75f4cd83c2f5e29ef77fbe0a3a8460600151600560008b815260200190815260200160002054898988608001518960a001518a60e001518c8c60c001518d61010001518e604001518f602001518f6040516125909d9c9b9a999897969594939291909c8d5260208d019b909b5260408c019990995260608b019790975260808a019590955260a089019390935267ffffffffffffffff91821660c0890152811660e08801521661010086015263ffffffff1661012085015273ffffffffffffffffffffffffffffffffffffffff9081166101408501521661016083015215156101808201526101a00190565b60405180910390a3505050505050565b60006040518061012001604052808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018b73ffffffffffffffffffffffffffffffffffffffff1681526020018a81526020018981526020018881526020018767ffffffffffffffff1681526020018667ffffffffffffffff1681526020018563ffffffff16815250905061267560038463ffffffff168154811061265c5761265c613fc8565b9060005260206000209060030201600001548284612e36565b6126db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642070726f6f66000000000000000000000000000000000000006044820152606401610c66565b60006126e682612181565b905060006126fd82848560600151600060016121b1565b905061270f828260008087600161245e565b5050505050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff811661279c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4261642062726964676520726f757465722061646472657373000000000000006044820152606401610c66565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fa9e8c42c9e7fca7f62755189a16b2f5314d43d8fb24e91ba54e6d65f9314e84990600090a250565b60408051608060208201819052601160a08301527f4143524f53532d56322d4645452d312e3000000000000000000000000000000060c083015267ffffffffffffffff86169282019290925263ffffffff8416606082015290810185905260009060e001604051602081830303815290604052805190602001209050600061289282612e4e565b905061289f878285612e89565b50505050505050565b60006128db8285856040516020016128c09190614333565b60405160208183030381529060405280519060200120612f27565b90505b9392505050565b6000806128f4610100846143fd565b9050600061290461010085614411565b6000928352602095909552506040902054600190931b92831690921492915050565b6000612934610100836143fd565b9050600061294461010084614411565b600092835260209490945250604090208054600190931b90921790915550565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526107069084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611fff565b608081015173ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541680612a4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f556e696e697469616c697a6564206d61696e6e657420746f6b656e00000000006044820152606401610c66565b60065460025483516040517f7b3a3c8b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152928316602482015260448101919091526080606482015260006084820152911690637b3a3c8b9060a4016000604051808303816000875af1158015612ae2573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052612b28919081019061409c565b5060025482516040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091526000917f997d81a0a8415d688a6c319736602098252bf6445e0e879326f682f11928e317910160405180910390a25050565b6000612be8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612f3d9092919063ffffffff16565b8051909150156107065780806020019051810190612c069190614425565b610706576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610c66565b6000612ca682670de0b6b3a7640000614442565b67ffffffffffffffff16612cc284670de0b6b3a7640000614463565b6128de91906143fd565b6000670de0b6b3a7640000612ce18382614442565b612cc29067ffffffffffffffff1685614463565b73ffffffffffffffffffffffffffffffffffffffff82163b15612d5357610b9773ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1168383612964565b6040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018290527f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab173ffffffffffffffffffffffffffffffffffffffff1690632e1a7d4d90602401600060405180830381600087803b158015612ddb57600080fd5b505af1158015612def573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff8516925083156108fc02915083906000818181858888f19350505050158015610706573d6000803e3d6000fd5b60006128db8285856040516020016128c0919061423a565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01612194565b612e938282612f4c565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610706576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f696e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610c66565b600082612f348584612f70565b14949350505050565b60606128db8484600085612fdc565b6000806000612f5b8585613172565b91509150612f68816131e0565b509392505050565b600081815b8451811015612f68576000858281518110612f9257612f92613fc8565b60200260200101519050808311612fb85760008381526020829052604090209250612fc9565b600081815260208490526040902092505b5080612fd481614100565b915050612f75565b60608247101561306e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610c66565b73ffffffffffffffffffffffffffffffffffffffff85163b6130ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c66565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161311591906144a0565b60006040518083038185875af1925050503d8060008114613152576040519150601f19603f3d011682016040523d82523d6000602084013e613157565b606091505b5091509150613167828286613434565b979650505050505050565b60008082516041036131a85760208301516040840151606085015160001a61319c87828585613487565b945094505050506131d9565b82516040036131d157602083015160408401516131c686838361359f565b9350935050506131d9565b506000905060025b9250929050565b60008160048111156131f4576131f46144bc565b036131fc5750565b6001816004811115613210576132106144bc565b03613277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c66565b600281600481111561328b5761328b6144bc565b036132f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c66565b6003816004811115613306576133066144bc565b03613393576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610c66565b60048160048111156133a7576133a76144bc565b03610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610c66565b606083156134435750816128de565b8251156134535782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6691906140ed565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156134be5750600090506003613596565b8460ff16601b141580156134d657508460ff16601c14155b156134e75750600090506004613596565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561353b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661358f57600060019250925050613596565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8316816135d560ff86901c601b61431b565b90506135e387828885613487565b935093505050935093915050565b803563ffffffff8116811461360557600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff8111828210171561365c5761365c61360a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156136a9576136a961360a565b604052919050565b600067ffffffffffffffff8211156136cb576136cb61360a565b5060051b60200190565b600082601f8301126136e657600080fd5b813560206136fb6136f6836136b1565b613662565b82815260059290921b8401810191818101908684111561371a57600080fd5b8286015b84811015613735578035835291830191830161371e565b509695505050505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461360557600080fd5b600082601f83011261377557600080fd5b813560206137856136f6836136b1565b82815260059290921b840181019181810190868411156137a457600080fd5b8286015b84811015613735576137b981613740565b83529183019183016137a8565b6000806000606084860312156137db57600080fd5b6137e4846135f1565b9250602084013567ffffffffffffffff8082111561380157600080fd5b9085019060c0828803121561381557600080fd5b61381d613639565b823581526020830135602082015260408301358281111561383d57600080fd5b613849898286016136d5565b60408301525061385b606084016135f1565b606082015261386c60808401613740565b608082015260a08301358281111561388357600080fd5b61388f89828601613764565b60a083015250935060408601359150808211156138ab57600080fd5b506138b8868287016136d5565b9150509250925092565b6000602082840312156138d457600080fd5b6128de82613740565b6000602082840312156138ef57600080fd5b5035919050565b801515811461079557600080fd5b60008060006060848603121561391957600080fd5b61392284613740565b9250602084013591506040840135613939816138f6565b809150509250925092565b60006020828403121561395657600080fd5b6128de826135f1565b6000806040838503121561397257600080fd5b61397b83613740565b915061398960208401613740565b90509250929050565b803567ffffffffffffffff8116811461360557600080fd5b60008060008060008060c087890312156139c357600080fd5b6139cc87613740565b95506139da60208801613740565b945060408701359350606087013592506139f660808801613992565b9150613a0460a088016135f1565b90509295509295509295565b60008060408385031215613a2357600080fd5b50508035926020909101359150565b60008060408385031215613a4557600080fd5b613a4e83613740565b946020939093013593505050565b6000806000806000806000806000806101408b8d031215613a7c57600080fd5b613a858b613740565b9950613a9360208c01613740565b9850613aa160408c01613740565b975060608b0135965060808b0135955060a08b0135945060c08b01359350613acb60e08c01613992565b9250613ada6101008c01613992565b9150613ae96101208c016135f1565b90509295989b9194979a5092959850565b60008060208385031215613b0d57600080fd5b823567ffffffffffffffff80821115613b2557600080fd5b818501915085601f830112613b3957600080fd5b813581811115613b4857600080fd5b8660208260051b8501011115613b5d57600080fd5b60209290920196919550909350505050565b60005b83811015613b8a578181015183820152602001613b72565b838111156117a25750506000910152565b60008151808452613bb3816020860160208601613b6f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613c58577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452613c46858351613b9b565b94509285019290850190600101613c0c565b5092979650505050505050565b6000806000806000806000806000806101408b8d031215613c8557600080fd5b613c8e8b613740565b9950613c9c60208c01613740565b9850613caa60408c01613740565b975060608b0135965060808b01359550613cc660a08c01613992565b9450613cd460c08c01613992565b9350613ce260e08c016135f1565b9250613cf16101008c016135f1565b91506101208b013567ffffffffffffffff811115613d0e57600080fd5b613d1a8d828e016136d5565b9150509295989b9194979a5092959850565b600067ffffffffffffffff821115613d4657613d4661360a565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613d8357600080fd5b8135613d916136f682613d2c565b818152846020838601011115613da657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215613dd957600080fd5b613de285613740565b9350613df060208601613992565b9250613dfe604086016135f1565b9150606085013567ffffffffffffffff811115613e1a57600080fd5b613e2687828801613d72565b91505092959194509250565b6000806000806000806000806000806000806101808d8f031215613e5557600080fd5b613e5e8d613740565b9b50613e6c60208e01613740565b9a50613e7a60408e01613740565b995060608d0135985060808d0135975060a08d0135965060c08d01359550613ea460e08e01613992565b9450613eb36101008e01613992565b9350613ec26101208e01613992565b9250613ed16101408e016135f1565b915067ffffffffffffffff6101608e01351115613eed57600080fd5b613efe8e6101608f01358f01613d72565b90509295989b509295989b509295989b565b600060208284031215613f2257600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff83811690831681811015613f7557613f75613f29565b039392505050565b600063ffffffff808316818516808303821115613f9c57613f9c613f29565b01949350505050565b600063ffffffff808316818103613fbe57613fbe613f29565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261402c57600080fd5b83018035915067ffffffffffffffff82111561404757600080fd5b6020019150368190038213156131d957600080fd5b8183823760009101908152919050565b600061407a6136f684613d2c565b905082815283838301111561408e57600080fd5b6128de836020830184613b6f565b6000602082840312156140ae57600080fd5b815167ffffffffffffffff8111156140c557600080fd5b8201601f810184136140d657600080fd5b6140e58482516020840161406c565b949350505050565b6020815260006128de6020830184613b9b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361413157614131613f29565b5060010190565b67ffffffffffffffff831681526040602082015260006128db6040830184613b9b565b600081518084526020808501945080840160005b8381101561418b5781518752958201959082019060010161416f565b509495945050505050565b600081518084526020808501945080840160005b8381101561418b57815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016141aa565b85815260a0602082015260006141f560a083018761415b565b73ffffffffffffffffffffffffffffffffffffffff808716604085015283820360608501526142248287614196565b9250808516608085015250509695505050505050565b815173ffffffffffffffffffffffffffffffffffffffff90811682526020808401518216908301526040808401519182169083015261012082019050606083015160608301526080830151608083015260a083015160a083015260c08301516142af60c084018267ffffffffffffffff169052565b5060e08301516142cb60e084018267ffffffffffffffff169052565b506101009283015163ffffffff16919092015290565b600067ffffffffffffffff808316818516808303821115613f9c57613f9c613f29565b60008282101561431657614316613f29565b500390565b6000821982111561432e5761432e613f29565b500190565b6020815281516020820152602082015160408201526000604083015160c0606084015261436360e084018261415b565b905063ffffffff606085015116608084015273ffffffffffffffffffffffffffffffffffffffff60808501511660a084015260a08401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160c08501526124558282614196565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261440c5761440c6143ce565b500490565b600082614420576144206143ce565b500690565b60006020828403121561443757600080fd5b81516128de816138f6565b600067ffffffffffffffff83811690831681811015613f7557613f75613f29565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561449b5761449b613f29565b500290565b600082516144b2818460208701613b6f565b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea2646970667358221220824fd71e31f6f23b9cad96da1db93c08eb986fdd4ea50840024056d9e4ecfab764736f6c634300080d0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000005288c571fd7ad117bea99bf60fe0846c4e84f933000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _l2GatewayRouter (address): 0x5288c571Fd7aD117beA99bF60FE0846C4E84F933
Arg [1] : _crossDomainAdmin (address): 0xc186fA914353c44b2E33eBE05f21846F1048bEda
Arg [2] : _hubPool (address): 0xc186fA914353c44b2E33eBE05f21846F1048bEda
Arg [3] : _wethAddress (address): 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1
Arg [4] : timerAddress (address): 0x0000000000000000000000000000000000000000

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000005288c571fd7ad117bea99bf60fe0846c4e84f933
Arg [1] : 000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda
Arg [2] : 000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda
Arg [3] : 00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.