Transaction Hash:
Block:
16330070 at Jan-04-2023 01:14:11 AM +UTC
Transaction Fee:
0.006780153009480942 ETH
$13.29
Gas Used:
305,067 Gas / 22.225127626 Gwei
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
| 0x0d62bac5...DE057a830 | (dYdX: Merkle Statement) | ||||
| 0x8129b737...D0303390a | (dYdX: L2 On-Chain Operator) |
61.250526859772333564 Eth
Nonce: 212457
|
61.243746706762852622 Eth
Nonce: 212458
| 0.006780153009480942 | |
|
0x95222290...5CC4BAfe5
Miner
| (beaverbuild) | 186.609614226994467888 Eth | 186.610071827494467888 Eth | 0.0004576005 |
Execution Trace
MerkleStatementContract.verifyMerkle( merkleView=[24852886079319656854285996160628895047993712111403992730900266937817415811072, 53720412134618189595444773334470164555578931550278989106688137184766704222208, 49665044396850672392540447995519200973001300012086236661543450376724983840768, 64214348906617221714137162386531730440099256432603287785709572689804444827648, 53818597343727820105163806254778720512042908294056236485939901827862000304128, 55209475002878236214347791963937414413285886150504142619603306773080814125056, 81789922308285904487361669959035885352615197185719588071478618028223466831872, 21128759434938705073127988063330657444497557064284853842203983671477305081856, 71803421186881302728587454238309921597399853717771006777335415668719507996672, 32369199736131267761914082608305673450269660460477326445511258089286015123456, 80465647802530454614565534844877570708073676842280217592236855534761308848128, 33689297229305812636905214666509845084468226034030072608916958156297003335680, 10508518040782072857588404898047064037057950433771861667413488499377347493888, 63954222433448788416979195124660314388740882165830017062449511733655402184704, 9945965269392972725085965572066077101237605187136290430536567779984318398464, 7233410124812901232559756044534269456243802075669710251816291461830564380672, 43347158010801778982148191802970922233773515727708755912849537552177839472640, 103889070210375701354609264511079463474740709736633658554117493650919151108096, 47530486973980592800736560313850271852544692101270010637132141493997491191808, 108186815864611029477357204648041992588296917604353769248564765773247096553472, 23448936845283382319855696719589164001040207992228766414822493995259045871616, 63312410582710143909089882262906263249048344819345417801681880655450949550080, 81683715422911192563363668970906968695688333601972519903665918573698109931520, 25582040010960369380782038525307274771300686936461191144986781961954399354880, 48709195090404395250534006133607414551839111834339543652097544816671770804224, 79861063412971917450245362139405195028455033754689445844146009597125033197568, 114475880360621610062119944947105004229720282665804554562507323195144276017152, 106896748181352273909303269189101646792977498653941387840751826290208275431424, 97849086228667652777991272389990740985782817925209361323030656665477546246144, 65832239123031015556613546921745726105978049642447535173624750865756918382592, 38639318598149386449980506886350718597395859360145459404264424710284790202368, 9594762728559958927183658273951137516899327802682981253247952258905782878208, 1218853039566815639523911753115527595492526308780295251988717298967509991424, 11869166622854595244779204759355763181880789652967879851583077502588595208192, 56795257906090657057618361403449364822239256787420371461429298652916989558784, 54186542701607141425880792100744104022175334740472732016381594905475836542976, 1730932066330204387115551980956824907045735882393473249888741645575459438592, 64801648982624229851741426278101431149378438390431151233356932691823259811840, 81753647693963427290627540874305300325594130642220023893548542272927564824576, 93202821726817561252266827246355760088357340294642978147418408411246784151552, 110642088403966753498921123967868858349027481973333529476312851539385946996736, 104877507831210472843145088776821821239936388828770280548918068359164562767872, 80448305010666463259663745182317898052884066968543351010975826570463066193920, 102390771253017898491196499838086957451147395833464556752000834743642705887232, 70936630281493743414645551156129983215058115172139175790038700414419509182464, 51460304417551158557249944025380736433133274378447747839605089548403407323136, 82666044954609503058825620652859778932533202068188916580400060092238696284160, 82048003694887065401844776442182073704569636499258604171236346115443799359488, 13917380121929453203886867907677487315264175145668821848328294462241105772544, 36511720553700474213892662039597864215822439986898686622016473417094747127808, 37111835116906205694774816844606019985894840371467474343108892906065827463168, 31320548913069321444378772004630047406199992458203742987558259033071220162560, 70218406950473244660265758895887995300327675982332320197087759688077976535040, 71464514122836158133121400900484925468448530949204935346874243887847333429248, 19002353716530821556020877713073608866788203419612854297103419608005104107520, 108659999793238942501661733379192130051676943411269627841306795370827466407936, 70442806055958916542913621662744177168966889244102678607596987766713108922368, 96765152656863043068423464820733383389924018049815258582765454147915861721088, 61531810587266862341948515913052276821996533604806934501486188083243735056384, 14054945140032184805935274241269689110112236236257429630453823913129360228352, 114791378162885643420355495391250125523917016339287361617636477023960231313408, 36063847246926656284887286549422635835218627651202706863034843782155885084672, 104844934853901984455973233082179102412665725902519996743023707552579879698432, 101479191559508169163214472336068556742780996587164107421299097742893092175872, 13338951635123030682966277246318085653003187365735646404242586895576423464960, 107848940274873361080260613060325302981936199240446839810323492487718804389888, 101032587015347266490269313049614650612419280263598335556704366101297721507840, 50689729932155989593629151820385729713808817780839225340516937106042648526848, 79129098080508772945425559636790904507878378158412679528642079799634007425024, 102004435910357543492067677935014872583439804420532409810836579065897435529216, 26047948121476710037020371782102309376757145299307806290109908480921364856832, 15364888459610080501312403446748025444941322215324560432189825988800951615488, 62481829307322054193227084390160866949149730591620787885625205552823222140928, 72284678605753451112500154709683888691047811949726142101301578001910524280832, 83387970124158161993781209788753191097402421811245817778972839287695138095104, 79371789799111620372233391298952761984775659157721771223582055129684719435776, 41865225268589463608925390031996042500127647075322482366936363064666540212224, 73685784283813383792924002562985814576518416287656193535421209569745952571392, 111360761343247369191144001398501385666530089516417901651843589344735535300608, 110383404442251414542500475166414857874459966641686946769153070122412042878976, 25529540582367869277621642809940598875550500690858320764105245432816479502336, 18337585904230925700293157709840834025690739434637545446291937343555424485376, 15155199169313299017223636047712691057371225359716993756258653664660909195264, 68543055155884617002069982372681731273293581983693963272522634348586617274368, 28767566769227140744714390257559471261238868355684070648591075197319907377152, 33945296824335412048639402822475984276593940300903216514148306011923226296320, 49769297091918002253849191629679779569525545225510917726195006737798666387456, 16915171376013720955630745862758529987419525512976901215144742775654501580800, 25326796776210479294175665514485663036921701834432539286765893578486192275456, 15102054213217722460614305415179433141726848436651638336959357660401680515072, 55776928235316056679987103450686529148499282470078933556259531080188743909376, 85690730682508997798990013793031110350846502550253620333083477593669347835904, 56713866200668354865695048703786449870593579563021611901277512677207889149952, 69515661413869492053723864835890196222555536554674748945884050692964037427200, 74896420437093201112105895293687732214799775262268231619373115767206287769600, 65122836593576508184371800048085251100979195867928793925495376425109168324608, 16154294308420060284042215973188591354286728577575107912388023653121744961536, 86724189315569303585976555243634943504235572588268156572479364073693454008320, 49006974223331223083944422327511985100674346955448246582505536885288161247232, 12042408740718993143681597495453305647502307141189854463939049190611602112512, 37663384456744678409634572032964481272960404371964376751363952378455131160576, 42301977157072960332644936219856306100926487200946540818740931888012905676800, 90386226208774059484207917781042842156584046773811972828660009881340538257408, 89494193250190875242662821516054053418534289781252613881670592021687766614016, 19752627648277157723301228004374166207084636672250555661895926792487320944640, 67313127495033653596144600848183557138687293453569486918492664709520161767424, 82574105709056254465315874044344213945934855807845114105348529014690604384256, 1119508016326529221806739222313628291492450217127431691694495497332688158720, 57578579150007366347745596830993198944724287183320808279594259425851858747392, 72467932499623455477659122355309727583076532472905270699526703118690323267584, 19141722978696535562982273959803454357216519943483325683595609006065106026496, 72435542368235925107872085613712390346605300838540692889279502526207701811200, 16375869953948957149109833543762662296575629716914175652067941937823904432128, 33870060976816171130184908105289404587223622067382646647566891598536134098944, 10776867759594550365330385727905017129836361655264523820742032658797380501504, 108621962213717817511212996166351868333841238064735618034912111333538141306880, 76809587834075955306646765107037607724115185770076107833040267984719696625664, 46802555786208664827679509122977942805767149253813490900133504229440470646784, 40368715205108110190299679264585808798650590089232675542101719497678568554496, 50564471631614507335525221038654458728488971238591290462531391218617621151744, 115037352418573472809392054079529644559278326387543724410545102956808198160384, 69545426471193797216727312660499018422337897242330301211666556313387856297984, 110641012104171555874709540452344559173735841117109932280488536824145147592704, 113890349937837314354262383199828855324125884943950172914854808577912858476544, 53098065117149464034127014319497134820976772756410967546939037764859239333888, 28425000207888077844847335341630641028390172054313767138981581993456235970560, 57910126982857916633747623448086165702158932412110609231415817404951864279040, 91629799109807946847352669026742878479150175487003675895155292568878747484160, 59305935005046315830261926552600177185625489943420633356385494468642069282816, 31216079913285999788456255514804491103443721225798586086108930091946742906880, 11862547103340436321509678561907205886526737101665910627519401612192046383104, 63135226458486471896139381597294242424631652886595939118784863781611097817088, 1727740888452677027269709366194751820293925500710451696932913065758533091328, 105863116216499514579233187810756883085658452104946836659387880595052143050752, 81908889656006158620770909429949430467583366019510723576347393553920249823232, 112983237155875429266409792453580744873647098427582309994799178272850927681536, 23381633273969307778947885080427903709615382669318982318565101934073736069120, 66140435247145734761478746256217483342296566474421259505334867378736568729600, 4039095800987414415526407772562229594937951027482390463814669275791324348416, 103063723538639989974675588047020687835313450909715581457875516583431385382912, 19181071000868070549330754442516171202833255802960075280609724720328824848384, 9076360240989060420584709033427806101088334540109279383708869656560531406848, 17815326493821319220237610840310641939235840760718452684426773553209516490752, 4125018024310999149912177428745295818830503104759493508903533077063834533888, 62994440662232991960198326417795114340586537762284155731444803625457935187968, 79672171177657555011967414436720086571186595603953445005506160379277994885120, 104515077984464262813904663565071963691002411412383889004575991239845980667904, 94277304930750762449216500331601177968311237746012204174642642109779375292416, 95740568087031739201739790307331489937446217096764193563870332767949109067776, 54495079375661093046438460386065592563880232308071621348386848081261908459520, 95809159010851085588389485967789063819959352617920853888938856159953236787200, 102634494937193178629150574553404488675671888475947708651700669920687761129472, 1624857500752946445232294153358549525490186715082010010190350815126544711680, 87999188909607764672139988679117040416852464861397808210830754507442498830336, 68595364017495126684751717290454943758343112012460610297800557289187026403328, 98011988487587113465981656699882995141968777443216166996884575728043468783616, 86065208892939668865829176320142649666448008898356454000682423604727731191808, 27919311327681343974839252868750358035793360247645751670298367757291574263808, 114995862956144590214831420631549198610519578802000078683731664926154394959872, 86749871333805861349433483716980663362200884792726269451056902098653215195136, 4092887318749238847567644900999358692108212880130152798788745844828049244160, 14971175222249340449323710478012338355062417030762867938190785530104020729856, 112134651632381634473184326744267260871652450335776764825910075722880690159616, 113703360217052270419187930662540966006425280984547642843528111750973904388096, 91932504299961355992254482491654429415094683727681644626765785445144205459456, 46698199101136149312698969818406432889051272540451588634857787637361197187072, 7209000636694803416410255359451571114883603898896091502286352650975922094080, 3589451584746129915516007941822673990786350656061814158139356694953020358656, 4420945220212209058161534352965680952257761618414404829521242233220511039488, 68123838336735316382853357712602823520208248250751099669594336025092043046912, 109040706213640942422966100874132683274734629148361679931761565449498103119872, 94098308095709963093246884301883080271844456312678511397235567985760869023744, 78209512775457999188129533064068112976742862618079591946500154922286228439040, 4752638780895497773073894432053422653993700625881061484153656888378771111936, 76774914127212776383677942466129197061788035127718454260139568421037586513920, 109859550972524845984726967973915225209526250406644050085848665560690800459776, 84786270429927957909267669598102938933219080643820251814205432052228047241216, 68421982222815333030279001299142941454568649981708119321705219380861361717248, 10279073548652056692388310464066518813187192996292850729955890724047939436544, 33215346659954894631704248527737346736653763580703133620993701230994499043328, 13848086397810647374651716054952927498543773099997405967325290723675847262208, 108331560142440953601706623421184330904942683663667850450752572687813233868800, 94389577429412621027045582135106909846410132899600497207870993132752738451456, 81153299335157980227038433177218588302168914917453983499137031544591225978880, 69963952441957439225675048305367015185606080350222993886075329453520693755904, 57359023544521234357323855528916778097669549837923400131530935990356881178624, 81901063846896006463469717375015418015137701685545768402632825999275650449408, 29346546222242255314428828918721312714162496815981718503971540484368201940992, 47292794162943544967162815954058922251288677660896761895217417511516822831104, 48512233837359100974073323021006645810051119061594416863456970695959996530688, 92524463694503296172165614173754146891952486996992642648100099529619349176320, 78698246776465922165751906477151427877012183404892751498490731624725903048704, 15701223834441834193707890134046776910085763715053243466927393791992202788864, 26337520820945648394931630742181301851651884402881234052331194113440434094080, 101086383224219283112889314895527318925924572786087174389985530286825401221120, 73282053499854681221457465170028413585552230649294068840737866155262004428800, 34738032010220714204932107993186386224434598523452768235648094215105067089920, 77124197068783125863183834298015516571897764095403962002133393099528838578176, 31661023993310637873467171491034178521511432073165491018072165197695158321152, 61675756837253506655841058006929195531473869091124790615657276105510065537024, 8742493928064852602986807630576831188090219682907400417104535342738288148480, 31552668595926719618136226237915932852651208560311363302084025885197995081728, 35235412583715523539800725622429163000338575099801338220670148868683342020608, 64265804968088265365163869524635298773343174243809655873761407411528356855808, 98111812750603073832603166252253473040104214594292854417708276433995989778432, 78329536229976721722259261142322389110477733567233302646327451989630389321728, 11229257862711284290714240773434274323602913259050315997357810478369252311040, 70832853300938605308280694756167332440552191136465753838087776402798853226496, 33542810646688308065872753670330217382480944526766109108143241867889272160256, 104019611111726425851484656601264380328715391278004875968816104479615921160192, 85770735651316171625750726307667138222927639861033469702875611323419622113280, 103376307756786335275746842169934302104816995266599710825146606988745150300160, 33631641322323957392671826357256221250278601404352685425840617592272648667136, 107020619310009075023162339312210150040317748997245509553531193536962269020160, 70327183607228852275275955836625262596475819960057704154443170370344659714048, 12947069811704686528190777624285036221347627946391969011930420707294126800896, 11390717363082947738870404355549978160510218260549943453065384487125757460480, 9326587430365330112309354440877868429736247105240280860836148721444466982912, 83743733990042337401414423364389100800905840154793946896347193087293462151168, 56755994214573550622896717559245952743465185796417380861536986404050087968768, 45401188521065701826113948290318565400893930103629996580606774339710482382848, 64988890325594537684246145094987597530546583920150273485930708511714409709568, 112175040234656340520410043820364162616514938078372617603765395222425619136512, 87563955122983289967517402817865017790347232212000536340602790852834975809536, 110556962123209681613307208946584827445617105256637146965159178451895717986304, 32829260739053034570224051804936261945953906082821469138762895515306671734784, 42760575332033628022032635845700003545607318584488324190860721179050110877696, 19616088512809376250011292390601665081888510803538543786583949012251950710784, 65548993598182932539290753751569489791785912496350569500612147371464699412480, 24081623870462198948210461493807972135059402553198009543004877902996876296192, 43339103225664303355384936639962965564402525053647324840102599412342239264768, 39828629225428014249198609996988953940602928309223899047598732635218053693440, 42573014019855502203952993581993523168147969470954400908079997902863858663424, 88920312370445573701319874798017497952729941524215474056993808298186654089216, 30431496427570336230012751779105840207811874863582573180261060762703027503104, 63627021548479292403885455767681465718989829204902257951769981165981872947200, 16378532201408159684537012959432553973053084639675698316134789549855845908480, 57453971053577928220776878475045163477679481951553142929268186959383797694464, 77747336543542463050223171377646227313661631153838644321713205188557602291712, 86706550800725345310237527842487205778283826933361134072587084327542016966656, 23101481703871514536685332328796452639065344578997224892656556682919448412160, 51983509436481898630388799557094406813624996914285764237615249519314085085184, 78031570011804698191820210510534341096472693154983422987451762853863441301504, 46560629486652924989856093550056533206952019728434406433392976369312551927808, 9303356272105537281211682282781223411187073819742337925628033371852228263936, 33611859597079808264804380943828540919695365745592034423500776392493885292544, 36509337621478239662327233553901201783631575662233406613322534206268673884160, 1138896488471955803889079307458320979782341129180538909393114440094275600384, 9177575459865091676392293682536895695206815807360277676928057140339965689856, 72016874105449915737042775456417971000273845650038647436712554031687678296064, 109251070564964454818478053663738725927408847596920915514703528406266505330688, 108840622552299725712856693417171213008372759543717905693355052252999610007552, 82965657123965459242473827464969318152936947564182507717679543523578853982208, 46268411573144946741723426031646026092961436069217367425985291826589339746304, 65052001345660074132480378597831620616472937387748248906411355393948509011968, 36015242650358749804034789434155852298524571793937604261106445380950821961728, 45382359118032428173542167598406271125150982378106653291909764442813622124544, 54642170201979234112857793127852989396270884910275657717277884943086573846528, 81613170258031209244278991181613779046954804078867761967829376569255741358080, 97411801539903956354664921735675232745961189744626751822565256156935236878336, 3336653390688407968272430678411248176219776404733075002305764496732852322304, 53575725769228522760400780519012062787748271406238303134066808979851673862144, 87553452483860050543418905452811108812557037090805984796890078600405295562752, 52272137437465277325481780117932684224699408788958307874513187420425261416448, 110713346876859635715448192136063963880246186322893531554432203112778804756480, 55255797105976740396237442357871629825353565724437247063628558999658162028544, 6337791555831935967134395100332818194209704665379786679443980115075221422080, 96440373195437534903457047023001717770417682070836829511624430470858748723200, 52386374589774516443716233120362257184073510631350095599179506884834890874880, 46387570666142699838201080102839893851818975750263166650964127202981978308608, 51652545833550466434658609619094492196786211591312514767184272882885722112000, 10524511920495132413399323119286714647972387163766381832494158373465484165120, 79576428250190576425996594550790264802463188780561796221276409121827064905728, 59491132368766013937505036476561857559513494201366325086441413315777567653888, 60229522463694760925281807282841827107872964521071415389786049279270129238016, 94864419317950871150637557534906845448223411157241401915391576824870091096064, 55739037054470318527542752781740834199792552949356587056081309924141264011264, 55433397732750061128945280881317828585888705201785261686638206424011507761152, 38635587814184610611589287074276772986309778170388430236805842689844295237632, 97785443062150994860244159267842804182630991254235702346848852457329289854976, 48882076477431401981589907919673378184981522245972113652717283738703588491264, 27979296537630128468179586650531601709539920185005495668601706271122399428608, 69078863083212413745250460879590406757445081993709781017611804110600764653568, 100840331106393109828180116874927756050022251020328865550266823591136937902080, 19005350741424954655216916846552520160094970156081596250066685390950687047680, 71862413336185336566314155671090156992117447427377527569969663330764017631232, 97525259483815186362866511166591876183601045661265299252553327089195044306944, 8105411514024868408517048998311934648660197427069009599961259980816237199360, 103757981037288096274198876294083956063303158528360574550800627166119865614336, 24675025615057225391063174069497007343933003731277683463140673122309144313856, 7979376050950262181946171120873364885487687388304160291301977548510910742528, 34045215291556045449356948029073192741562993988858499475239482511157043920896, 34734097463911573711399676637234377725454458864340556281555294664687873949696, 59553955417992310936454455699724612644730335715749451773974172425635688873984, 19340766242574305264406385745217125861565867414391302866708425097507076308992, 23177986647123938280803613706137315052007439045607638969357830532718020001792, 16980874405143013929219365503968459252249318220663622604648799194328946704384, 87699902101679598395577126841919301881454232354456385820533972681237137981440, 115471674885106314047852574395656376858334818958226063682857904452503796187136, 41445246451527626188246350217727404655392896893062209313908747747051167547392, 21776097157659138757077542970231918198579967740463605261921650226002707611648, 107352993113912582375007805753806272858819987857498627979298473767199035097088, 103624277339355604265174471880026345230776397723158255569036443970775113793536, 94561596931053208577183244956696090432001352188781515136049024934505749676032, 38067079134723971042034282714633880196527615460172275971979187923453464281088, 77389860966619027648338731819003776451404318608658137619597227693868104810496, 72942911454165014686265295441802385806912522044524329533524003296984722046976, 74663932171844545484364486328936472222265813254844677738178488378552307679232, 103457555910614781635008214107591213852416939440775311142682098635288206114816, 45804474599596294293546920954648674400085560056714309403965903051079794294784, 94790465494217406088158736100421647624623861026455116548712595726928013426688, 90521591100396719939789415464060724051836892840716563502473241074389246541824, 40049586286235528637787997495041157157003367198410873736742209063682169634816, 4748948269381094692049466414515519961612984211205671969939468983696067919872, 57959562857672837782116102465437663845721365784091128859929729674874015711232, 32317450946844068055073132888982283645467007258724864769594123456987472592896, 12943428218405701113144742319319512813051009922765199112977156602748955787264, 72732702420063022454160018583791492816474614826850664429155515115292776726528, 18926016794246850280468230605559449206873978949013534099559719117195652890624, 47267422059144881007920820561633025328584040852238196050826158984384049315840, 70574328364432464743338628862299932437450304321965803857238142309117022175232, 114385104402642597894167528210790476350548528466686106789150992647901941858304, 34617982930861796485561019458687117168270317144014169765877278339200976945152, 92149346995620953583578011037428742217429645020653001978291015864594791923712, 52799324819115480015970284751373248719394528603692430992210640068142973321216, 918740412580678981440339699247527523952736648858523812792506147295161483264, 16714883224312813508428449621112697989499438515939449319790924783630516486144, 102008476078902265673773194750537712980863868753498578886861301564250112655360, 9847365868110592985979469822957685293921544304879433839491332055154802294784, 96158829109476028391539603115351719838731496788091335011396355322435445194752, 42029744568191186378280432247515583847780070646315730690428126047643767930880, 56769347063850204513632451894740494132635248000474128227260799005339701739520, 30953315444022206464137613473237079760417599874571570206516896199296363266048, 86585853906041540560713829945937535572772748740293685716748746541465467879424, 49365236529238946031621965900082958077138373979307756407123485618874898972672, 47429295003464662526697513062722746100492969117370193867789677248951051354112, 43636616588525068416240194223958545813178028870963386387871693093007106506752, 28134845489287448373431837473064978835154778536516551980038094698367097503744, 109575882293765419143467032979530473999756810488651654744121870491213801455616, 41500253688708932284853801381138401393012768524548847870083347603981902807040, 90340004632596067755111327185474302983232107121881155518753161162905547177984, 59803390955342879854148504628852074988404656451398634108244078805891200057344, 113867084750744523690682379617915670115858111729827102754510643945859557883904, 63233117583522586103346820161100950131252434003156207452795988933214199611392, 43092965869758603176063932749274472049597784155445667887791042941464919146496, 28636018637106305687344655153328739754487291923949231774345243272502170353664, 50644951995393196692351970572880042601479732322460825613521683016249635766272, 100776452624737917285482536692613542623746506863574444565247604438581509095424, 76018094834112421470756046499394739030196212579167704289360978650489748979712, 75760164257690944294453016901971981618974320150280380082790904745503397773312, 36926858676507028501617525631622527733395855666442905699530453508488825929728, 31888485253838401086351467731793486287112988459971583616885217354242846621696, 47283204401913963690240396335286639792503121898280613894632688360234810343424, 91624347878867228406314877253651215107293252278466949161599247294891143725056, 80408849466151649284815722742360697942110565320631168831049576643802945290240, 57221923670954365270297174996845409288798391855449028832600990938745263882240, 80914232030928437402770985889969073637610806586769169561510193258225236705280, 100562783824765046927470115948419870644595919858039619144287615912595205128192, 63585891850788423473848686503949367612227240385708778283060987600793822560256, 52783808574366006996586977929207685508924942449397760673303586362810645348352, 76631349651232389278666231870709785417102865265132550071142883727396894146560, 72813075730312114007927055039549540653054681448013002313758941158606509178880, 61884581976841826422639132272732752702392863042272475877193522562066997575680, 62572188359789778277659606189162592275835876656128706737499526613519898247168, 74944855919388112032187905671934454212113356711668915105359863881975409410048, 111232243816613655633751276297546216945854935825390563071334727504006534397952, 82262774166325797517529386695175933058432988840911258808255392463055195471872, 94343753535275234159153509899906980455619937859141069898479507154531254272000, 15554145709817177214797323691747202192351780478229826407208395470635236589568, 72830777727308487539938346111666188084429091716133471726905415526743529226240], initialMerkleQueue=[36364798485, 85044432635704677708111794257657681710698462395275388982733352353772966248448, 37270234663, 16513896689375694204679280069425241996223642275184797630721204175838753325056, 37635011294, 74439098243051236865227678234460937765606437643891024910582592891994828177408, 41807115345, 84580154753817385333580263783905669093028830468345464437993905237463176052736, 44600961956, 14661818768711779660646820677530547660683116771488606488441064138911927762944, 45191529733, 41413368123892180726873506333122590034303448597181991146988123342267293368320, 46592525338, 81069069395712063107355135722313537400516124315006756957239545817448490991616, 49262656671, 13368298860315537207781553578417612831940299532224177296174629861594671087616, 51880753184, 66946512198258950826565518916903480681346353324142056133142457624872360083456, 60760437507, 78289605021276133661100687422488189871790575805029068659698925619290633666560, 61068221444, 12023948748509337399196090735939167495540383951189548663299156445842718588928, 67810370438, 82935492070209027198961837016594893111171785347615173641286520513832564031488], height=35, expectedRoot=63285767686455891746352111197517966001763717335586116659075284160182141059072 )
{"FactRegistry.sol":{"content":"/*\n Copyright 2019,2020 StarkWare Industries Ltd.\n\n Licensed under the Apache License, Version 2.0 (the \"License\").\n You may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.starkware.co/open-source-license/\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions\n and limitations under the License.\n*/\n// SPDX-License-Identifier: Apache-2.0.\npragma solidity ^0.6.11;\n\nimport \"IQueryableFactRegistry.sol\";\n\ncontract FactRegistry is IQueryableFactRegistry {\n // Mapping: fact hash -\u003e true.\n mapping (bytes32 =\u003e bool) private verifiedFact;\n\n // Indicates whether the Fact Registry has at least one fact registered.\n bool anyFactRegistered;\n\n /*\n Checks if a fact has been verified.\n */\n function isValid(bytes32 fact)\n external view override\n returns(bool)\n {\n return _factCheck(fact);\n }\n\n\n /*\n This is an internal method to check if the fact is already registered.\n In current implementation of FactRegistry it\u0027s identical to isValid().\n But the check is against the local fact registry,\n So for a derived referral fact registry, it\u0027s not the same.\n */\n function _factCheck(bytes32 fact)\n internal view\n returns(bool)\n {\n return verifiedFact[fact];\n }\n\n function registerFact(\n bytes32 factHash\n )\n internal\n {\n // This function stores the fact hash in the mapping.\n verifiedFact[factHash] = true;\n\n // Mark first time off.\n if (!anyFactRegistered) {\n anyFactRegistered = true;\n }\n }\n\n /*\n Indicates whether at least one fact was registered.\n */\n function hasRegisteredFact()\n external view override\n returns(bool)\n {\n return anyFactRegistered;\n }\n\n}\n"},"IFactRegistry.sol":{"content":"/*\n Copyright 2019,2020 StarkWare Industries Ltd.\n\n Licensed under the Apache License, Version 2.0 (the \"License\").\n You may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.starkware.co/open-source-license/\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions\n and limitations under the License.\n*/\n// SPDX-License-Identifier: Apache-2.0.\npragma solidity ^0.6.11;\n\n/*\n The Fact Registry design pattern is a way to separate cryptographic verification from the\n business logic of the contract flow.\n\n A fact registry holds a hash table of verified \"facts\" which are represented by a hash of claims\n that the registry hash check and found valid. This table may be queried by accessing the\n isValid() function of the registry with a given hash.\n\n In addition, each fact registry exposes a registry specific function for submitting new claims\n together with their proofs. The information submitted varies from one registry to the other\n depending of the type of fact requiring verification.\n\n For further reading on the Fact Registry design pattern see this\n `StarkWare blog post \u003chttps://medium.com/starkware/the-fact-registry-a64aafb598b6\u003e`_.\n*/\ninterface IFactRegistry {\n /*\n Returns true if the given fact was previously registered in the contract.\n */\n function isValid(bytes32 fact)\n external view\n returns(bool);\n}\n"},"IMerkleVerifier.sol":{"content":"/*\n Copyright 2019,2020 StarkWare Industries Ltd.\n\n Licensed under the Apache License, Version 2.0 (the \"License\").\n You may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.starkware.co/open-source-license/\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions\n and limitations under the License.\n*/\n// SPDX-License-Identifier: Apache-2.0.\npragma solidity ^0.6.11;\n\nabstract contract IMerkleVerifier {\n uint256 constant internal MAX_N_MERKLE_VERIFIER_QUERIES = 128;\n\n function verifyMerkle(\n uint256 channelPtr,\n uint256 queuePtr,\n bytes32 root,\n uint256 n)\n internal view virtual\n returns (bytes32 hash);\n}\n"},"IQueryableFactRegistry.sol":{"content":"/*\n Copyright 2019,2020 StarkWare Industries Ltd.\n\n Licensed under the Apache License, Version 2.0 (the \"License\").\n You may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.starkware.co/open-source-license/\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions\n and limitations under the License.\n*/\n// SPDX-License-Identifier: Apache-2.0.\npragma solidity ^0.6.11;\n\nimport \"IFactRegistry.sol\";\n\n/*\n Extends the IFactRegistry interface with a query method that indicates\n whether the fact registry has successfully registered any fact or is still empty of such facts.\n*/\ninterface IQueryableFactRegistry is IFactRegistry {\n\n /*\n Returns true if at least one fact has been registered.\n */\n function hasRegisteredFact()\n external view\n returns(bool);\n\n}\n"},"MerkleStatementContract.sol":{"content":"/*\n Copyright 2019,2020 StarkWare Industries Ltd.\n\n Licensed under the Apache License, Version 2.0 (the \"License\").\n You may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.starkware.co/open-source-license/\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions\n and limitations under the License.\n*/\n// SPDX-License-Identifier: Apache-2.0.\npragma solidity ^0.6.11;\n\nimport \"FactRegistry.sol\";\nimport \"MerkleVerifier.sol\";\n\ncontract MerkleStatementContract is MerkleVerifier, FactRegistry {\n /*\n This function recieves an initial merkle queue (consists of indices of leaves in the merkle\n in addition to their values) and a merkle view (contains the values of all the nodes\n required to be able to validate the queue). In case of success it registers the Merkle fact,\n which is the hash of the queue together with the resulting root.\n */\n // NOLINTNEXTLINE: external-function.\n function verifyMerkle(\n uint256[] memory merkleView,\n uint256[] memory initialMerkleQueue,\n uint256 height,\n uint256 expectedRoot\n )\n public\n {\n require(height \u003c 200, \"Height must be \u003c 200.\");\n require(\n initialMerkleQueue.length \u003c= MAX_N_MERKLE_VERIFIER_QUERIES * 2,\n \"TOO_MANY_MERKLE_QUERIES\");\n\n uint256 merkleQueuePtr;\n uint256 channelPtr;\n uint256 nQueries;\n uint256 dataToHashPtr;\n uint256 badInput = 0;\n\n assembly {\n // Skip 0x20 bytes length at the beginning of the merkleView.\n let merkleViewPtr := add(merkleView, 0x20)\n // Let channelPtr point to a free space.\n channelPtr := mload(0x40) // freePtr.\n // channelPtr will point to the merkleViewPtr since the \u0027verify\u0027 function expects\n // a pointer to the proofPtr.\n mstore(channelPtr, merkleViewPtr)\n // Skip 0x20 bytes length at the beginning of the initialMerkleQueue.\n merkleQueuePtr := add(initialMerkleQueue, 0x20)\n // Get number of queries.\n nQueries := div(mload(initialMerkleQueue), 0x2)\n // Get a pointer to the end of initialMerkleQueue.\n let initialMerkleQueueEndPtr := add(merkleQueuePtr, mul(nQueries, 0x40))\n // Let dataToHashPtr point to a free memory.\n dataToHashPtr := add(channelPtr, 0x20) // Next freePtr.\n\n // Copy initialMerkleQueue to dataToHashPtr and validaite the indices.\n // The indices need to be in the range [2**height..2*(height+1)-1] and\n // strictly incrementing.\n\n // First index needs to be \u003e= 2**height.\n let idxLowerLimit := shl(height, 1)\n for { } lt(merkleQueuePtr, initialMerkleQueueEndPtr) { } {\n let curIdx := mload(merkleQueuePtr)\n // badInput |= curIdx \u003c IdxLowerLimit.\n badInput := or(badInput, lt(curIdx, idxLowerLimit))\n\n // The next idx must be at least curIdx + 1.\n idxLowerLimit := add(curIdx, 1)\n\n // Copy the pair (idx, hash) to the dataToHash array.\n mstore(dataToHashPtr, curIdx)\n mstore(add(dataToHashPtr, 0x20), mload(add(merkleQueuePtr, 0x20)))\n\n dataToHashPtr := add(dataToHashPtr, 0x40)\n merkleQueuePtr := add(merkleQueuePtr, 0x40)\n }\n\n // We need to enforce that lastIdx \u003c 2**(height+1)\n // =\u003e fail if lastIdx \u003e= 2**(height+1)\n // =\u003e fail if (lastIdx + 1) \u003e 2**(height+1)\n // =\u003e fail if idxLowerLimit \u003e 2**(height+1).\n badInput := or(badInput, gt(idxLowerLimit, shl(height, 2)))\n\n // Reset merkleQueuePtr.\n merkleQueuePtr := add(initialMerkleQueue, 0x20)\n // Let freePtr point to a free memory (one word after the copied queries - reserved\n // for the root).\n mstore(0x40, add(dataToHashPtr, 0x20))\n }\n require(badInput == 0, \"INVALID_MERKLE_INDICES\");\n bytes32 resRoot = verifyMerkle(channelPtr, merkleQueuePtr, bytes32(expectedRoot), nQueries);\n bytes32 factHash;\n assembly {\n // Append the resulted root (should be the return value of verify) to dataToHashPtr.\n mstore(dataToHashPtr, resRoot)\n // Reset dataToHashPtr.\n dataToHashPtr := add(channelPtr, 0x20)\n factHash := keccak256(dataToHashPtr, add(mul(nQueries, 0x40), 0x20))\n }\n\n registerFact(factHash);\n }\n}\n"},"MerkleVerifier.sol":{"content":"/*\n Copyright 2019,2020 StarkWare Industries Ltd.\n\n Licensed under the Apache License, Version 2.0 (the \"License\").\n You may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.starkware.co/open-source-license/\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions\n and limitations under the License.\n*/\n// SPDX-License-Identifier: Apache-2.0.\npragma solidity ^0.6.11;\n\nimport \"IMerkleVerifier.sol\";\n\ncontract MerkleVerifier is IMerkleVerifier {\n\n function getHashMask() internal pure returns(uint256) {\n // Default implementation.\n return 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000;\n }\n\n /*\n Verifies a Merkle tree decommitment for n leaves in a Merkle tree with N leaves.\n\n The inputs data sits in the queue at queuePtr.\n Each slot in the queue contains a 32 bytes leaf index and a 32 byte leaf value.\n The indices need to be in the range [N..2*N-1] and strictly incrementing.\n Decommitments are read from the channel in the ctx.\n\n The input data is destroyed during verification.\n */\n function verifyMerkle(\n uint256 channelPtr,\n uint256 queuePtr,\n bytes32 root,\n uint256 n)\n internal view virtual override\n returns (bytes32 hash)\n {\n uint256 lhashMask = getHashMask();\n require(n \u003c= MAX_N_MERKLE_VERIFIER_QUERIES, \"TOO_MANY_MERKLE_QUERIES\");\n\n assembly {\n // queuePtr + i * 0x40 gives the i\u0027th index in the queue.\n // hashesPtr + i * 0x40 gives the i\u0027th hash in the queue.\n let hashesPtr := add(queuePtr, 0x20)\n let queueSize := mul(n, 0x40)\n let slotSize := 0x40\n\n // The items are in slots [0, n-1].\n let rdIdx := 0\n let wrIdx := 0 // = n % n.\n\n // Iterate the queue until we hit the root.\n let index := mload(add(rdIdx, queuePtr))\n let proofPtr := mload(channelPtr)\n\n // while(index \u003e 1).\n for { } gt(index, 1) { } {\n let siblingIndex := xor(index, 1)\n // sibblingOffset := 0x20 * lsb(siblingIndex).\n let sibblingOffset := mulmod(siblingIndex, 0x20, 0x40)\n\n // Store the hash corresponding to index in the correct slot.\n // 0 if index is even and 0x20 if index is odd.\n // The hash of the sibling will be written to the other slot.\n mstore(xor(0x20, sibblingOffset), mload(add(rdIdx, hashesPtr)))\n rdIdx := addmod(rdIdx, slotSize, queueSize)\n\n // Inline channel operation:\n // Assume we are going to read a new hash from the proof.\n // If this is not the case add(proofPtr, 0x20) will be reverted.\n let newHashPtr := proofPtr\n proofPtr := add(proofPtr, 0x20)\n\n // Push index/2 into the queue, before reading the next index.\n // The order is important, as otherwise we may try to read from an empty queue (in\n // the case where we are working on one item).\n // wrIdx will be updated after writing the relevant hash to the queue.\n mstore(add(wrIdx, queuePtr), div(index, 2))\n\n // Load the next index from the queue and check if it is our sibling.\n index := mload(add(rdIdx, queuePtr))\n if eq(index, siblingIndex) {\n // Take sibling from queue rather than from proof.\n newHashPtr := add(rdIdx, hashesPtr)\n // Revert reading from proof.\n proofPtr := sub(proofPtr, 0x20)\n rdIdx := addmod(rdIdx, slotSize, queueSize)\n\n // Index was consumed, read the next one.\n // Note that the queue can\u0027t be empty at this point.\n // The index of the parent of the current node was already pushed into the\n // queue, and the parent is never the sibling.\n index := mload(add(rdIdx, queuePtr))\n }\n\n mstore(sibblingOffset, mload(newHashPtr))\n\n // Push the new hash to the end of the queue.\n mstore(add(wrIdx, hashesPtr), and(lhashMask, keccak256(0x00, 0x40)))\n wrIdx := addmod(wrIdx, slotSize, queueSize)\n }\n hash := mload(add(rdIdx, hashesPtr))\n\n // Update the proof pointer in the context.\n mstore(channelPtr, proofPtr)\n }\n // emit LogBool(hash == root);\n require(hash == root, \"INVALID_MERKLE_PROOF\");\n }\n}\n"}}