Spend less on fees, more on crypto. Buy crypto easily with MoonPay Balance. 20M+ users trust MoonPay worldwide.
Ready to onboard to Ethereum? With MetaMask Portfolio, you're in control.
Don’t invest unless you’re prepared to lose all the money you invest.
Ready to simplify your web3 experience? Try the all-in-one web3 app trusted by millions worldwide.
Available on 9 networks: Ethereum mainnet, Linea, Polygon, Optimism, BNB Chain, zkSync Era, Base, Avalanche.
Everyday giveaways up to 100 ETH, Lucky Spins. Deposit BONUS 300% and Cashbacks!
5000+ Slots & Live Casino Games, 50+cryptos. Register with Etherscan and get 760% deposit bonus. Win Big$, withdraw it fast.
Slots, Roulette, Poker & more - Proud sponsors of UFC, Everton & StakeF1 team!
5000+ Slots & Live Casino Games, 50+cryptos. Register with Etherscan and get 760% deposit bonus. Win Big$, withdraw it fast.
Anonymous play on awesome games - sign up now for 25 free jackpot spins - worth $100s!
100s of games, generous bonuses, 20+ years of trusted gaming. Join CryptoWins & start winning today!
Overview
ETH Balance
Eth Value
$0.00Token Holdings
Could not find any matches!
- ERC-20 Tokens (>200)0.00371664 xSHIBxShib Staked... (xSHIB)0.00000001 0x00x0 Token (0x0)$0.00@0.00552,529,023.81762158 BabyTrumpBaby Trump T... (BabyTr...)7,393,960.7279389 CENTCenturion In... (CENT)10 CURVECurve Networ... (CURVE)0 DTHDether (DTH)0 EVERMOONEverMoon (EVERMO...)$0.00@0.00010 GRAPGRAP (GRAP)$0.00@0.004.96727817 MWGMETAWHALE GO... (MWG)$5.22@1.051872,287.53972975 OCCTOfficial Cry... (OCCT)0.00003316 PAXGPaxos Gold (PAXG)$0.09@2,634.520 pSAFEMOONpTokens SAFE... (pSAFEM...)$0.00@0.000 RISERise Protoco... (RISE)$0.00@0.01412,836.64732755 RBIFROBO INU (RBIF)0 stETHstETH (stETH)$0.00@3,267.900.0040144 USHIUshi (USHI)$0.00@0.0017,804,365.6304526 ZINUZombie Inu (ZINU)$0.00@0.0010,343,924,268.9065 Reward Token from https://stpepe.siteERC-20: $ st... (Reward...)28,219,622,343.4812 2DERC-20: 2-Di... (2D)97,435.55382039 DAPPERC-20: 360A... (DAPP)5,886,964,180,273.6 AIRFORESTERC-20: AIRF... (AIRFOR...)174.82650524 AKAMARUAkamaru Inu6,535,446.01107738 Animal CrossingERC-20: Anim... (Animal...)176,588.51698615 APPAERC-20: Appa... (APPA)0.88481537 ARCANEERC-20: Arca... (ARCANE)0.02795685 ArchaArchangel52,140,592,783.0264 ARTICUNOERC-20: Arti... (ARTICU...)297,562,476.546747 AsunaInuERC-20: Asun... (AsunaI...)0.855 AXIAv3AXIA TOKEN (axiaprotocol.io)$0.00@0.00185,831,458.52986656 BabyDeFidoERC-20: Baby... (BabyDe...)1,603,615,813.79158 BABYDOGEERC-20: Baby... (BABYDO...)0.00000025 BabyFlokiPupERC-20: Baby... (BabyFl...)24,855,262.4052217 BabyMarioERC-20: Baby... (BabyMa...)3,083,486,741,067.3 BRKIERC-20: Baby... (BRKI)10 BabyShibaERC-20: Baby... (BabySh...)2,255,404.0580691 $BabyAbeERC-20: Baby... ($BabyA...)1,987.89770616 BABYCHADERC-20: Baby... (BABYCH...)30,605.623991 DoDoDoERC-20: Baby... (DoDoDo)593.16921212 BATMANBATMAN200,443,405,724.726 $BBHERC-20: Beav... ($BBH)9,574,425.6622536 Bebop-InuERC-20: Bebo... (Bebop-...)0.00000441 $BOBAERC-20: Boba... ($BOBA)2,487,228.76507062 BTFDERC-20: BTFD (BTFD)100,898.70624514 BUNNYROCKETERC-20: Bunn... (BUNNYR...)10,923.24116714 CBGERC-20: Cobr... (CBG)331,363.90509135 CISLAERC-20: Cryp... (CISLA)0 OGERC-20: Cryp... (OG)27.75030586 CYBERSHIBERC-20: Cybe... (CYBERS...)25,893,487,648.5317 DJBZERC-20: Dadd... (DJBZ)10,047.49733418 DACERC-20: Dege... (DAC)3,179,762.42230261 DIGINUERC-20: Digi... (DIGINU)2,067,540.77887848 DCCERC-20: Doge... (DCC)9,998.6210846 DogeTERC-20: Doge... (DogeT)78,014.63354707 DOSERC-20: Dogs... (DOS)0 DOGZDOGZ$0.00@0.00189,693,351.834539 DoraemonInuERC-20: Dora... (Doraem...)1,345.90329826 DRACERC-20: DRAC... (DRAC)17,111,228,116.0588 ErenYeagerInuERC-20: Eren... (ErenYe...)0 eBanks️️ERC-20: Ethe... (eBanks...)0.00000142 $EMGERC-20: Ethe... ($EMG)10,939,008,604.6918 ETHINUERC-20: ETHI... (ETHINU)12.56771293 FLAREERC-20: FLAR... (FLARE)1,023,368.38437994 FLOKIERC-20: FLOK... (FLOKI)101,912,872,152.091 FLOKIBONEFloki Bone987.47212975 FLOKIMUSKERC-20: Flok... (FLOKIM...)31.90832548 FLOKIRICHERC-20: Flok... (FLOKIR...)100 FLOKIRAIERC-20: FLOK... (FLOKIR...)1.32173098 FortuneERC-20: Fort... (Fortun...)18.71807031 FROGEfroge.finance358,635.95504619 GENGARERC-20: Geng... (GENGAR)0.00000847 GIERC-20: Gens... (GI)8,056.34860251 GHIBLIERC-20: Ghib... (GHIBLI)786.3158565 GhostBladeGhostBlade Inu5,365,019,109.4525 GilGilgamesh82,849.188328 GMinuERC-20: GM I... (GMinu)32,381,766,344.9637 GELONERC-20: Gold... (GELON)4,174,518,578.8403 Gr33n_Dividend_TrackerERC-20: Gr33... (Gr33n_...)0.00000001 GTAERC-20: Gran... (GTA)2,995.77607449 GreenCapERC-20: Gree... (GreenC...)1,300 GRIZERC-20: Griz... (GRIZ)1,620,002,819.60925 GWERC-20: GW (GW)0.00000006 HAPPYERC-20: HAPP... (HAPPY)4,336.50212938 HARUHARU39,724.94454148 HAYHAYFEVER134,311,504.329074 HELLSINGHellsing Inu0 HODLERC-20: HODL (HODL)0 HODLERC-20: HODL (HODL)409.10330199 HONEYBADGERERC-20: Hone... (HONEYB...)8,742.18988369 SONATAERC-20: Hydr... (SONATA)4,127,856.89525071 Ikigai-InuERC-20: Ikig... (Ikigai...)1,436,656,078.28073 IMPACTXPERC-20: Impa... (IMPACT...)11,854,690,453,069.5 IMPImperial Obelisk57,128.27950268 InariInari304.71190557 IRONMANERC-20: IRON... (IRONMA...)0.00000001 ISUPPORTERC-20: ISup... (ISUPPO...)329.70368811 JokerERC-20: Joke... (Joker)32,132,446.5523332 JPAWERC-20: Jpaw... (JPAW)0.00000001 JUVIANERC-20: Juvi... (JUVIAN)0.00087339 K9ERC-20: K9-I... (K9)225.98041413 KabosuERC-20: Kabo... (Kabosu)0 KAERIKaeri$0.00@0.00011,992.47562394 KIBAKiba Inu94,464,417.7587335 SMALLSERC-20: Kill... (SMALLS)393,317.24918017 KILLUAKillua Inu243,190,480,836.576 KOTHERC-20: King... (KOTH)1,888 KFC!ERC-20: King... (KFC!)95,763,587,611.8685 KELONERC-20: Kish... (KELON)0.00000001 KTAMAERC-20: Klee... (KTAMA)0.27394687 KrakenERC-20: Krak... (Kraken)3,720,939 KPETSERC-20: Kryp... (KPETS)4,278,129,219.62756 KPETSKryptoPets27,685,007,153.3013 KUNUKuramaInu3,158,061,202.73631 LadyWojakERC-20: Lady... (LadyWo...)38,901.9520447 lildogeFlokiERC-20: lil ... (lildog...)0.0000133 LordeEdgeERC-20: Lord... (LordeE...)0.00000005 LOSTERC-20: Lost (LOST)0.0000678 LUNAERC-20: Luna... (LUNA)1,245,469,780.70739 MeanMushERC-20: Mean... (MeanMu...)1,159.01523531 MDOGERC-20: Memo... (MDOG)2,269,020,962.54863 MGCHIERC-20: Meta... (MGCHI)993,548,453.81164 SNAKEERC-20: Meta... (SNAKE)5,138,258.12439899 METASTARERC-20: Meta... (METAST...)3.44161822 MetaUniverseERC-20: Meta... (MetaUn...)25,099.42981086 MEWNERC-20: Mewn... (MEWN)1,920,437.28546769 MEWNERC-20: Mewn... (MEWN)0.006 JORDANERC-20: Mich... (JORDAN)6,370,377.5861187 JORDANERC-20: Mich... (JORDAN)92,120.62833316 miniSHIBERC-20: mini... (miniSH...)21,836,764.3581697 MGCERC-20: Mult... (MGC)69,559.10830245 NARUTOERC-20: Naru... (NARUTO)0 NASHNEOWORLD CASH1,316,660 NGPEERC-20: NGP ... (NGPE)1,006,244.17036998 NORMIEERC-20: Norm... (NORMIE)0.00515835 $OGGYERC-20: OGGY... ($OGGY)11.87443878 OHMINUERC-20: Olym... (OHMINU)0.00000423 OptimusERC-20: Opti... (Optimu...)5,166,368,356.47536 OREOERC-20: Oreo... (OREO)55,451.48127815 TEZUKAERC-20: Osam... (TEZUKA)605.98238717 OSOsmos18,463,346,025.4909 PANDAERC-20: Pand... (PANDA)0 P4CParts of Four Coin39,995.86501037 PokemonGoERC-20: Poke... (Pokemo...)0.96346783 PBRPolkaBridge20,842,553,047.2757 PotterInuERC-20: Pott... (Potter...)32.74887912 PNProbably Nothing88,888.88 PROERC-20: ProC... (PRO)2,209,953.33545184 PumpETHERC-20: Pump... (PumpET...)2,209,953.33545184 PumpETH_Dividend_TrackerERC-20: Pump... (PumpET...)4,637.96714837 QSHIBAERC-20: Quee... (QSHIBA)2,864,175,393.58774 RammusERC-20: Ramm... (Rammus)1,098,644.83232597 RatCoinERC-20: RatC... (RatCoi...)317.995421 RFDERC-20: Refl... (RFD)5,623,205,787.28125 RICKMORTYRick And Morty0.00000039 RIPPLEERC-20: Ripp... (RIPPLE)160,128,000,000,000 SUNERC-20: Risi... (SUN)160,128,000,000,000 RisingSun_Dividend_TrackerERC-20: Risi... (Rising...)7,994,810,752,796.39 Robo InuERC-20: Robo... (Robo I...)4,748,523.06627727 ROCKETINUERC-20: Rock... (ROCKET...)0.00000001 SAFUUUERC-20: Safu... (SAFUUU)6,158.43076456 SAITOKISaitoki Inu0.04997166 SAKATAERC-20: SAKA... (SAKATA)0.33557782 SANJIERC-20: Sanj... (SANJI)3,505,288,885,349.48 BONE🦴ERC-20: Shib... (BONE...)834,500.62233707 SHIBALIGHT V2ERC-20: Shib... (SHIBAL...)0.00002838 SHIBTHISERC-20: Shib... (SHIBTH...)2,482,856.00052365 SHIBADOERC-20: Shib... (SHIBAD...)41,225.30986766 $ShibafricaERC-20: Shib... ($Shiba...)81,865.69562247 SMCERC-20: Shib... (SMC)1 SSTERC-20: Shib... (SST)33,777.3429986 $ShibDubaiERC-20: Shib... ($ShibD...)884.31578072 SHIBELONERC-20: shib... (SHIBEL...)1 SHiBGOTCHiSHiBGOTCHi23,465,811.1487963 ShibmericanERC-20: Shib... (Shibme...)0.006546 SHAKISHIBNAKI583,902,188,908,787,000 ShibtoroShibtoro273,962,076.426256 SHIVERC-20: Shib... (SHIV)63,471.23997974 SHIBZERC-20: Shib... (SHIBZ)37,123,103,702,642.7 ShikokuRocketERC-20: Shik... (Shikok...)1,416,256.75172626 SHRERC-20: Shir... (SHR)25,188.77865086 ShiryokiERC-20: Shir... (Shiryo...)0 SHKOOBYSHKOOBY INU4,602,249.3701247 SHOKKYERC-20: SHOK... (SHOKKY)1,227,397,037.09202 Sleepy-ShibERC-20: Slee... (Sleepy...)161,140,390.0283 SMGCATERC-20: SMUD... (SMGCAT)500 SNEKERC-20: Snek (SNEK)27,131.38950366 BallsERC-20: Spac... (Balls)4.13823408 SPELLINUERC-20: Spel... (SPELLI...)1,223.63773953 SQUEEZE TOKENSQUEEZE0.00000014 sushinuERC-20: sush... (sushin...)23,219,188,736.6196 SBJesusSweet Baby Jesus | t.me/SweetBabyJesus_token17,896,271,402.6173 TAILSERC-20: TAIL... (TAILS)0 TNGLERC-20: Tang... (TNGL)0 TNGLv3ERC-20: Tang... (TNGLv3)0.00001255 TaromaruERC-20: Taro... (Taroma...)103,683.30081177 IRSERC-20: Taxe... (IRS)188,886,039.716248 TzxzERC-20: Temp... (Tzxz)0.29115563 TELUERC-20: Terr... (TELU)61ERC20 ***23,285.0477062 TheCitadelERC-20: The ... (TheCit...)36,268,030.9295925 PROGEThe Protector RogeNFT Tokens (20)ether-origin.comether-origin.comERC-1155claim rewards on paxgnetwork.compaxgnetwork.comERC-1155claim rewards on poolstake.netpoolstake.netERC-1155t.me/shibarmy_botShiba Inu Token AirdropERC-1155claim rewards on wsteth.orgwsteth.orgERC-1155Let's Go!🎁ERC-1155Let's Go!🎁ERC-1155ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Spam]
More Info
Private Name Tags
ContractCreator
Multichain Info
6 addresses found via- Transactions
- Internal Transactions
- Token Transfers (ERC-20)
- NFT Transfers
- Contract
- Events
- Analytics
- Multichain Portfolio
- Cards New
Advanced Filter- Filter by Tx Type:
- Tx
- Internal Tx
- ERC-20
- NFTs
Latest 25 from a total of 2,173,421 transactions
Transaction Hash MethodBlockFromToProxied Swap 21461802 2024-12-23 1:06:47 5 hrs ago 1734916007 IN 0 ETH$0.00 0.00172411 5.31497049 Proxied Swap 21461299 2024-12-22 23:25:11 7 hrs ago 1734909911 IN 0 ETH$0.00 0.00166385 5.2850703 Proxied Swap 21460460 2024-12-22 20:35:47 10 hrs ago 1734899747 IN 0 ETH$0.00 0.00254032 8.11366081 Proxied Swap 21460300 2024-12-22 20:03:47 11 hrs ago 1734897827 IN 0 ETH$0.00 0.00259039 8.39953422 Proxied Swap 21454641 2024-12-22 1:05:35 29 hrs ago 1734829535 IN 0 ETH$0.00 0.0019881 6.47493645 Proxied Swap 21454394 2024-12-22 0:15:59 30 hrs ago 1734826559 IN 0 ETH$0.00 0.0029443 9.35200908 Proxied Swap 21453256 2024-12-21 20:25:59 34 hrs ago 1734812759 IN 0 ETH$0.00 0.00313444 7.61112065 Proxied Swap 21451501 2024-12-21 14:32:23 40 hrs ago 1734791543 IN 0 ETH$0.00 0.00368662 11.6395253 Proxied Swap 21451379 2024-12-21 14:07:59 40 hrs ago 1734790079 IN 0 ETH$0.00 0.00449078 11.97444198 Proxied Swap 21451082 2024-12-21 13:08:23 41 hrs ago 1734786503 IN 0 ETH$0.00 0.00300124 9.4759 Proxied Swap 21449101 2024-12-21 6:30:11 2 days ago 1734762611 IN 0 ETH$0.00 0.00246842 8.25638987 Proxied Swap 21448743 2024-12-21 5:17:59 2 days ago 1734758279 IN 0.02294956 ETH$75.21 0.00213134 7.87876934 Proxied Swap 21447746 2024-12-21 1:55:47 2 days ago 1734746147 IN 0 ETH$0.00 0.00301471 9.48478128 Proxied Swap 21446601 2024-12-20 22:04:47 2 days ago 1734732287 IN 0 ETH$0.00 0.00408197 12.96522694 Proxied Swap 21446373 2024-12-20 21:19:11 2 days ago 1734729551 IN 0 ETH$0.00 0.00534731 15.75241692 Proxied Swap 21443012 2024-12-20 10:03:47 2 days ago 1734689027 IN 0 ETH$0.00 0.00496742 21.86528146 Proxied Swap 21440941 2024-12-20 3:07:23 3 days ago 1734664043 IN 0 ETH$0.00 0.00405506 10.5423856 Proxied Swap 21440916 2024-12-20 3:02:23 3 days ago 1734663743 IN 0 ETH$0.00 0.00329883 11.46535517 Proxied Swap 21438374 2024-12-19 18:31:59 3 days ago 1734633119 IN 0 ETH$0.00 0.02969702 98.64349927 Proxied Swap 21435241 2024-12-19 8:01:23 3 days ago 1734595283 IN 0 ETH$0.00 0.00375251 11.69038104 Proxied Swap 21435210 2024-12-19 7:55:11 3 days ago 1734594911 IN 0 ETH$0.00 0.00712738 11.48370458 Proxied Swap 21433635 2024-12-19 2:38:11 4 days ago 1734575891 IN 0 ETH$0.00 0.00811906 25.78709559 Proxied Swap 21433332 2024-12-19 1:36:47 4 days ago 1734572207 IN 0.04126973 ETH$135.24 0.0033623 12.91813668 Proxied Swap 21433164 2024-12-19 1:02:47 4 days ago 1734570167 IN 0 ETH$0.00 0.00562446 14.45457856 Proxied Swap 21432645 2024-12-18 23:18:23 4 days ago 1734563903 IN 0 ETH$0.00 0.00517784 16.46476999 Latest 25 internal transactions (View All)
Advanced mode:Parent Transaction Hash Block FromTo21449101 2024-12-21 6:30:11 2 days ago 1734762611 0.07726007 ETH$253.19 21449101 2024-12-21 6:30:11 2 days ago 1734762611 0.07726007 ETH$253.19 21448743 2024-12-21 5:17:59 2 days ago 1734758279 0.02260532 ETH$74.08 21448743 2024-12-21 5:17:59 2 days ago 1734758279 0.00034424 ETH$1.13 21440916 2024-12-20 3:02:23 3 days ago 1734663743 0.01142195 ETH$37.43 21440916 2024-12-20 3:02:23 3 days ago 1734663743 0.01142195 ETH$37.43 21438374 2024-12-19 18:31:59 3 days ago 1734633119 0.59097331 ETH$1,936.66 21438374 2024-12-19 18:31:59 3 days ago 1734633119 0.59097331 ETH$1,936.66 21433332 2024-12-19 1:36:47 4 days ago 1734572207 0.04065068 ETH$133.22 21433332 2024-12-19 1:36:47 4 days ago 1734572207 0.00061904 ETH$2.03 21431976 2024-12-18 21:03:59 4 days ago 1734555839 0.0020475 ETH$6.71 21431976 2024-12-18 21:03:59 4 days ago 1734555839 0.0020475 ETH$6.71 21430054 2024-12-18 14:36:47 4 days ago 1734532607 0.01971487 ETH$64.61 21430054 2024-12-18 14:36:47 4 days ago 1734532607 0.01971487 ETH$64.61 21425882 2024-12-18 0:36:59 5 days ago 1734482219 1.04131204 ETH$3,412.46 21425882 2024-12-18 0:36:59 5 days ago 1734482219 1.04131204 ETH$3,412.46 21418900 2024-12-17 1:14:35 6 days ago 1734398075 0.01089719 ETH$35.71 21418900 2024-12-17 1:14:35 6 days ago 1734398075 0.01089719 ETH$35.71 21415933 2024-12-16 15:19:35 6 days ago 1734362375 0.00049942 ETH$1.64 21415933 2024-12-16 15:19:35 6 days ago 1734362375 0.0000076 ETH$0.02 21415062 2024-12-16 12:24:59 6 days ago 1734351899 0.17512691 ETH$573.90 21415062 2024-12-16 12:24:59 6 days ago 1734351899 0.17512691 ETH$573.90 21415025 2024-12-16 12:17:35 6 days ago 1734351455 0.03216125 ETH$105.39 21415025 2024-12-16 12:17:35 6 days ago 1734351455 0.00048976 ETH$1.60 21413442 2024-12-16 6:59:23 7 days ago 1734332363 0.02458472 ETH$80.57 Loading...LoadingContract Name:ZeroExProxy
Compiler Versionv0.6.12+commit.27d51765
Optimization Enabled:Yes with 1000000 runs
Other Settings:default evmVersionContract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "./IZeroEx.sol"; import "@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol"; import "@0x/contracts-zero-ex/contracts/src/errors/LibProxyRichErrors.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /// @title Coinbase proxy contract for 0x proxy /// @dev A generic proxy contract which extracts a fee before delegation contract ZeroExProxy is Ownable { using LibBytesV06 for bytes; using SafeERC20 for IERC20; using SafeMath for uint256; address private constant _ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; address private constant _NULL_ADDRESS = 0x0000000000000000000000000000000000000000; address payable private _beneficiary; address payable private _allowanceTarget; IZeroEx private _zeroEx; mapping(bytes4 => address) private _implementationOverrides; event BeneficiaryChanged(address indexed beneficiary); event ImplementationOverrideSet(bytes4 indexed signature, address indexed implementation); event AllowanceTargetChanged(address indexed allowanceTarget); event ZeroExChanged(address indexed zeroEx); /// @dev Construct this contract and specify a fee beneficiary, 0x proxy contract address, and allowance target constructor( IZeroEx zeroEx, address payable allowanceTarget, address payable beneficiary ) public { _zeroEx = zeroEx; _allowanceTarget = allowanceTarget; _beneficiary = beneficiary; } /// @dev Fallback for just receiving ether. receive() external payable {} /// @dev Delegates calls to the specified implementation contract and extracts a fee based on provided arguments /// @param msgData The byte data representing a swap using the original ZeroEx contract. This is either recieved from the 0x API directly or we construct it in order to perform a Uniswap trade /// @param feeToken The ERC20 we wish to extract a user fee from. If this is ETH it should be the standard 0xeee ETH address /// @param fee Fee amount collected and sent to the beneficiary function optimalSwap( bytes calldata msgData, address feeToken, uint256 fee ) external payable returns (bytes memory) { _payFees(feeToken, fee); bytes4 signature = msgData.readBytes4(0); address target = getFunctionImplementation(signature); if (target == address(0)) { _revertWithData(LibProxyRichErrors.NotImplementedError(signature)); } (bool success, bytes memory resultData) = target.delegatecall(msgData); if (!success) { _revertWithData(resultData); } _returnWithData(resultData); } /// @dev Forwards calls to the zeroEx contract and extracts a fee based on provided arguments /// @param msgData The byte data representing a swap using the original ZeroEx contract. This is either recieved from the 0x API directly or we construct it in order to perform a Uniswap trade /// @param feeToken The ERC20 we wish to extract a user fee from. If this is ETH it should be the standard 0xeee ETH address /// @param inputToken The ERC20 the user is selling. If this is ETH it should be the standard 0xeee ETH address /// @param inputAmount The amount of _inputToken being sold /// @param outputToken The ERC20 the user is buying. If this is ETH it should be the standard 0xeee ETH address /// @param fee Fee amount collected and sent to the beneficiary function proxiedSwap( bytes calldata msgData, address feeToken, address inputToken, uint256 inputAmount, address outputToken, uint256 fee ) external payable returns (bytes memory) { _payFees(feeToken, fee); uint256 value = 0; if (inputToken == _ETH_ADDRESS) { if (feeToken == _ETH_ADDRESS) { require(msg.value == inputAmount.add(fee),"Insufficient value with fee"); } else { require(msg.value == inputAmount, "Insufficient value"); } value = inputAmount; } else { _sendERC20(IERC20(inputToken), msg.sender, address(this), inputAmount); uint256 allowedAmount = IERC20(inputToken).allowance(address(this), _allowanceTarget); if (allowedAmount < inputAmount) { IERC20(inputToken).safeIncreaseAllowance(_allowanceTarget, inputAmount.sub(allowedAmount)); } } (bool success, bytes memory resultData) = address(_zeroEx).call{value: value}(msgData); if (!success) { _revertWithData(resultData); } if (outputToken == _ETH_ADDRESS) { if (address(this).balance > 0) { _sendETH(msg.sender, address(this).balance); } else { _revertWithData(resultData); } } else { uint256 tokenBalance = IERC20(outputToken).balanceOf(address(this)); if (tokenBalance > 0) { IERC20(outputToken).safeTransfer(msg.sender, tokenBalance); } else { _revertWithData(resultData); } } _returnWithData(resultData); } /// @dev Set a new 0x proxy contract address /// @param newZeroEx New 0x proxy address function setZeroEx(IZeroEx newZeroEx) public onlyOwner{ require(address(newZeroEx) != _NULL_ADDRESS, "Invalid zeroEx address"); _zeroEx = newZeroEx; emit ZeroExChanged(address(_zeroEx)); } /// @dev Set a new new allowance target address /// @param newAllowanceTarget New allowance target address function setAllowanceTarget(address payable newAllowanceTarget) public onlyOwner { require(newAllowanceTarget != _NULL_ADDRESS, "Invalid allowance target"); _allowanceTarget = newAllowanceTarget; emit AllowanceTargetChanged(_allowanceTarget); } /// @dev Set a new beneficiary address /// @param beneficiary New beneficiary target address function setBeneficiary(address payable beneficiary) public onlyOwner { require(beneficiary != _NULL_ADDRESS, "Invalid beneficiary"); _beneficiary = beneficiary; emit BeneficiaryChanged(_beneficiary); } /// @dev Set a custom implementation feature /// @param signature function signature /// @param implementation address of the custom feature function setImplementationOverride(bytes4 signature, address implementation) public onlyOwner { _implementationOverrides[signature] = implementation; emit ImplementationOverrideSet(signature, implementation); } /// @dev Get function implementation address based on signature /// @param signature function signature /// @return impl address of implementation function getFunctionImplementation(bytes4 signature) public returns (address impl) { impl = _implementationOverrides[signature]; if (impl == _NULL_ADDRESS) { impl = _zeroEx.getFunctionImplementation(signature); } } function getBeneficiary() public view returns(address) { return _beneficiary; } function getAllowanceTarget() public view returns(address){ return _allowanceTarget; } function getZeroEx() public view returns(IZeroEx) { return _zeroEx; } /// @dev Pay fee to beneficiary /// @param token token address to pay fee in, can be ETH /// @param amount fee amount to pay function _payFees(address token, uint256 amount) private { if (token == _ETH_ADDRESS) { return _sendETH(_beneficiary, amount); } return _sendERC20(IERC20(token), msg.sender, _beneficiary, amount); } function _sendETH(address payable toAddress, uint256 amount) private { if (amount > 0) { (bool success,) = toAddress.call{ value: amount }(""); require(success, "Unable to send ETH"); } } function _sendERC20(IERC20 token, address fromAddress, address toAddress, uint256 amount) private { if (amount > 0) { token.safeTransferFrom(fromAddress, toAddress, amount); } } /// @dev Revert with arbitrary bytes. /// @param data Revert data. function _revertWithData(bytes memory data) private pure { assembly { revert(add(data, 32), mload(data)) } } /// @dev Return with arbitrary bytes. /// @param data Return data. function _returnWithData(bytes memory data) private pure { assembly { return(add(data, 32), mload(data)) } } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.6.12; interface IZeroEx { function getFunctionImplementation(bytes4 _signature) external returns (address); }
// SPDX-License-Identifier: Apache-2.0 /* Copyright 2020 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity ^0.6.5; import "./errors/LibBytesRichErrorsV06.sol"; import "./errors/LibRichErrorsV06.sol"; library LibBytesV06 { using LibBytesV06 for bytes; /// @dev Gets the memory address for a byte array. /// @param input Byte array to lookup. /// @return memoryAddress Memory address of byte array. This /// points to the header of the byte array which contains /// the length. function rawAddress(bytes memory input) internal pure returns (uint256 memoryAddress) { assembly { memoryAddress := input } return memoryAddress; } /// @dev Gets the memory address for the contents of a byte array. /// @param input Byte array to lookup. /// @return memoryAddress Memory address of the contents of the byte array. function contentAddress(bytes memory input) internal pure returns (uint256 memoryAddress) { assembly { memoryAddress := add(input, 32) } return memoryAddress; } /// @dev Copies `length` bytes from memory location `source` to `dest`. /// @param dest memory address to copy bytes to. /// @param source memory address to copy bytes from. /// @param length number of bytes to copy. function memCopy( uint256 dest, uint256 source, uint256 length ) internal pure { if (length < 32) { // Handle a partial word by reading destination and masking // off the bits we are interested in. // This correctly handles overlap, zero lengths and source == dest assembly { let mask := sub(exp(256, sub(32, length)), 1) let s := and(mload(source), not(mask)) let d := and(mload(dest), mask) mstore(dest, or(s, d)) } } else { // Skip the O(length) loop when source == dest. if (source == dest) { return; } // For large copies we copy whole words at a time. The final // word is aligned to the end of the range (instead of after the // previous) to handle partial words. So a copy will look like this: // // #### // #### // #### // #### // // We handle overlap in the source and destination range by // changing the copying direction. This prevents us from // overwriting parts of source that we still need to copy. // // This correctly handles source == dest // if (source > dest) { assembly { // We subtract 32 from `sEnd` and `dEnd` because it // is easier to compare with in the loop, and these // are also the addresses we need for copying the // last bytes. length := sub(length, 32) let sEnd := add(source, length) let dEnd := add(dest, length) // Remember the last 32 bytes of source // This needs to be done here and not after the loop // because we may have overwritten the last bytes in // source already due to overlap. let last := mload(sEnd) // Copy whole words front to back // Note: the first check is always true, // this could have been a do-while loop. // solhint-disable-next-line no-empty-blocks for {} lt(source, sEnd) {} { mstore(dest, mload(source)) source := add(source, 32) dest := add(dest, 32) } // Write the last 32 bytes mstore(dEnd, last) } } else { assembly { // We subtract 32 from `sEnd` and `dEnd` because those // are the starting points when copying a word at the end. length := sub(length, 32) let sEnd := add(source, length) let dEnd := add(dest, length) // Remember the first 32 bytes of source // This needs to be done here and not after the loop // because we may have overwritten the first bytes in // source already due to overlap. let first := mload(source) // Copy whole words back to front // We use a signed comparisson here to allow dEnd to become // negative (happens when source and dest < 32). Valid // addresses in local memory will never be larger than // 2**255, so they can be safely re-interpreted as signed. // Note: the first check is always true, // this could have been a do-while loop. // solhint-disable-next-line no-empty-blocks for {} slt(dest, dEnd) {} { mstore(dEnd, mload(sEnd)) sEnd := sub(sEnd, 32) dEnd := sub(dEnd, 32) } // Write the first 32 bytes mstore(dest, first) } } } } /// @dev Returns a slices from a byte array. /// @param b The byte array to take a slice from. /// @param from The starting index for the slice (inclusive). /// @param to The final index for the slice (exclusive). /// @return result The slice containing bytes at indices [from, to) function slice( bytes memory b, uint256 from, uint256 to ) internal pure returns (bytes memory result) { // Ensure that the from and to positions are valid positions for a slice within // the byte array that is being used. if (from > to) { LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError( LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.FromLessThanOrEqualsToRequired, from, to )); } if (to > b.length) { LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError( LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.ToLessThanOrEqualsLengthRequired, to, b.length )); } // Create a new bytes structure and copy contents result = new bytes(to - from); memCopy( result.contentAddress(), b.contentAddress() + from, result.length ); return result; } /// @dev Returns a slice from a byte array without preserving the input. /// When `from == 0`, the original array will match the slice. /// In other cases its state will be corrupted. /// @param b The byte array to take a slice from. Will be destroyed in the process. /// @param from The starting index for the slice (inclusive). /// @param to The final index for the slice (exclusive). /// @return result The slice containing bytes at indices [from, to) function sliceDestructive( bytes memory b, uint256 from, uint256 to ) internal pure returns (bytes memory result) { // Ensure that the from and to positions are valid positions for a slice within // the byte array that is being used. if (from > to) { LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError( LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.FromLessThanOrEqualsToRequired, from, to )); } if (to > b.length) { LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError( LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.ToLessThanOrEqualsLengthRequired, to, b.length )); } // Create a new bytes structure around [from, to) in-place. assembly { result := add(b, from) mstore(result, sub(to, from)) } return result; } /// @dev Pops the last byte off of a byte array by modifying its length. /// @param b Byte array that will be modified. /// @return result The byte that was popped off. function popLastByte(bytes memory b) internal pure returns (bytes1 result) { if (b.length == 0) { LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError( LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanZeroRequired, b.length, 0 )); } // Store last byte. result = b[b.length - 1]; assembly { // Decrement length of byte array. let newLen := sub(mload(b), 1) mstore(b, newLen) } return result; } /// @dev Tests equality of two byte arrays. /// @param lhs First byte array to compare. /// @param rhs Second byte array to compare. /// @return equal True if arrays are the same. False otherwise. function equals( bytes memory lhs, bytes memory rhs ) internal pure returns (bool equal) { // Keccak gas cost is 30 + numWords * 6. This is a cheap way to compare. // We early exit on unequal lengths, but keccak would also correctly // handle this. return lhs.length == rhs.length && keccak256(lhs) == keccak256(rhs); } /// @dev Reads an address from a position in a byte array. /// @param b Byte array containing an address. /// @param index Index in byte array of address. /// @return result address from byte array. function readAddress( bytes memory b, uint256 index ) internal pure returns (address result) { if (b.length < index + 20) { LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError( LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsTwentyRequired, b.length, index + 20 // 20 is length of address )); } // Add offset to index: // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index) // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index) index += 20; // Read address from array memory assembly { // 1. Add index to address of bytes array // 2. Load 32-byte word from memory // 3. Apply 20-byte mask to obtain address result := and(mload(add(b, index)), 0xffffffffffffffffffffffffffffffffffffffff) } return result; } /// @dev Writes an address into a specific position in a byte array. /// @param b Byte array to insert address into. /// @param index Index in byte array of address. /// @param input Address to put into byte array. function writeAddress( bytes memory b, uint256 index, address input ) internal pure { if (b.length < index + 20) { LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError( LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsTwentyRequired, b.length, index + 20 // 20 is length of address )); } // Add offset to index: // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index) // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index) index += 20; // Store address into array memory assembly { // The address occupies 20 bytes and mstore stores 32 bytes. // First fetch the 32-byte word where we'll be storing the address, then // apply a mask so we have only the bytes in the word that the address will not occupy. // Then combine these bytes with the address and store the 32 bytes back to memory with mstore. // 1. Add index to address of bytes array // 2. Load 32-byte word from memory // 3. Apply 12-byte mask to obtain extra bytes occupying word of memory where we'll store the address let neighbors := and( mload(add(b, index)), 0xffffffffffffffffffffffff0000000000000000000000000000000000000000 ) // Make sure input address is clean. // (Solidity does not guarantee this) input := and(input, 0xffffffffffffffffffffffffffffffffffffffff) // Store the neighbors and address into memory mstore(add(b, index), xor(input, neighbors)) } } /// @dev Reads a bytes32 value from a position in a byte array. /// @param b Byte array containing a bytes32 value. /// @param index Index in byte array of bytes32 value. /// @return result bytes32 value from byte array. function readBytes32( bytes memory b, uint256 index ) internal pure returns (bytes32 result) { if (b.length < index + 32) { LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError( LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsThirtyTwoRequired, b.length, index + 32 )); } // Arrays are prefixed by a 256 bit length parameter index += 32; // Read the bytes32 from array memory assembly { result := mload(add(b, index)) } return result; } /// @dev Writes a bytes32 into a specific position in a byte array. /// @param b Byte array to insert <input> into. /// @param index Index in byte array of <input>. /// @param input bytes32 to put into byte array. function writeBytes32( bytes memory b, uint256 index, bytes32 input ) internal pure { if (b.length < index + 32) { LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError( LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsThirtyTwoRequired, b.length, index + 32 )); } // Arrays are prefixed by a 256 bit length parameter index += 32; // Read the bytes32 from array memory assembly { mstore(add(b, index), input) } } /// @dev Reads a uint256 value from a position in a byte array. /// @param b Byte array containing a uint256 value. /// @param index Index in byte array of uint256 value. /// @return result uint256 value from byte array. function readUint256( bytes memory b, uint256 index ) internal pure returns (uint256 result) { result = uint256(readBytes32(b, index)); return result; } /// @dev Writes a uint256 into a specific position in a byte array. /// @param b Byte array to insert <input> into. /// @param index Index in byte array of <input>. /// @param input uint256 to put into byte array. function writeUint256( bytes memory b, uint256 index, uint256 input ) internal pure { writeBytes32(b, index, bytes32(input)); } /// @dev Reads an unpadded bytes4 value from a position in a byte array. /// @param b Byte array containing a bytes4 value. /// @param index Index in byte array of bytes4 value. /// @return result bytes4 value from byte array. function readBytes4( bytes memory b, uint256 index ) internal pure returns (bytes4 result) { if (b.length < index + 4) { LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError( LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsFourRequired, b.length, index + 4 )); } // Arrays are prefixed by a 32 byte length field index += 32; // Read the bytes4 from array memory assembly { result := mload(add(b, index)) // Solidity does not require us to clean the trailing bytes. // We do it anyway result := and(result, 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000) } return result; } /// @dev Writes a new length to a byte array. /// Decreasing length will lead to removing the corresponding lower order bytes from the byte array. /// Increasing length may lead to appending adjacent in-memory bytes to the end of the byte array. /// @param b Bytes array to write new length to. /// @param length New length of byte array. function writeLength(bytes memory b, uint256 length) internal pure { assembly { mstore(b, length) } } }
// SPDX-License-Identifier: Apache-2.0 /* Copyright 2020 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity ^0.6.5; library LibBytesRichErrorsV06 { enum InvalidByteOperationErrorCodes { FromLessThanOrEqualsToRequired, ToLessThanOrEqualsLengthRequired, LengthGreaterThanZeroRequired, LengthGreaterThanOrEqualsFourRequired, LengthGreaterThanOrEqualsTwentyRequired, LengthGreaterThanOrEqualsThirtyTwoRequired, LengthGreaterThanOrEqualsNestedBytesLengthRequired, DestinationLengthGreaterThanOrEqualSourceLengthRequired } // bytes4(keccak256("InvalidByteOperationError(uint8,uint256,uint256)")) bytes4 internal constant INVALID_BYTE_OPERATION_ERROR_SELECTOR = 0x28006595; // solhint-disable func-name-mixedcase function InvalidByteOperationError( InvalidByteOperationErrorCodes errorCode, uint256 offset, uint256 required ) internal pure returns (bytes memory) { return abi.encodeWithSelector( INVALID_BYTE_OPERATION_ERROR_SELECTOR, errorCode, offset, required ); } }
// SPDX-License-Identifier: Apache-2.0 /* Copyright 2020 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity ^0.6.5; library LibRichErrorsV06 { // bytes4(keccak256("Error(string)")) bytes4 internal constant STANDARD_ERROR_SELECTOR = 0x08c379a0; // solhint-disable func-name-mixedcase /// @dev ABI encode a standard, string revert error payload. /// This is the same payload that would be included by a `revert(string)` /// solidity statement. It has the function signature `Error(string)`. /// @param message The error string. /// @return The ABI encoded error. function StandardError(string memory message) internal pure returns (bytes memory) { return abi.encodeWithSelector( STANDARD_ERROR_SELECTOR, bytes(message) ); } // solhint-enable func-name-mixedcase /// @dev Reverts an encoded rich revert reason `errorData`. /// @param errorData ABI encoded error data. function rrevert(bytes memory errorData) internal pure { assembly { revert(add(errorData, 0x20), mload(errorData)) } } }
// SPDX-License-Identifier: Apache-2.0 /* Copyright 2020 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity ^0.6.5; library LibProxyRichErrors { // solhint-disable func-name-mixedcase function NotImplementedError(bytes4 selector) internal pure returns (bytes memory) { return abi.encodeWithSelector( bytes4(keccak256("NotImplementedError(bytes4)")), selector ); } function InvalidBootstrapCallerError(address actual, address expected) internal pure returns (bytes memory) { return abi.encodeWithSelector( bytes4(keccak256("InvalidBootstrapCallerError(address,address)")), actual, expected ); } function InvalidDieCallerError(address actual, address expected) internal pure returns (bytes memory) { return abi.encodeWithSelector( bytes4(keccak256("InvalidDieCallerError(address,address)")), actual, expected ); } function BootstrapCallFailedError(address target, bytes memory resultData) internal pure returns (bytes memory) { return abi.encodeWithSelector( bytes4(keccak256("BootstrapCallFailedError(address,bytes)")), target, resultData ); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// 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); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.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 SafeMath for uint256; 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' // solhint-disable-next-line max-line-length 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).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _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 // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 1000000 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
[{"inputs":[{"internalType":"contract IZeroEx","name":"zeroEx","type":"address"},{"internalType":"address payable","name":"allowanceTarget","type":"address"},{"internalType":"address payable","name":"beneficiary","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"allowanceTarget","type":"address"}],"name":"AllowanceTargetChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"}],"name":"BeneficiaryChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"signature","type":"bytes4"},{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"ImplementationOverrideSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"zeroEx","type":"address"}],"name":"ZeroExChanged","type":"event"},{"inputs":[],"name":"getAllowanceTarget","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBeneficiary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"signature","type":"bytes4"}],"name":"getFunctionImplementation","outputs":[{"internalType":"address","name":"impl","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getZeroEx","outputs":[{"internalType":"contract IZeroEx","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"msgData","type":"bytes"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"optimalSwap","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"msgData","type":"bytes"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"address","name":"inputToken","type":"address"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"internalType":"address","name":"outputToken","type":"address"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"proxiedSwap","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newAllowanceTarget","type":"address"}],"name":"setAllowanceTarget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"beneficiary","type":"address"}],"name":"setBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"signature","type":"bytes4"},{"internalType":"address","name":"implementation","type":"address"}],"name":"setImplementationOverride","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IZeroEx","name":"newZeroEx","type":"address"}],"name":"setZeroEx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162001f9438038062001f948339810160408190526200003491620000d1565b600062000040620000cd565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600380546001600160a01b039485166001600160a01b0319918216179091556002805493851693821693909317909255600180549190931691161790556200013d565b3390565b600080600060608486031215620000e6578283fd5b8351620000f38162000124565b6020850151909350620001068162000124565b6040850151909250620001198162000124565b809150509250925092565b6001600160a01b03811681146200013a57600080fd5b50565b611e47806200014d6000396000f3fe6080604052600436106100d65760003560e01c8063972fdd261161007f578063f7c3a33b11610059578063f7c3a33b146101ee578063f914382614610203578063fdf03fa114610223578063fe53d0b614610243576100dd565b8063972fdd2614610199578063b6016b77146101b9578063f2fde38b146101ce576100dd565b8063715018a6116100b0578063715018a61461014f5780638a14c759146101645780638da5cb5b14610184576100dd565b80631c31f710146100e2578063565a2e2c146101045780635cf540261461012f576100dd565b366100dd57005b600080fd5b3480156100ee57600080fd5b506101026100fd366004611730565b610256565b005b34801561011057600080fd5b50610119610394565b6040516101269190611956565b60405180910390f35b61014261013d3660046117dc565b6103b0565b6040516101269190611a22565b34801561015b57600080fd5b50610102610785565b34801561017057600080fd5b5061010261017f366004611730565b610867565b34801561019057600080fd5b5061011961099c565b3480156101a557600080fd5b506101196101b4366004611788565b6109b8565b3480156101c557600080fd5b50610119610ab5565b3480156101da57600080fd5b506101026101e9366004611730565b610ad1565b3480156101fa57600080fd5b50610119610c1e565b34801561020f57600080fd5b5061010261021e366004611730565b610c3a565b34801561022f57600080fd5b5061010261023e3660046117a4565b610d6f565b61014261025136600461186a565b610e81565b61025e610fa1565b73ffffffffffffffffffffffffffffffffffffffff1661027c61099c565b73ffffffffffffffffffffffffffffffffffffffff16146102d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c24565b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811661031f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611bed565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907f373c72efabe4ef3e552ff77838be729f3bc3d8c586df0012902d1baa2377fa1d90600090a250565b60015473ffffffffffffffffffffffffffffffffffffffff1690565b60606103bc8683610fa5565b600073ffffffffffffffffffffffffffffffffffffffff861673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156104a95773ffffffffffffffffffffffffffffffffffffffff871673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156104695761042c858461102a565b3414610464576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611cfe565b6104a2565b8434146104a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c59565b50836105b2565b6104b586333088611070565b6002546040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff808a169263dd62ed3e92610511923092911690600401611977565b60206040518083038186803b15801561052957600080fd5b505afa15801561053d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056191906118c5565b9050858110156105b0576002546105b09073ffffffffffffffffffffffffffffffffffffffff16610592888461109e565b73ffffffffffffffffffffffffffffffffffffffff8a1691906110e0565b505b60035460405160009160609173ffffffffffffffffffffffffffffffffffffffff9091169084906105e6908e908e90611927565b60006040518083038185875af1925050503d8060008114610623576040519150601f19603f3d011682016040523d82523d6000602084013e610628565b606091505b50915091508161063b5761063b8161121a565b73ffffffffffffffffffffffffffffffffffffffff861673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156106905747156106825761067d3347611222565b61068b565b61068b8161121a565b61076e565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8816906370a08231906106e5903090600401611956565b60206040518083038186803b1580156106fd57600080fd5b505afa158015610711573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073591906118c5565b905080156107635761075e73ffffffffffffffffffffffffffffffffffffffff881633836112d0565b61076c565b61076c8261121a565b505b610777816112ef565b505050979650505050505050565b61078d610fa1565b73ffffffffffffffffffffffffffffffffffffffff166107ab61099c565b73ffffffffffffffffffffffffffffffffffffffff16146107f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c24565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b61086f610fa1565b73ffffffffffffffffffffffffffffffffffffffff1661088d61099c565b73ffffffffffffffffffffffffffffffffffffffff16146108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c24565b73ffffffffffffffffffffffffffffffffffffffff8116610927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611bb6565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907f12de7cdcfa92c9e2744861bffda63417a4bc29e3c916f0d3e9655d684cc7acc690600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1680610ab0576003546040517f972fdd2600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063972fdd2690610a5b9085906004016119f5565b602060405180830381600087803b158015610a7557600080fd5b505af1158015610a89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aad919061174c565b90505b919050565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b610ad9610fa1565b73ffffffffffffffffffffffffffffffffffffffff16610af761099c565b73ffffffffffffffffffffffffffffffffffffffff1614610b44576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c24565b73ffffffffffffffffffffffffffffffffffffffff8116610b91576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611a57565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60025473ffffffffffffffffffffffffffffffffffffffff1690565b610c42610fa1565b73ffffffffffffffffffffffffffffffffffffffff16610c6061099c565b73ffffffffffffffffffffffffffffffffffffffff1614610cad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c24565b73ffffffffffffffffffffffffffffffffffffffff8116610cfa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611cc7565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907f058ec768b4d987625b47f998642d52a1ef938ff8445348c5653a5a7c15c9d79290600090a250565b610d77610fa1565b73ffffffffffffffffffffffffffffffffffffffff16610d9561099c565b73ffffffffffffffffffffffffffffffffffffffff1614610de2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c24565b7fffffffff00000000000000000000000000000000000000000000000000000000821660008181526004602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590519092917fc161c67ca327eadedf1f0825c92841b42fcc2127c83d52d8849770c997f9962091a35050565b6060610e8d8383610fa5565b6000610ed3600087878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506112f79050565b90506000610ee0826109b8565b905073ffffffffffffffffffffffffffffffffffffffff8116610f0e57610f0e610f0983611343565b61121a565b600060608273ffffffffffffffffffffffffffffffffffffffff168989604051610f39929190611927565b600060405180830381855af49150503d8060008114610f74576040519150601f19603f3d011682016040523d82523d6000602084013e610f79565b606091505b509150915081610f8c57610f8c8161121a565b610f95816112ef565b50505050949350505050565b3390565b73ffffffffffffffffffffffffffffffffffffffff821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610fff57600154610ffa9073ffffffffffffffffffffffffffffffffffffffff1682611222565b611026565b600154611026908390339073ffffffffffffffffffffffffffffffffffffffff1684611070565b5050565b600082820183811015611069576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611ab4565b9392505050565b80156110985761109873ffffffffffffffffffffffffffffffffffffffff85168484846113fb565b50505050565b6000828211156110da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611b22565b50900390565b6000611177828573ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30876040518363ffffffff1660e01b8152600401611121929190611977565b60206040518083038186803b15801561113957600080fd5b505afa15801561114d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117191906118c5565b9061102a565b90506110988463095ea7b360e01b85846040516024016111989291906119cf565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261141c565b805160208201fd5b80156110265760008273ffffffffffffffffffffffffffffffffffffffff168260405161124e90611953565b60006040518083038185875af1925050503d806000811461128b576040519150601f19603f3d011682016040523d82523d6000602084013e611290565b606091505b50509050806112cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611aeb565b505050565b6112cb8363a9059cbb60e01b84846040516024016111989291906119cf565b805160208201f35b6000816004018351101561131857611318610f0960038551856004016114d2565b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b60607f734e6e1c6ec3f883cac8d13d3e7390b280f5e94424662aa29e27394ed56586c98260405160240161137791906119f5565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b611098846323b872dd60e01b8585856040516024016111989392919061199e565b606061147e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166115779092919063ffffffff16565b8051909150156112cb578080602001905181019061149c9190611768565b6112cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611d35565b6060632800659560e01b8484846040516024016114f193929190611a35565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b6060611586848460008561158e565b949350505050565b6060824710156115ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611b59565b6115d385611690565b611609576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c90565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516116339190611937565b60006040518083038185875af1925050503d8060008114611670576040519150601f19603f3d011682016040523d82523d6000602084013e611675565b606091505b5091509150611685828286611696565b979650505050505050565b3b151590565b606083156116a5575081611069565b8251156116b55782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c99190611a22565b60008083601f8401126116fa578182fd5b50813567ffffffffffffffff811115611711578182fd5b60208301915083602082850101111561172957600080fd5b9250929050565b600060208284031215611741578081fd5b813561106981611dbe565b60006020828403121561175d578081fd5b815161106981611dbe565b600060208284031215611779578081fd5b81518015158114611069578182fd5b600060208284031215611799578081fd5b813561106981611de3565b600080604083850312156117b6578081fd5b82356117c181611de3565b915060208301356117d181611dbe565b809150509250929050565b600080600080600080600060c0888a0312156117f6578283fd5b873567ffffffffffffffff81111561180c578384fd5b6118188a828b016116e9565b909850965050602088013561182c81611dbe565b9450604088013561183c81611dbe565b935060608801359250608088013561185381611dbe565b8092505060a0880135905092959891949750929550565b6000806000806060858703121561187f578384fd5b843567ffffffffffffffff811115611895578485fd5b6118a1878288016116e9565b90955093505060208501356118b581611dbe565b9396929550929360400135925050565b6000602082840312156118d6578081fd5b5051919050565b600081518084526118f5816020860160208601611d92565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000828483379101908152919050565b60008251611949818460208701611d92565b9190910192915050565b90565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b60006020825261106960208301846118dd565b6060810160088510611a4357fe5b938152602081019290925260409091015290565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526012908201527f556e61626c6520746f2073656e64204554480000000000000000000000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f496e76616c696420616c6c6f77616e6365207461726765740000000000000000604082015260600190565b60208082526013908201527f496e76616c69642062656e656669636961727900000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526012908201527f496e73756666696369656e742076616c75650000000000000000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526016908201527f496e76616c6964207a65726f4578206164647265737300000000000000000000604082015260600190565b6020808252601b908201527f496e73756666696369656e742076616c75652077697468206665650000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60005b83811015611dad578181015183820152602001611d95565b838111156110985750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114611de057600080fd5b50565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611de057600080fdfea2646970667358221220e24ba699b82fd36a6b276a74ab3c053b0ee2eba9d7c6ed3356fe2c9bc404d07864736f6c634300060c0033000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000382ffce2287252f930e1c8dc9328dac5bf282ba1Deployed Bytecode
0x6080604052600436106100d65760003560e01c8063972fdd261161007f578063f7c3a33b11610059578063f7c3a33b146101ee578063f914382614610203578063fdf03fa114610223578063fe53d0b614610243576100dd565b8063972fdd2614610199578063b6016b77146101b9578063f2fde38b146101ce576100dd565b8063715018a6116100b0578063715018a61461014f5780638a14c759146101645780638da5cb5b14610184576100dd565b80631c31f710146100e2578063565a2e2c146101045780635cf540261461012f576100dd565b366100dd57005b600080fd5b3480156100ee57600080fd5b506101026100fd366004611730565b610256565b005b34801561011057600080fd5b50610119610394565b6040516101269190611956565b60405180910390f35b61014261013d3660046117dc565b6103b0565b6040516101269190611a22565b34801561015b57600080fd5b50610102610785565b34801561017057600080fd5b5061010261017f366004611730565b610867565b34801561019057600080fd5b5061011961099c565b3480156101a557600080fd5b506101196101b4366004611788565b6109b8565b3480156101c557600080fd5b50610119610ab5565b3480156101da57600080fd5b506101026101e9366004611730565b610ad1565b3480156101fa57600080fd5b50610119610c1e565b34801561020f57600080fd5b5061010261021e366004611730565b610c3a565b34801561022f57600080fd5b5061010261023e3660046117a4565b610d6f565b61014261025136600461186a565b610e81565b61025e610fa1565b73ffffffffffffffffffffffffffffffffffffffff1661027c61099c565b73ffffffffffffffffffffffffffffffffffffffff16146102d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c24565b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811661031f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611bed565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907f373c72efabe4ef3e552ff77838be729f3bc3d8c586df0012902d1baa2377fa1d90600090a250565b60015473ffffffffffffffffffffffffffffffffffffffff1690565b60606103bc8683610fa5565b600073ffffffffffffffffffffffffffffffffffffffff861673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156104a95773ffffffffffffffffffffffffffffffffffffffff871673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156104695761042c858461102a565b3414610464576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611cfe565b6104a2565b8434146104a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c59565b50836105b2565b6104b586333088611070565b6002546040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff808a169263dd62ed3e92610511923092911690600401611977565b60206040518083038186803b15801561052957600080fd5b505afa15801561053d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056191906118c5565b9050858110156105b0576002546105b09073ffffffffffffffffffffffffffffffffffffffff16610592888461109e565b73ffffffffffffffffffffffffffffffffffffffff8a1691906110e0565b505b60035460405160009160609173ffffffffffffffffffffffffffffffffffffffff9091169084906105e6908e908e90611927565b60006040518083038185875af1925050503d8060008114610623576040519150601f19603f3d011682016040523d82523d6000602084013e610628565b606091505b50915091508161063b5761063b8161121a565b73ffffffffffffffffffffffffffffffffffffffff861673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156106905747156106825761067d3347611222565b61068b565b61068b8161121a565b61076e565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8816906370a08231906106e5903090600401611956565b60206040518083038186803b1580156106fd57600080fd5b505afa158015610711573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073591906118c5565b905080156107635761075e73ffffffffffffffffffffffffffffffffffffffff881633836112d0565b61076c565b61076c8261121a565b505b610777816112ef565b505050979650505050505050565b61078d610fa1565b73ffffffffffffffffffffffffffffffffffffffff166107ab61099c565b73ffffffffffffffffffffffffffffffffffffffff16146107f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c24565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b61086f610fa1565b73ffffffffffffffffffffffffffffffffffffffff1661088d61099c565b73ffffffffffffffffffffffffffffffffffffffff16146108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c24565b73ffffffffffffffffffffffffffffffffffffffff8116610927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611bb6565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907f12de7cdcfa92c9e2744861bffda63417a4bc29e3c916f0d3e9655d684cc7acc690600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1680610ab0576003546040517f972fdd2600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063972fdd2690610a5b9085906004016119f5565b602060405180830381600087803b158015610a7557600080fd5b505af1158015610a89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aad919061174c565b90505b919050565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b610ad9610fa1565b73ffffffffffffffffffffffffffffffffffffffff16610af761099c565b73ffffffffffffffffffffffffffffffffffffffff1614610b44576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c24565b73ffffffffffffffffffffffffffffffffffffffff8116610b91576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611a57565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60025473ffffffffffffffffffffffffffffffffffffffff1690565b610c42610fa1565b73ffffffffffffffffffffffffffffffffffffffff16610c6061099c565b73ffffffffffffffffffffffffffffffffffffffff1614610cad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c24565b73ffffffffffffffffffffffffffffffffffffffff8116610cfa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611cc7565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907f058ec768b4d987625b47f998642d52a1ef938ff8445348c5653a5a7c15c9d79290600090a250565b610d77610fa1565b73ffffffffffffffffffffffffffffffffffffffff16610d9561099c565b73ffffffffffffffffffffffffffffffffffffffff1614610de2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c24565b7fffffffff00000000000000000000000000000000000000000000000000000000821660008181526004602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590519092917fc161c67ca327eadedf1f0825c92841b42fcc2127c83d52d8849770c997f9962091a35050565b6060610e8d8383610fa5565b6000610ed3600087878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506112f79050565b90506000610ee0826109b8565b905073ffffffffffffffffffffffffffffffffffffffff8116610f0e57610f0e610f0983611343565b61121a565b600060608273ffffffffffffffffffffffffffffffffffffffff168989604051610f39929190611927565b600060405180830381855af49150503d8060008114610f74576040519150601f19603f3d011682016040523d82523d6000602084013e610f79565b606091505b509150915081610f8c57610f8c8161121a565b610f95816112ef565b50505050949350505050565b3390565b73ffffffffffffffffffffffffffffffffffffffff821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610fff57600154610ffa9073ffffffffffffffffffffffffffffffffffffffff1682611222565b611026565b600154611026908390339073ffffffffffffffffffffffffffffffffffffffff1684611070565b5050565b600082820183811015611069576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611ab4565b9392505050565b80156110985761109873ffffffffffffffffffffffffffffffffffffffff85168484846113fb565b50505050565b6000828211156110da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611b22565b50900390565b6000611177828573ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30876040518363ffffffff1660e01b8152600401611121929190611977565b60206040518083038186803b15801561113957600080fd5b505afa15801561114d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117191906118c5565b9061102a565b90506110988463095ea7b360e01b85846040516024016111989291906119cf565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261141c565b805160208201fd5b80156110265760008273ffffffffffffffffffffffffffffffffffffffff168260405161124e90611953565b60006040518083038185875af1925050503d806000811461128b576040519150601f19603f3d011682016040523d82523d6000602084013e611290565b606091505b50509050806112cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611aeb565b505050565b6112cb8363a9059cbb60e01b84846040516024016111989291906119cf565b805160208201f35b6000816004018351101561131857611318610f0960038551856004016114d2565b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b60607f734e6e1c6ec3f883cac8d13d3e7390b280f5e94424662aa29e27394ed56586c98260405160240161137791906119f5565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b611098846323b872dd60e01b8585856040516024016111989392919061199e565b606061147e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166115779092919063ffffffff16565b8051909150156112cb578080602001905181019061149c9190611768565b6112cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611d35565b6060632800659560e01b8484846040516024016114f193929190611a35565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b6060611586848460008561158e565b949350505050565b6060824710156115ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611b59565b6115d385611690565b611609576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c990611c90565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516116339190611937565b60006040518083038185875af1925050503d8060008114611670576040519150601f19603f3d011682016040523d82523d6000602084013e611675565b606091505b5091509150611685828286611696565b979650505050505050565b3b151590565b606083156116a5575081611069565b8251156116b55782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c99190611a22565b60008083601f8401126116fa578182fd5b50813567ffffffffffffffff811115611711578182fd5b60208301915083602082850101111561172957600080fd5b9250929050565b600060208284031215611741578081fd5b813561106981611dbe565b60006020828403121561175d578081fd5b815161106981611dbe565b600060208284031215611779578081fd5b81518015158114611069578182fd5b600060208284031215611799578081fd5b813561106981611de3565b600080604083850312156117b6578081fd5b82356117c181611de3565b915060208301356117d181611dbe565b809150509250929050565b600080600080600080600060c0888a0312156117f6578283fd5b873567ffffffffffffffff81111561180c578384fd5b6118188a828b016116e9565b909850965050602088013561182c81611dbe565b9450604088013561183c81611dbe565b935060608801359250608088013561185381611dbe565b8092505060a0880135905092959891949750929550565b6000806000806060858703121561187f578384fd5b843567ffffffffffffffff811115611895578485fd5b6118a1878288016116e9565b90955093505060208501356118b581611dbe565b9396929550929360400135925050565b6000602082840312156118d6578081fd5b5051919050565b600081518084526118f5816020860160208601611d92565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000828483379101908152919050565b60008251611949818460208701611d92565b9190910192915050565b90565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b60006020825261106960208301846118dd565b6060810160088510611a4357fe5b938152602081019290925260409091015290565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526012908201527f556e61626c6520746f2073656e64204554480000000000000000000000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f496e76616c696420616c6c6f77616e6365207461726765740000000000000000604082015260600190565b60208082526013908201527f496e76616c69642062656e656669636961727900000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526012908201527f496e73756666696369656e742076616c75650000000000000000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526016908201527f496e76616c6964207a65726f4578206164647265737300000000000000000000604082015260600190565b6020808252601b908201527f496e73756666696369656e742076616c75652077697468206665650000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60005b83811015611dad578181015183820152602001611d95565b838111156110985750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114611de057600080fd5b50565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611de057600080fdfea2646970667358221220e24ba699b82fd36a6b276a74ab3c053b0ee2eba9d7c6ed3356fe2c9bc404d07864736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000382ffce2287252f930e1c8dc9328dac5bf282ba1
-----Decoded View---------------
Arg [0] : zeroEx (address): 0xDef1C0ded9bec7F1a1670819833240f027b25EfF
Arg [1] : allowanceTarget (address): 0xDef1C0ded9bec7F1a1670819833240f027b25EfF
Arg [2] : beneficiary (address): 0x382fFCe2287252F930E1C8DC9328dac5BF282bA1
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff
Arg [1] : 000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff
Arg [2] : 000000000000000000000000382ffce2287252f930e1c8dc9328dac5bf282ba1Loading...LoadingLoading...LoadingABI for the implementation contract at 0xf9b30557afcf76ea82c04015d80057fa2147dfa9, likely using a custom proxy implementation.Learn more about proxy contracts in our Knowledge Base
Loading...LoadingABI for the implementation contract at 0xf9b30557afcf76ea82c04015d80057fa2147dfa9, likely using a custom proxy implementation.Learn more about proxy contracts in our Knowledge Base
Loading...LoadingLoading...LoadingLoading...LoadingLoading...LoadingLoading...LoadingLoading...LoadingMultichain Portfolio | 30 Chains
Chain Token Portfolio % Price Amount Value BSC 59.53% $0.999426 3,745.82 $3,743.67 BSC 2.57% $0.883448 182.6023 $161.32 BSC 1.36% $0.310579 274.7119 $85.32 BSC 0.59% $658.93 0.0558 $36.8 BSC 0.27% $0.001819 9,208.8206 $16.75 BSC <0.01% $0.000001 601,049 $0.583 BSC <0.01% $0.000553 276.4802 $0.1527 AVAX 12.65% $36.02 22.0832 $795.49 POL 7.55% $0.470644 1,008.9488 $474.86 POL 1.51% $3,274.49 0.029 $94.9 POL 1.13% $0.999373 71.0209 $70.98 POL 0.37% $0.472504 49.495 $23.39 POL 0.23% $0.000021 688,162.1642 $14.72 POL <0.01% $0.000295 400 $0.118 BASE 6.28% $3,281.39 0.1204 $395.18 OP 3.74% $1.76 133.7445 $234.94 OP 0.94% $3,273.84 0.0181 $59.34 OP 0.35% $0.999975 21.8778 $21.88 OP 0.25% $3,553.4 0.0044123 $15.68 ETH 0.36% $0.452281 49.7644 $22.51 ETH 0.08% $1.05 4.9673 $5.22 CRONOS 0.24% $0.152795 100.2934 $15.32 Loading...Loading[ Download: CSV Export ][ Download: CSV Export ]A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.
Address QR Code
My Address - Private Name Tag or Note
My Name Tag:
Private Name Tags (up to 35 characters) can be used for easy identification of addressesPrivate Note:
A private note (up to 500 characters) can be attached to this address.
Please DO NOT store any passwords or private keys here.Compiler specific version warnings:
The compiled contract might be susceptible to FullInlinerNonExpressionSplitArgumentEvaluationOrder (low-severity), MissingSideEffectsOnSelectorAccess (low-severity), AbiReencodingHeadOverflowWithStaticArrayCleanup (medium-severity), DirtyBytesArrayToStorage (low-severity), DataLocationChangeInInternalOverride (very low-severity), NestedCalldataArrayAbiReencodingSizeValidation (very low-severity), SignedImmutables (very low-severity), ABIDecodeTwoDimensionalArrayMemory (very low-severity), KeccakCaching (medium-severity), EmptyByteArrayCopy (medium-severity), DynamicArrayCleanup (medium-severity) Solidity Compiler Bugs.
Connect a Wallet
Connecting wallet for read function is optional, useful if you want to call certain functions or simply use your wallet's node.Connect a Wallet
Connecting wallet for read function is optional, useful if you want to call certain functions or simply use your wallet's node.Connect a Wallet
Connecting wallet for read function is optional, useful if you want to call certain functions or simply use your wallet's node.SignIn
Address Cards
To use this feature, please login to your Etherscan account and return to this page.Before You Copy
Transaction Private Note
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.