Contract 0x86ca30bef97fb651b8d866d45503684b90cb3312 3

 

Contract Overview

Balance:
0 Ether

EtherValue:
$0.00
Txn Hash Method
Index
From
To
Value
0xad36f660f9af4c721e0b6dd935d83cfe1c715e968d4be41e3f9c3cd798f5b76fSwap And Send138545932022-07-05 0:18:1139 mins ago0x1e537c11a4a1ac26c13487ffd9608ab80da5c528 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.015 Ether0.0001343498260.001
0x4c1fb98c08d80a517669689134ca2c0694687d7b161107adc7ff35c409aeea8eSwap And Send138541782022-07-05 0:13:2843 mins ago0xe21723c250d06f5ee67bc9adef211b65e6099263 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.083152820722754 Ether0.0002087663610.001
0x642c9fc9ec6cd9a41fa9c88adf57a3d802fd9ec66ddddb4c2024e05e8c006418Swap And Send138533512022-07-04 23:59:2057 mins ago0x88c57e9d2458965c5be8f00dc7c03a540603ab51 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.03 Ether0.0000764694420.001
0x2d593c4bcdd0d3a1358aa8504c19a189a00d65af68aa02529e49fb2bdcfaa6dcSwap And Send138530752022-07-04 23:54:271 hr 2 mins ago0x0aacdfe9780606dfb84bad4d987db7176addc7b3 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.15 Ether0.0002374398940.001
0x798b183bbe5fea012ced4bddad8ccc0d5560c2de6ea12c04c9fd65d6a8457f10Swap And Send138530402022-07-04 23:53:251 hr 3 mins ago0x30eb3bb45a602a2026e4b2fa4c09f129ac0569df IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.058 Ether0.0002419169480.00105
0x754f0fc7e6a4ab67152e636ce89117fbd0638be2de53df5846f16209bf0dcc04Swap And Send138529162022-07-04 23:50:201 hr 6 mins ago0x64f623018ab7414c21cd65027943281eeb13f4be IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.9 Ether0.000302475720.001
0xbc52e49500a26125134655e8454818edf2d5f707dc609ece00b5f897e8211977Swap And Send138528672022-07-04 23:49:351 hr 7 mins ago0x4ce0f7572c12a37cbb6f9507a2dec3f4f944ad9e IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.9 Ether0.000302475720.001
0xaba0a3845764b9d48d5cdcca0a65491ae489bdfba8844f22ac2df60af706779bSwap And Send138517552022-07-04 23:30:391 hr 26 mins ago0x3b473f790818976d207c2accda42cb432b749451 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.097885666185456 Ether0.0002682329350.001
0x1b69cf821e408d4794ff3964d65a9d55a34e4f0b33abf2951d7f1fe75d9ed121Swap And Send138503662022-07-04 23:05:391 hr 51 mins ago0xdb51f9dfec3182b41c1657c6cb88fe2201979e00 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.038 Ether0.0001018390830.001
0xa452927335eb93c6495e6255658cd94f6ef46b480f65f838f37a614cab21623eSwap And Send138503332022-07-04 23:04:151 hr 52 mins ago0x93469e8abc1dee93eb92284678e124c75f069619 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.11 Ether0.0000708796460.001
0x787965c660592a6aacbeb26ae524e9fa2a241a250aac5e10906b8e2aeb892ca9Swap And Send138502222022-07-04 23:01:141 hr 56 mins ago0x05217598e8d451e63f16a4b9747ab8fe541686fb IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.0724 Ether0.0000814787490.001
0x91fc43a76600eca2a5e5190d6bed8da94b86441cb6350f910b1e8159fb093d15Swap And Send138500342022-07-04 22:55:522 hrs 1 min ago0x2fe05ee4d4d06e545f26ca9275bc0a4831df398a IN  0x86ca30bef97fb651b8d866d45503684b90cb33121.44 Ether0.0001350882640.001
0x114532c7892ca6a4b56286e193030419ac992976e37ed10118cd2df220338448Swap And Send138479552022-07-04 22:22:112 hrs 35 mins ago0xa0ab8eddf14a5174688e2eb1bdb69cdf377142c3 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.456056561934017 Ether0.0001024293830.001
0x5c8ea9dab5f1c8becdc20b3359a0d8eecaa1968222ee7443f453473ad5b41302Swap And Send138476502022-07-04 22:12:282 hrs 44 mins ago0x87fcfe1b0eae956b4c0a23e627d6fc9443c3b111 IN  0x86ca30bef97fb651b8d866d45503684b90cb33121.45 Ether0.0001236146030.001
0x12d68be1a4062b8ec95f43e5c5cb9a9ac924fa21cc3a7550f76bd5057873acccSwap And Send138464022022-07-04 21:48:163 hrs 8 mins ago0xd337da5ed405edb8da3749cf938c6a2f8abf7549 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.05 Ether0.0000674312020.001
0xc2d65f50e07b7b30d40b20b4712fca8b85d47e10499415d3e44fb7bf07e38046Swap And Send138463462022-07-04 21:46:253 hrs 10 mins ago0x63a13c11cb3c7c92994984ff04484dbf9168a8fb IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.0075 Ether0.0000779933530.001
0xb51118ef48c6cf898df283ee3dbe7346db4b7f387586fcd0671b6e33f334809cSwap And Send138462812022-07-04 21:43:513 hrs 13 mins ago0x961f4a36510cbb4ee58ee8feaf65dc7e36a8e892 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.25 Ether0.0001102236720.001
0x87a57e51f4e92d94f7f8598a64a3fc103cf7bf73ad701629eb4b7fe850157175Swap And Send138453962022-07-04 21:28:543 hrs 28 mins ago0x37ab51e870a6e464e8696bb1088c1940931d622e IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.05 Ether0.0001050960720.001
0xa869ac35829611040651227d0ab1a03bb8f36de735aff9a78207d605264a13c0Swap And Send138452832022-07-04 21:25:273 hrs 31 mins ago0x61c108ba3a1f0070b2b5cdbe9c902d4477e7618a IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.25 Ether0.0001884373360.001
0x3823e67fbf7e9a467ca6a8aa539340622004ea52ff9d218582347c998c364303Swap And Send138441932022-07-04 20:47:114 hrs 10 mins ago0x7e788c62c9ca849dce399e90f912beae14424616 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.1 Ether0.0000846007050.001
0x4f50aa8820ceb275a8f85f0019abe87186ffe9810378e561ed0102309b394c40Swap And Send138438482022-07-04 20:33:374 hrs 23 mins ago0xb3cec7cfba324bf5a10498b48878e212c88037db IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.029 Ether0.0000725404490.001
0x824c133d8737981ab143dc11a50a0cdef5401349b7892b82108fc0358128144aSwap And Send138438302022-07-04 20:32:284 hrs 24 mins ago0xbcb8295d192b1ee9b61b0c89cff33f8d840966d4 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.414 Ether0.0000727505610.001
0x731a4f83cf70409c4353bc8000dcfd2c2d228f287ce1032fee3b8e9716bdab9aSwap And Send138434402022-07-04 20:23:464 hrs 33 mins ago0x70e3c1b7f2dc5d292298145ae067edd025bbfb10 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.835119127 Ether0.0001012318250.001
0x93a746988be9fd065e3ce6106aa537f2fff78c4b02055988395497d310b5f1eeSwap And Send138431032022-07-04 20:12:434 hrs 44 mins ago0xe9137a9c82f569c6bc24b4f4dd705d63171c2610 IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.108 Ether0.0000975535930.001
0x3b1e095d3021c9365662522bd0cca2fe3e298d02069beb5b6a2d5be15ef57a55Swap And Send138429482022-07-04 20:07:514 hrs 49 mins ago0x175d34eae73bea16d595430b706b3353dbe557ae IN  0x86ca30bef97fb651b8d866d45503684b90cb33120.1997 Ether0.0001235050440.001
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x73f802b93b5709542939ee4d57f8e764e44876ecb0034816ab7e0360c0becdd2138563092022-07-05 0:54:262 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312 0x83f6244bd87662118d96d9a6d44f09dfff14b30e0 Ether
0x73f802b93b5709542939ee4d57f8e764e44876ecb0034816ab7e0360c0becdd2138563092022-07-05 0:54:262 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312 0xaa30d6bba6285d0585722e2440ff89e23ef688640 Ether
0x73f802b93b5709542939ee4d57f8e764e44876ecb0034816ab7e0360c0becdd2138563092022-07-05 0:54:262 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312Wrapped Ether0 Ether
0x73f802b93b5709542939ee4d57f8e764e44876ecb0034816ab7e0360c0becdd2138563092022-07-05 0:54:262 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312Wrapped Ether0.318142633759972842 Ether
0x73f802b93b5709542939ee4d57f8e764e44876ecb0034816ab7e0360c0becdd2138563092022-07-05 0:54:262 mins ago Socket: Hop Implementation L2 0x86ca30bef97fb651b8d866d45503684b90cb33120.318142633759972842 Ether
0xc122ebff6d054a49df22ad8e6203115067103e93e976f3073220366b710a0be7138558872022-07-05 0:47:0210 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb33120x8ae1233cd081831c9104da5d8b90e7441f7ab7390.174154177755611871 Ether
0xc122ebff6d054a49df22ad8e6203115067103e93e976f3073220366b710a0be7138558872022-07-05 0:47:0210 mins ago Wrapped Ether 0x86ca30bef97fb651b8d866d45503684b90cb33120.174154177755611871 Ether
0xc122ebff6d054a49df22ad8e6203115067103e93e976f3073220366b710a0be7138558872022-07-05 0:47:0210 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312Wrapped Ether0 Ether
0xc122ebff6d054a49df22ad8e6203115067103e93e976f3073220366b710a0be7138558872022-07-05 0:47:0210 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312 0xaa30d6bba6285d0585722e2440ff89e23ef688640 Ether
0xc122ebff6d054a49df22ad8e6203115067103e93e976f3073220366b710a0be7138558872022-07-05 0:47:0210 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312 0xe38faf9040c7f09958c638bbdb977083722c51560 Ether
0xc122ebff6d054a49df22ad8e6203115067103e93e976f3073220366b710a0be7138558872022-07-05 0:47:0210 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312 0xe38faf9040c7f09958c638bbdb977083722c51560 Ether
0xc122ebff6d054a49df22ad8e6203115067103e93e976f3073220366b710a0be7138558872022-07-05 0:47:0210 mins ago 0x83f6244bd87662118d96d9a6d44f09dfff14b30e 0x86ca30bef97fb651b8d866d45503684b90cb33120 Ether
0x1b3f0cd52028341d602f8ba3cfdd8a8295ace8e64c7aab0be0913238b15352f4138558342022-07-05 0:46:1510 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312 0x83f6244bd87662118d96d9a6d44f09dfff14b30e0 Ether
0x1b3f0cd52028341d602f8ba3cfdd8a8295ace8e64c7aab0be0913238b15352f4138558342022-07-05 0:46:1510 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312 0xaa30d6bba6285d0585722e2440ff89e23ef688640 Ether
0x1b3f0cd52028341d602f8ba3cfdd8a8295ace8e64c7aab0be0913238b15352f4138558342022-07-05 0:46:1510 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312Wrapped Ether0 Ether
0x1b3f0cd52028341d602f8ba3cfdd8a8295ace8e64c7aab0be0913238b15352f4138558342022-07-05 0:46:1510 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312Wrapped Ether0.306703169069076938 Ether
0x1b3f0cd52028341d602f8ba3cfdd8a8295ace8e64c7aab0be0913238b15352f4138558342022-07-05 0:46:1510 mins ago Socket: Hop Implementation L2 0x86ca30bef97fb651b8d866d45503684b90cb33120.306703169069076938 Ether
0xb12a98345f4f586e2e246ccbadf2d07489ecf8000c4e586f0552851bff71edea138556742022-07-05 0:42:1814 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb33120x0bb602f88bf886282ff69d4cec937cc2a7d9e19a0.013671558244883733 Ether
0xb12a98345f4f586e2e246ccbadf2d07489ecf8000c4e586f0552851bff71edea138556742022-07-05 0:42:1814 mins ago Wrapped Ether 0x86ca30bef97fb651b8d866d45503684b90cb33120.013671558244883733 Ether
0xb12a98345f4f586e2e246ccbadf2d07489ecf8000c4e586f0552851bff71edea138556742022-07-05 0:42:1814 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312Wrapped Ether0 Ether
0xb12a98345f4f586e2e246ccbadf2d07489ecf8000c4e586f0552851bff71edea138556742022-07-05 0:42:1814 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312 0xaa30d6bba6285d0585722e2440ff89e23ef688640 Ether
0xb12a98345f4f586e2e246ccbadf2d07489ecf8000c4e586f0552851bff71edea138556742022-07-05 0:42:1814 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312 0xe38faf9040c7f09958c638bbdb977083722c51560 Ether
0xb12a98345f4f586e2e246ccbadf2d07489ecf8000c4e586f0552851bff71edea138556742022-07-05 0:42:1814 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb3312 0xe38faf9040c7f09958c638bbdb977083722c51560 Ether
0xb12a98345f4f586e2e246ccbadf2d07489ecf8000c4e586f0552851bff71edea138556742022-07-05 0:42:1814 mins ago 0x83f6244bd87662118d96d9a6d44f09dfff14b30e 0x86ca30bef97fb651b8d866d45503684b90cb33120 Ether
0x1860c85e3cb2ce9b4af2d99633b64c3582c878b5d77a141eacdddc8a0221a59f138554332022-07-05 0:34:5622 mins ago 0x86ca30bef97fb651b8d866d45503684b90cb33120x1b054f3b45ab48d58282448070861a8b67a0dfd80.02014886308879133 Ether
[ Download CSV Export 
Latest 25 Deposits
L2 Txn Hash L1 Deposit Txn Value Token
0xc122ebff6d054a49df22ad8e6203115067103e93e976f3073220366b710a0be72022-07-05 0:47:0210 mins ago0x0a329bff5912452d2a3ea3f363ae63075d3fe83d6061f801705b7e2d6a2c7ea40.174154177755611871 Wrapped Ethe... (WETH)
0xc122ebff6d054a49df22ad8e6203115067103e93e976f3073220366b710a0be72022-07-05 0:47:0210 mins ago0x0a329bff5912452d2a3ea3f363ae63075d3fe83d6061f801705b7e2d6a2c7ea40.174214127377485796 ETH Hop Toke... (hETH)
0x85270c42228c7f37b60b5a3c6131e7339a4bc3cd6323cdab2bdb01115d1d585c2022-07-05 0:13:2843 mins ago0x02d5be32addf68c86d647059906d271a031884d387ccec0898fbdebf7ccf38060.129955021793208518 Wrapped Ethe... (WETH)
0x85270c42228c7f37b60b5a3c6131e7339a4bc3cd6323cdab2bdb01115d1d585c2022-07-05 0:13:2843 mins ago0x02d5be32addf68c86d647059906d271a031884d387ccec0898fbdebf7ccf38060.13 ETH Hop Toke... (hETH)
0x7f6e6dc62522e52c80fd509ecd56b80e818a887b9b8dfcecd6cb59038c43db7c2022-07-04 23:24:261 hr 32 mins ago0xb393306e3366045f50676e270ed3ef072e2766805f88c05a029b2d66b53097e00.009997096681725266 Wrapped Ethe... (WETH)
0x7f6e6dc62522e52c80fd509ecd56b80e818a887b9b8dfcecd6cb59038c43db7c2022-07-04 23:24:261 hr 32 mins ago0xb393306e3366045f50676e270ed3ef072e2766805f88c05a029b2d66b53097e00.01 ETH Hop Toke... (hETH)
0x103f2dbf659edbfe9a1d287cdc39752a519f61a87dd223accb2833c784c81b862022-07-04 22:59:071 hr 58 mins ago0x2f2aaec0d04f0740ed66d69a8e7dcd627d4f4a51cc1bb3b56a896e6bdb49d7d511.997111997505330284 Wrapped Ethe... (WETH)
0x103f2dbf659edbfe9a1d287cdc39752a519f61a87dd223accb2833c784c81b862022-07-04 22:59:071 hr 58 mins ago0x2f2aaec0d04f0740ed66d69a8e7dcd627d4f4a51cc1bb3b56a896e6bdb49d7d512 ETH Hop Toke... (hETH)
0x548e3e9c93b5913ebb87fe567af4422f8b91653533a106baa1313383cc83689e2022-07-04 22:58:211 hr 58 mins ago0xe1421726596afb223530f85d37aeae993a91088f414dc564c03c98d394029fa60.25 ETH Hop Toke... (hETH)
0x548e3e9c93b5913ebb87fe567af4422f8b91653533a106baa1313383cc83689e2022-07-04 22:58:211 hr 58 mins ago0xe1421726596afb223530f85d37aeae993a91088f414dc564c03c98d394029fa60.249952994545386691 Wrapped Ethe... (WETH)
0x2d36596f1913370b2da75446b12baf5edaaeaf05b9677c1703d661fd286cf60d2022-07-04 22:55:342 hrs 1 min ago0xe2d13ce2e353a5e12bedab35abab920bf40e14f1fc4b914c8d15774419a798e90.01 ETH Hop Toke... (hETH)
0x2d36596f1913370b2da75446b12baf5edaaeaf05b9677c1703d661fd286cf60d2022-07-04 22:55:342 hrs 1 min ago0xe2d13ce2e353a5e12bedab35abab920bf40e14f1fc4b914c8d15774419a798e90.009998011604872611 Wrapped Ethe... (WETH)
0xd2676e2ca53d0a791bf625923a6aa7c2a585c89ff59621155272bcde69a260ed2022-07-04 22:15:482 hrs 41 mins ago0x4326c33192c0f100c1b28d4ca1c756562f1ce3056f9d150827252bbbb29dda1d1.999611759842418373 Wrapped Ethe... (WETH)
0xd2676e2ca53d0a791bf625923a6aa7c2a585c89ff59621155272bcde69a260ed2022-07-04 22:15:482 hrs 41 mins ago0x4326c33192c0f100c1b28d4ca1c756562f1ce3056f9d150827252bbbb29dda1d2 ETH Hop Toke... (hETH)
0x69076978beb0a0f36a3c1a1a9c9ce812eb1b69d359d996a7c3061e80e2a7a1902022-07-04 21:19:303 hrs 37 mins ago0xffa3ad5314b40b8e83a7183d0eeaaa1f88400d956d516654fde3a319d992a2650.050412461723783058 ETH Hop Toke... (hETH)
0x69076978beb0a0f36a3c1a1a9c9ce812eb1b69d359d996a7c3061e80e2a7a1902022-07-04 21:19:303 hrs 37 mins ago0xffa3ad5314b40b8e83a7183d0eeaaa1f88400d956d516654fde3a319d992a2650.050402297493297369 Wrapped Ethe... (WETH)
0x7f67596c39d7655f7259c1c0a38febb03679572f8479799bc263cef47e5591fc2022-07-04 21:07:513 hrs 49 mins ago0x4a219ebe6b40a6613d242a200c933757d9730ffdbdaa22b9fe3090e5c26bc50b0.039992002091707356 Wrapped Ethe... (WETH)
0x7f67596c39d7655f7259c1c0a38febb03679572f8479799bc263cef47e5591fc2022-07-04 21:07:513 hrs 49 mins ago0x4a219ebe6b40a6613d242a200c933757d9730ffdbdaa22b9fe3090e5c26bc50b0.04 ETH Hop Toke... (hETH)
0x1b05dedc54d24389727356b9258e92343d40a427ee90d22d12be7260a0a62dbc2022-07-04 20:30:474 hrs 26 mins ago0x308cabb697784de8501bd7b910756764a5a446c4667224e74708a866892cd0400.01 ETH Hop Toke... (hETH)
0x1b05dedc54d24389727356b9258e92343d40a427ee90d22d12be7260a0a62dbc2022-07-04 20:30:474 hrs 26 mins ago0x308cabb697784de8501bd7b910756764a5a446c4667224e74708a866892cd0400.009998000426328483 Wrapped Ethe... (WETH)
0xefe3bea2dbc8e9821e15f183f96483fd41d4cc7f85d4e15d267055643d0f74e02022-07-04 18:58:165 hrs 58 mins ago0x1be896b2bdc5fb8fb88b2da92a5f93764b2694d941d76bd761509e8ba1744ada0.002 ETH Hop Toke... (hETH)
0xefe3bea2dbc8e9821e15f183f96483fd41d4cc7f85d4e15d267055643d0f74e02022-07-04 18:58:165 hrs 58 mins ago0x1be896b2bdc5fb8fb88b2da92a5f93764b2694d941d76bd761509e8ba1744ada0.001999405157188514 Wrapped Ethe... (WETH)
0x30b089ce568de417a30d607ac679b8fc3cdb22118fb436bc4eb83c50c7ad8cfd2022-07-04 18:53:336 hrs 3 mins ago0x048170531e82448fb90aa4b44e5da0bcabc9324888ade22832ceab56126b5fcb0.001999457546514561 Wrapped Ethe... (WETH)
0x83bbfd08a5272b2d8a8270c77dfecd0748b88693a944cd8cbc29baa63b38070c2022-07-04 18:53:336 hrs 3 mins ago0x14e50b2611974f1c3f14e4135aa063d1e6fc21610fb973955ef2cc66b5ba60b83.05 ETH Hop Toke... (hETH)
0x83bbfd08a5272b2d8a8270c77dfecd0748b88693a944cd8cbc29baa63b38070c2022-07-04 18:53:336 hrs 3 mins ago0x14e50b2611974f1c3f14e4135aa063d1e6fc21610fb973955ef2cc66b5ba60b83.049132800992554765 Wrapped Ethe... (WETH)
[ Download CSV Export 
Loading

Contract Source Code Verified (Genesis Bytecode Match Only)

Contract Name:
L2_AmmWrapper

Compiler Version
v0.7.6+commit.3b061308

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion
File 1 of 3 : L2_AmmWrapper.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;

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

interface ISwap {
    function swap(
        uint8 tokenIndexFrom,
        uint8 tokenIndexTo,
        uint256 dx,
        uint256 minDy,
        uint256 deadline
    ) external returns (uint256);
}

interface IL2_Bridge {
    function send(
        uint256 chainId,
        address recipient,
        uint256 amount,
        uint256 bonderFee,
        uint256 amountOutMin,
        uint256 deadline
    ) external;
}

contract L2_AmmWrapper {

    IL2_Bridge public immutable bridge;
    IERC20 public immutable l2CanonicalToken;
    bool public immutable l2CanonicalTokenIsEth;
    IERC20 public immutable hToken;
    ISwap public immutable exchangeAddress;

    /// @notice When l2CanonicalTokenIsEth is true, l2CanonicalToken should be set to the WETH address
    constructor(
        IL2_Bridge _bridge,
        IERC20 _l2CanonicalToken,
        bool _l2CanonicalTokenIsEth,
        IERC20 _hToken,
        ISwap _exchangeAddress
    )
        public
    {
        bridge = _bridge;
        l2CanonicalToken = _l2CanonicalToken;
        l2CanonicalTokenIsEth = _l2CanonicalTokenIsEth;
        hToken = _hToken;
        exchangeAddress = _exchangeAddress;
    }

    receive() external payable {}

    /// @notice amount is the amount the user wants to send plus the Bonder fee
    function swapAndSend(
        uint256 chainId,
        address recipient,
        uint256 amount,
        uint256 bonderFee,
        uint256 amountOutMin,
        uint256 deadline,
        uint256 destinationAmountOutMin,
        uint256 destinationDeadline
    )
        public
        payable
    {
        require(amount >= bonderFee, "L2_AMM_W: Bonder fee cannot exceed amount");

        if (l2CanonicalTokenIsEth) {
            require(msg.value == amount, "L2_AMM_W: Value does not match amount");
            IWETH(address(l2CanonicalToken)).deposit{value: amount}();
        } else {
            require(l2CanonicalToken.transferFrom(msg.sender, address(this), amount), "L2_AMM_W: TransferFrom failed");
        }

        require(l2CanonicalToken.approve(address(exchangeAddress), amount), "L2_AMM_W: Approve failed");
        uint256 swapAmount = exchangeAddress.swap(
            0,
            1,
            amount,
            amountOutMin,
            deadline
        );

        bridge.send(chainId, recipient, swapAmount, bonderFee, destinationAmountOutMin, destinationDeadline);
    }

    function attemptSwap(
        address recipient,
        uint256 amount,
        uint256 amountOutMin,
        uint256 deadline
    )
        external
    {
        require(hToken.transferFrom(msg.sender, address(this), amount), "L2_AMM_W: TransferFrom failed");
        require(hToken.approve(address(exchangeAddress), amount), "L2_AMM_W: Approve failed");

        uint256 amountOut = 0;
        try exchangeAddress.swap(
            1,
            0,
            amount,
            amountOutMin,
            deadline
        ) returns (uint256 _amountOut) {
            amountOut = _amountOut;
        } catch {}

        if (amountOut == 0) {
            // Transfer hToken to recipient if swap fails
            require(hToken.transfer(recipient, amount), "L2_AMM_W: Transfer failed");
            return;
        }

        if (l2CanonicalTokenIsEth) {
            IWETH(address(l2CanonicalToken)).withdraw(amountOut);
            (bool success, ) = recipient.call{value: amountOut}(new bytes(0));
            require(success, 'L2_AMM_W: ETH transfer failed');
        } else {
            require(l2CanonicalToken.transfer(recipient, amountOut), "L2_AMM_W: Transfer failed");
        }
    }
}

File 2 of 3 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, 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 3 of 3 : IWETH.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.12 <=0.7.6;

interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IL2_Bridge","name":"_bridge","type":"address"},{"internalType":"contract IERC20","name":"_l2CanonicalToken","type":"address"},{"internalType":"bool","name":"_l2CanonicalTokenIsEth","type":"bool"},{"internalType":"contract IERC20","name":"_hToken","type":"address"},{"internalType":"contract ISwap","name":"_exchangeAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"attemptSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bridge","outputs":[{"internalType":"contract IL2_Bridge","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exchangeAddress","outputs":[{"internalType":"contract ISwap","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l2CanonicalToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l2CanonicalTokenIsEth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"destinationAmountOutMin","type":"uint256"},{"internalType":"uint256","name":"destinationDeadline","type":"uint256"}],"name":"swapAndSend","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6101206040525a6200001062000083565b8015620000275760008062000024620000df565b50505b50604051620016a6380380620016a68339810160408190526200004a916200014c565b6001600160601b0319606095861b811660805293851b841660a05291151560f81b60c052831b821660e05290911b166101005262000201565b63a8c4c5ec598160e01b8152602081600483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051935060005b6040811015620000da57600082820152602001620000c1565b505050565b632a2a7adb598160e01b8152600481016020815285602082015260005b8681101562000119578086015182820160400152602001620000fc565b506020828760640184336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b505050565b600080600080600060a086880312156200016f5780816200016c620000df565b50505b85516200017c81620001e0565b945060208601516200018e81620001e0565b935060408601518015158114620001ae578182620001ab620000df565b50505b92506060860151620001c081620001e0565b91506080860151620001d281620001e0565b809150509295509295909350565b6001600160a01b0381168114620001fe57600080620000da620000df565b50565b60805160601c60a05160601c60c05160f81c60e05160601c6101005160601c61140b6200029b6000398061036e528061045452806108af5280610bab5280610c915250806101ea528061033f52806105225280610e195250806101c6528061061b52806109295250806101a2528061064152806107b452806109885280610a275280610b7c5250806108d35280610d60525061140b6000f3fe6080604052600436106100645760003560e01c80631ee1bf671461007957806328555125146100b5578063676c5ef6146100e85780639cd016051461011b578063e78cea9214610141578063eea0d7b214610167578063fc6e3b3b1461017a5761006b565b3661006b57005b600080610076610e3b565b50505b5a610082610ea6565b801561009657600080610093610e3b565b50505b5061009f6101a0565b6040516100ac9190611231565b60405180910390f35b5a6100be610ea6565b80156100d2576000806100cf610e3b565b50505b506100db6101c4565b6040516100ac9190611226565b5a6100f1610ea6565b801561010557600080610102610e3b565b50505b506101196101143660046110aa565b6101e8565b005b5a610124610ea6565b801561013857600080610135610e3b565b50505b5061009f6108ad565b5a61014a610ea6565b801561015e5760008061015b610e3b565b50505b5061009f6108d1565b610119610175366004611147565b6108f5565b5a610183610ea6565b801561019757600080610194610e3b565b50505b5061009f610e17565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166323b872dd5a610220610f00565b5a63996d79a5598160e01b8152602081600483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051925060005b60408110156102765760008282015260200161025f565b505050866040518463ffffffff1660e01b8152600401610298939291906111e9565b602060405180830381600087806102ad610f46565b1580156102c2576000806102bf610e3b565b50505b505a6102cc610f92565b5050505050501580156102ec573d6000803e3d60006102e9610e3b565b50505b50505050604051601f3d908101601f1916820160405261030f91908101906110eb565b61033d5760405162461bcd60e51b815260040161032b90611270565b6040518091039061033a610e3b565b50505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663095ea7b37f0000000000000000000000000000000000000000000000000000000000000000856040518363ffffffff1660e01b81526004016103ab92919061120d565b602060405180830381600087806103c0610f46565b1580156103d5576000806103d2610e3b565b50505b505a6103df610f92565b5050505050501580156103ff573d6000803e3d60006103fc610e3b565b50505b50505050604051601f3d908101601f1916820160405261042291908101906110eb565b6104505760405162461bcd60e51b815260040161043e9061139f565b6040518091039061044d610e3b565b50505b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166391695586600160008787876040518663ffffffff1660e01b81526004016104a8959493929190611245565b602060405180830381600087806104bd610f46565b1580156104d2576000806104cf610e3b565b50505b505a6104dc610f92565b50505050505092505050801561050f5750604051601f3d908101601f1916820160405261050c9190810190611124565b60015b6105185761051b565b90505b80610619577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb86866040518363ffffffff1660e01b815260040161056e92919061120d565b60206040518083038160008780610583610f46565b15801561059857600080610595610e3b565b50505b505a6105a2610f92565b5050505050501580156105c2573d6000803e3d60006105bf610e3b565b50505b50505050604051601f3d908101601f191682016040526105e591908101906110eb565b6106135760405162461bcd60e51b815260040161060190611323565b60405180910390610610610e3b565b50505b506108a7565b7f0000000000000000000000000000000000000000000000000000000000000000156107b2577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040161068b91906113d1565b600060405180830381600087806106a0610f46565b1580156106b5576000806106b2610e3b565b50505b505a6106bf610f92565b5050505050501580156106df573d6000803e3d60006106dc610e3b565b50505b506000925050506001600160a01b0386168282604051818152601f19601f830116810160200160405290801561071c576020820181803683370190505b5060405161072a91906111af565b60006040518083038185875a61073e610f92565b505050505050925050503d8060008114610774576040513d603f01601f191681016040523d815291503d6000602084013e610779565b606091505b50509050806107ac5760405162461bcd60e51b815260040161079a906112a7565b604051809103906107a9610e3b565b50505b506108a5565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb86836040518363ffffffff1660e01b815260040161080092919061120d565b60206040518083038160008780610815610f46565b15801561082a57600080610827610e3b565b50505b505a610834610f92565b505050505050158015610854573d6000803e3d6000610851610e3b565b50505b50505050604051601f3d908101601f1916820160405261087791908101906110eb565b6108a55760405162461bcd60e51b815260040161089390611323565b604051809103906108a2610e3b565b50505b505b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b848610156109275760405162461bcd60e51b815260040161091590611356565b60405180910390610924610e3b565b50505b7f000000000000000000000000000000000000000000000000000000000000000015610a2557855a610957610ea6565b146109865760405162461bcd60e51b8152600401610974906112de565b60405180910390610983610e3b565b50505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0876040518263ffffffff1660e01b81526004016000604051808303818588806109dc610f46565b1580156109f1576000806109ee610e3b565b50505b505a6109fb610f92565b505050505050158015610a1b573d6000803e3d6000610a18610e3b565b50505b5050505050610b7a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166323b872dd5a610a5d610f00565b5a63996d79a5598160e01b8152602081600483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051925060005b6040811015610ab357600082820152602001610a9c565b505050896040518463ffffffff1660e01b8152600401610ad5939291906111e9565b60206040518083038160008780610aea610f46565b158015610aff57600080610afc610e3b565b50505b505a610b09610f92565b505050505050158015610b29573d6000803e3d6000610b26610e3b565b50505b50505050604051601f3d908101601f19168201604052610b4c91908101906110eb565b610b7a5760405162461bcd60e51b8152600401610b6890611270565b60405180910390610b77610e3b565b50505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663095ea7b37f0000000000000000000000000000000000000000000000000000000000000000886040518363ffffffff1660e01b8152600401610be892919061120d565b60206040518083038160008780610bfd610f46565b158015610c1257600080610c0f610e3b565b50505b505a610c1c610f92565b505050505050158015610c3c573d6000803e3d6000610c39610e3b565b50505b50505050604051601f3d908101601f19168201604052610c5f91908101906110eb565b610c8d5760405162461bcd60e51b8152600401610c7b9061139f565b60405180910390610c8a610e3b565b50505b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166391695586600060018a89896040518663ffffffff1660e01b8152600401610ce5959493929190611245565b60206040518083038160008780610cfa610f46565b158015610d0f57600080610d0c610e3b565b50505b505a610d19610f92565b505050505050158015610d39573d6000803e3d6000610d36610e3b565b50505b50505050604051601f3d908101601f19168201604052610d5c9190810190611124565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a6bd1b338a8a848a88886040518763ffffffff1660e01b8152600401610db4969594939291906113da565b60006040518083038160008780610dc9610f46565b158015610dde57600080610ddb610e3b565b50505b505a610de8610f92565b505050505050158015610e08573d6000803e3d6000610e05610e3b565b50505b50505050505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b632a2a7adb598160e01b8152600481016020815285602082015260005b86811015610e73578086015182820160400152602001610e58565b506020828760640184336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b505050565b63a8c4c5ec598160e01b8152602081600483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051935060005b6040811015610efb57600082820152602001610ee4565b505050565b6373509064598160e01b8152602081600483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b80516000825293506020610ee4565b638435035b598160e01b8152836004820152602081602483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b80516000825293506020610ee4565b635b99d1c5598160e01b8152610fc5565b8080831115610faf5750815b92915050565b8080831015610faf575090919050565b8360048201528460248201528560448201526080606482015287608482015260a4810160005b89811015611003578089015182820152602001610feb565b506060828a60c40184336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b815160408301513d6000853e8c8c82606087013350600060045af150596110588e3d610fb5565b8d016110648187610fa3565b5b828110156110795760008152602001611065565b50929d50505050505050565b80356001600160a01b03811681146110a5576000806110a2610e3b565b50505b919050565b600080600080608085870312156110c85783846110c5610e3b565b50505b6110d185611085565b966020860135965060408601359560600135945092505050565b600060208284031215611105578081611102610e3b565b50505b8151801515811461111d57818261111a610e3b565b50505b9392505050565b60006020828403121561113e57808161113b610e3b565b50505b81519392505050565b600080600080600080600080610100898b03121561116c578384611169610e3b565b50505b8835975061117c60208a01611085565b979a9799505050506040860135956060810135956080820135955060a0820135945060c0820135935060e0909101359150565b60008251815b818110156111d05760208186010151848201526020016111b5565b818111156111de5782828501525b509190910192915050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6001600160a01b0391909116815260200190565b60ff958616815293909416602084015260408301919091526060820152608081019190915260a00190565b6020808252601d908201527f4c325f414d4d5f573a205472616e7366657246726f6d206661696c6564000000604082015260600190565b6020808252601d908201527f4c325f414d4d5f573a20455448207472616e73666572206661696c6564000000604082015260600190565b60208082526025908201527f4c325f414d4d5f573a2056616c756520646f6573206e6f74206d6174636820616040820152641b5bdd5b9d60da1b606082015260800190565b602080825260199082015278130c97d0535357d5ce88151c985b9cd9995c8819985a5b1959603a1b604082015260600190565b60208082526029908201527f4c325f414d4d5f573a20426f6e646572206665652063616e6e6f742065786365604082015268195908185b5bdd5b9d60ba1b606082015260800190565b602080825260189082015277130c97d0535357d5ce88105c1c1c9bdd994819985a5b195960421b604082015260600190565b90815260200190565b9586526001600160a01b0394909416602086015260408501929092526060840152608083015260a082015260c001905600000000000000000000000083f6244bd87662118d96d9a6d44f09dfff14b30e00000000000000000000000042000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001000000000000000000000000e38faf9040c7f09958c638bbdb977083722c5156000000000000000000000000aa30d6bba6285d0585722e2440ff89e23ef68864

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

00000000000000000000000083f6244bd87662118d96d9a6d44f09dfff14b30e00000000000000000000000042000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001000000000000000000000000e38faf9040c7f09958c638bbdb977083722c5156000000000000000000000000aa30d6bba6285d0585722e2440ff89e23ef68864

-----Decoded View---------------
Arg [0] : _bridge (address): 0x83f6244bd87662118d96d9a6d44f09dfff14b30e
Arg [1] : _l2CanonicalToken (address): 0x4200000000000000000000000000000000000006
Arg [2] : _l2CanonicalTokenIsEth (bool): True
Arg [3] : _hToken (address): 0xe38faf9040c7f09958c638bbdb977083722c5156
Arg [4] : _exchangeAddress (address): 0xaa30d6bba6285d0585722e2440ff89e23ef68864

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000083f6244bd87662118d96d9a6d44f09dfff14b30e
Arg [1] : 0000000000000000000000004200000000000000000000000000000000000006
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [3] : 000000000000000000000000e38faf9040c7f09958c638bbdb977083722c5156
Arg [4] : 000000000000000000000000aa30d6bba6285d0585722e2440ff89e23ef68864


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.