ETH Price: $2,086.91 (-1.67%)

Transaction Decoder

Block:
16352132 at Jan-07-2023 03:10:23 AM +UTC
Transaction Fee:
0.007622596574937252 ETH $15.91
Gas Used:
497,247 Gas / 15.329597916 Gwei

Emitted Events:

220 MemoryPageFactRegistry.LogMemoryPageFactContinuous( factHash=906091993A11041E4E739448D3855429A6274ED5426CE404159A75E3ABC2BD90, memoryHash=52161859948703845096275147999658633277161369610744394758169383592962346774072, prod=2967910582910068887978544813177466721561848471397460726328294896087020456248 )

Account State Difference:

  Address   Before After State Difference Code
0x28067505...8E73edECD
(dYdX: Memory Page Fact Registry 2)
0x99Ade43B...98e211FDA
15.713957629320693878 Eth
Nonce: 52633
15.706335032745756626 Eth
Nonce: 52634
0.007622596574937252
(Flashbots: Builder)
1.205015087964231937 Eth1.205512334964231937 Eth0.000497247

Execution Trace

MemoryPageFactRegistry.registerContinuousMemoryPage( startAddr=10002177, values=[44, 1143427927246206559330144931071343625371422111650814526192531814778869759745, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 1696952280587286237864668966496563363144725120182266875378986902295146701696, 1390726910323976264396851446996494490757233897803493337751952271375342730526, 2462228312948567944516835820597585952278964879772666798944281728965266572773, 724857486858536463136854784687427187188450016170731205132677003970043460282, 762142335139499746875036597439823431584756097252284996496593306411145281446, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 2424248767032949768222734640537270607334232340083563455886773387188587744292, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 2617839104017338146283100817355752135022140287931618894804336578162686539614, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 1137634925587126723145505405637357239154272713931730636131738280556574610039, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 2472987273247572208833972944138254139052265335513008338010015639412233728721, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 320715937824437041911891744486147102801213281982148861989808415865551951713, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 1181570290550200331778444255462468117821371009040491607272789351744191406159, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 2276181641412693259262390389674367561613416050120139006524040021006930461974, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 1183836733666917418720483584143059811342700463941301555079199861269845593587, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 1568855107974356013358748133927946801020688906312027029621513814469009756308, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 3225722629790012746611704153707156831473273429298484608241334968116631242020, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 2637107672857553842676787192651066997471463321669468187998369022073395556623, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 598939304805688938357760196630533045994739828669804001737829376786214673151, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 3082312317480796917548090990322504429472303192775344061271935385875921595218, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 375624280003289260050759506862581430762598753531253614236565810087528802533, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 2694680241356848290524211794677709231469849136935097615310821269257451481230, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 1297237956510034958352724387816941379812877615242334855032550032462376973381, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 2048243334570722827645621788812810234783084984769027815323143480105390822649, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 2266209103010899582952201125699234352989844484635305955044171439789015795445, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 189, 246930652783857782251838442103670756662366630621379341567502181154550565, 11, 69036229591699849960932814930274583219423937176044869651883289380133062597, 63105809608849976957025054235020, 206002616360383096345611846507153912436154012597220441886816839513414136510, 240155264430, 217220084042943934043295412551804878100253593337652225984163585784397531836, 10774754628635851016724254180295, 252790372279270528795442811830632250552751401009358076384586248315975361661, 487141034729, 482148859801725464274198147480840119334382080162606228723774290742111978842, 2771563010247410, 731009553143347574080655238666149040102619103132239422267183761870156583437, 75198845101050594547122928438721909499, 731009553143347574080655238666149040102619103132239422267183761870156583438, 112442720799, 860370950108688216340004790080337058268427944294306403669698046952904826247, 93263519222931616398, 1446821757104641781948757487033289620065803269090287896475220893178955257282, 1673016408, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 115531408176, 2318736887331368761321803003856896048755498951048464294335952677135793010967, 48541024974300, 29644248393509559569775158057453899908636831321596778793220591312181257163, 73786976294838206464, 64940065656808762257134016559305155413424435726898578671562936304466999477, 147573952589676412928, 84021291731845367250742295308628564338210276114808793405616966050755327929, 2, 482148859801725464274198147480840119334382080162606228723774290742111978842, 17750886125753314, 1458360317307722892324075707981695377849324581231948656656623188373599000464, 8520788306733, 103127924395527673396513569496033459377733677627787121046849728321072820399, 55340232221128654848, 136035059171648484065206163215932253186778925416552286679255899618009873732, 996124179980315787264, 183110083192843114766024334482987673360403044815079422050242323633057265948, 73786976294838206464, 197163059093301221345126591659910311310615224389475374342243922588266666810, 590295810358705651712, 221052815756921020690136267690854085380781333309619700283560327522447793348, 166020696663385964544, 237224226515367770828514282578358846168590100337312912659118601504788390247, 387381625547900583936, 251423235528416370796894424333440782028182689970058989038155863106492539774, 147573952589676412928, 265462568403027843118788722239619872423331319682674301792269554935756733373, 36893488147419103234, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 1563672576422918850564506150092036819309968525068313502302455251173901598124, 2, 277403487477235513669283676040560523482650789262699585558953562273980602219, 147573952589676412928, 298128761628879147656192823016542380183828802209715334556026263166893556135, 18, 96446384494424928024554530264991535126957950032484115631477011414934893238, 0, 118679380320721534633884800333456860092203738404054976575084859647943715832, 0, 288284820926446663711718674423803770267197823824541283839220628090662623227, 0, 397312842683629063611555482641763922558360597616274919840423907865450066783, 0, 610918033263353503254461543628301442249857210447965147973577462215276395256, 2395311008979816779423467862754183330776872205394852074885791570433188885591, 786442190772826719110264464630399996175111984354094640442150048554210919629, 0, 813819839279856701728391638639102416113318086657567321962298243759018089940, 2395311008979816779423467862754183330776872205394852074885791570433188885591, 1403491694875414594471818138407369976957121304622203609511067509593425371025, 0, 1567870018901580211739666967060746109333533708146476069040712794542155925452, 1, 1627443961412038637004075230490038690061859759543209702458771610020144316222, 2395311008979816779423467862754183330776872205394852074885791570433188885591, 2656677730335934916187424015098385234661038672213935012855818876876675515334, 2395311008979816779423467862754183330776872205394852074885791570433188885591, 2723963925754479257587170280920509923029907274692646195259034560110498193265, 2395311008979816779423467862754183330776872205394852074885791570433188885591, 3109238878282188757169830267944042424716907962727350190935829419081631414447, 2395311008979816779423467862754183330776872205394852074885791570433188885591, 3156348979386273545000489903269737912628680657354912690473512488972962208181, 0, 3187680150051091139183678990820746261577011047281480478619131575814032957157, 0, 3281776130188920649756649202546020369437462325528933789466177762046465603466, 221052815756921020690136267690854085380781333309619700283560327522447793348, 3612968003859530863776717781960847268848344777096090341368807891636067878248, 42, 3614652969498701307193009351156540722090793769417337162984747087416561640365, 2395311008979816779423467862754183330776872205394852074885791570433188885591, 311750082090008298097527011882267964249103316233626538416348909247630422823, 55340232221128654848, 318312489035507903492596504365785481541830762306201303961536151127216228413, 73786976294838206464, 320715937824437041911891744486147102801213281982148861989808415865551951713, 129127208515966861314, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 1280289508143353860834048581695448304008698865819995680790060683642088894613, 324863489675351057801690407680339501186452000249942592436584264984115233587, 92233720368547758080, 338738712511719699481793347196424707566294815274593785774119344176826948916, 221360928884514619392, 367197906183797993130452795711865096328910691665422431405262502990466134059, 7, 155082539558689579094930820457537605560250202889383976768599028600060638458, 3197150954878038686, 482148859801725464274198147480840119334382080162606228723774290742111978842, 4503837356193533, 568392453366548492808283557360581090679607133035478778508259630809050612971, 31358982189296, 860370950108688216340004790080337058268427944294306403669698046952904826247, 4611434928034864310782, 1450773348621475531073306325960351147940191236122574546481360435247650274113, 1673016408, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 4670060596, 2806844167603286233712169269103615528101159345887085314084882496350837826353, 9766545629703, 375624280003289260050759506862581430762598753531253614236565810087528802533, 18446744073709551618, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 822418186162731855150970091829463970364444665625853701268387869258884524334, 383515126600213451773162463999860654436380865883817773116068289596448633485, 12543785970122495098880, 385291772725090318157700937045086145273563247402457518748197066808155336371, 11, 98825239756614816983270276180368744138846281776833942936961586311426048972, 21808184913587471440506, 128513747348928107990927411614315435409311517136217840583116860020503172623, 289877598578007412190, 506749011643333666448861564371313181401007432922862912839864113837515283103, 149250000999999991154, 654570951647347405568317023887877977006047437173852252854263379553900581537, 6536574979403548120064, 1115085355229060027298921401427281022935557348986616398761662123433923437190, 7465263357242654148, 1138102585933080762687588574951940568393916737061955149298889590431930889549, 17900456898775058027112, 1504199171681107070999872148094895343086292231872443035473781004841920666947, 5059373068813156544, 1706750437114601506016330313029239575705231941625130042338934645445486414379, 1953, 2003933203918354282471425199631928872047717155051678303130651662755022255110, 2377186609465604776, 2650525587979760243536244492935258079594240371076596729522476320712808148636, 4611434928034864310782, 3549283585432744966226837532966797821666410147541946963389560104637648752386, 123017283000002833261, 405553771408786992497555755801974748363774629696087942702262915018487005005, 184467440737095516160, 412953294901020288206768823960210845214657503375249425676159031593606302453, 55340232221128654848, 425739074383085492127328880899319773787379853350844296058234092961993238375, 4, 155082539558689579094930820457537605560250202889383976768599028600060638458, 3218952740025843090, 860370950108688216340004790080337058268427944294306403669698046952904826247, 289877598578007412190, 1450773348621475531073306325960351147940191236122574546481360435247650274113, 1673016408, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 288812282, 428549195637110200064010878555537723129605431005152809623426652523283010519, 387381625547900583936, 457307339748846247769644398678022728989408368445652054924221903216649990678, 1383505805528216371200, 463948365718127183982485037310323446889047237297074797478102630699967609468, 36893488147419103232, 467359278613506166151492726487752216059557962335532790304583050955123345960, 6, 321751264442790402984935101055086840420519863546320125522244203922488951779, 17900456898775058027112, 321751264442790402984935101055086840420519863546320125522244203922488951782, 14238782695092161500, 1032717993920308306191823419406815870858725944687744986845677154805147281824, 93127927282028360781, 1032717993920308306191823419406815870858725944687744986845677154805147281827, 115211241146, 2115492923921523814468632200599040563669287468411561214414663525667701459652, 9236624624049102220, 2115492923921523814468632200599040563669287468411561214414663525667701459655, 11673895785, 469626291445619487188983000446708335626768643668973209222281552962104773652, 184467440737095516160, 506568662758087768735575470361932371337303610121517783405927082593222027683, 147573952589676412928, 514082411681774138432070937854779202381702792613700846907077992477045914047, 166020696663385964544, 516538318065272311110806539743149020710902382094099401980879246640566496525, 147573952589676412928, 530522900777933869993213681402497504620841207245677709238425793496890372003, 166020696663385964544, 536692657855152520460443461782557725899897708664643206546935449281399910005, 147573952589676412928, 598939304805688938357760196630533045994739828669804001737829376786214673151, 18446744073709551618, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 1235362286594111876899384630691752073919351673285426080683727232330833886236, 628001823903036635136274468471084662954207998962753073145071801192644745598, 147573952589676412928, 644348211814506042474156179265236819576904061485065933628075294692226429701, 147573952589676412928, 676028716993851673397918835131328481427799807821756534219643869301313604743, 10, 69036229591699849960932814930274583219423937176044869651883289380133062597, 31684993272296528329805503905797785365, 217220084042943934043295412551804878100253593337652225984163585784397531836, 88986866165791148742738033495875478486, 482148859801725464274198147480840119334382080162606228723774290742111978842, 591314522515881491586, 731009553143347574080655238666149040102619103132239422267183761870156583437, 232168043236334648363320249700979561521, 731009553143347574080655238666149040102619103132239422267183761870156583438, 149852, 860370950108688216340004790080337058268427944294306403669698046952904826247, 21808184913587471440506, 1446821757104641781948757487033289620065803269090287896475220893178955257282, 1673016408, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 17464327456989489530, 1682616122439700963125842779732081843652936160554716663941676487055655231372, 0, 2318736887331368761321803003856896048755498951048464294335952677135793010967, 4127333762645643664, 703337259580831536175962920371904457839378607329733326030554264137883525040, 12, 1699215062144128405790631176604374446082638831969769523641499229801002680858, 19760984408192932837153460072400670252, 1699215062144128405790631176604374446082638831969769523641499229801002680859, 238016491583090061359946047240069542025, 1699215062144128405790631176604374446082638831969769523641499229801002680860, 4640, 2188610570156158179122089594978076035038167016020956361056302124033947460844, 1, 2326597083206063661309841302636116793374098200913041082578933912875172942447, 1, 2583865123333879362246876735822956454656984744977868421034269532004001433480, 295322143595410610644753421087161375011, 2583865123333879362246876735822956454656984744977868421034269532004001433481, 20051233861419384835546943406001719919, 2583865123333879362246876735822956454656984744977868421034269532004001433482, 4640, 2669239532429880913222752390072138594884827635523944878347295998005427816005, 1, 3163546845067907969457191286456915152267908228765644593126671291688181821470, 83488199515364101319555294444096179008, 3163546845067907969457191286456915152267908228765644593126671291688181821471, 190699739197052293187190157923514822784, 3163546845067907969457191286456915152267908228765644593126671291688181821472, 4640, 711270399174529325543678517362296103790187303260626239116082977559525013295, 147573952589676412928, 724597789780320286510973770150706913128002698089108538611076341548684329883, 73786976294838206464, 727681900911292507458804610559778699894157581304773563970098898872752879921, 1, 680641068382147823690491849560675892800103278811133310055689865859989991742, 3, 737160728818572886823377126218910058266814504170901678392028820394193815106, 147573952589676412928, 741107005628771907185844155589006843143423500313413303110567026747555214195, 147573952589676412928, 746748532564260979877741819018318517513061993914952790771299427928665684083, 73786976294838206464, 762142335139499746875036597439823431584756097252284996496593306411145281446, 18446744073709551618, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 2694235295351800542647451392665676063707934772064140656605106582612802450448, 767441668366051802028580122106414856745462994852640483048457675423639288036, 110680464442257309696, 769694253695478589124761948036014556947025067838033455592078758122486446897, 295147905179352825856, 803079536302385203124200985976843852025562201905579195541607813148745635343, 55340232221128654848, 806038481236378815530941005638232006538639024221314156878750003364601044453, 627189298506124754944, 811421144806086291313143292075757947363052903521005831050376571490926464888, 36893488147419103232, 824105739269725655149083188888552188462267652672109175744028803790242203368, 147573952589676412928, 866242575610809715267666899221077888995867940976127586047906217346383284786, 36893488147419103232, 968094036956347547736200357542627982509861578720012390311875069763113158900, 221360928884514619392, 980641348758169158361564622616439166824113829417782360965256920656439161142, 42, 66349093937302979359286510892377444077036053824674340808329357457101415205, 478766579, 105190425903575494960793418071546831366358552715243946431306219517664640223, 478800095, 181689271127819029716662207302072722618025774784609370169644366859841620460, 0, 367580064677682742880554620079938392117118138712573844086017995919277195007, 0, 428650674642184865022893384444317084290408074248944933436649374096479233401, 0, 430968756370166604015793672241745370567046236160821294216288302462302551248, 0, 441344640849221860209759822103730846295627057001026345298614258639159165837, 0, 482148859801725464274198147480840119334382080162606228723774290742111978842, 2760007590190416, 565745925398567066426904613052892224678806147481378029432591526102532075882, 0, 697670845485794228064499059753069952439186778054115760206974114744495716437, 0, 782833801965819520746687359777114206424906916884064610013255351082084195507, 0, 820580139489932746310243065039722611623846373222977080843781834859635015978, 311590322165, 849383378649936458257677858724919311149459676551509006893546028693316103559, 0, 974264646110288954465714838517899051298067204604974106315950614788651301040, 0, 1117456469852211967676477551994944543459501046712144522725889109458974878508, 0, 1152727106211396259140091207827118600132265329261534079744841410197073637338, 0, 1211070274354628081452117772762698729958567518216889926845918413970363095888, 23968486320, 1236935133399772576831107584727715425925801820177215951656355203928680955486, 0, 1443405388289311574231110250392522139736811497305453357401698420568924556169, 0, 1484679250285395543655266267119211048996423824541528229262972967984790555874, 478716784, 1735406997336054397337596720969018426417949648981707266386785880670628048358, 478700026, 1749272124046260677887970801919602791433901416204192717365868783022035138808, 478733302, 1817052707574250250632212547017114778885904303952832353858496843714728995212, 0, 1888229111922114633841428239369812175593018433906119851207459406623933789478, 478683507, 1899552720198722771277162656835258340612323767506916486820863243712222171733, 0, 1941016969128234713337153376684751925207818121667929094144913222514111272444, 0, 2210055657767086463858338964911459768187835833995052700108631970695557993087, 0, 2222425713353155413095023697329910072986909257237566667250550181842332761779, 0, 2273257594522337472311375254681673534137756187878877501517520949219811500753, 478783337, 2278165820219289465916419572938941268259845751889823329193269062018827167443, 0, 2378327258535977090996593168833111181470751833015955733443534038424980796436, 0, 2379945981099147838425741140892857524659977124566672673532276079236354782740, 0, 2475845298110272963620122408456467826958206675967536741956963735881547932247, 0, 2621291574536100083697461552818500160100445764347932591081531456402014226324, 0, 2694283251347168012993017327698973602895072842793209695553181501212553233101, 478633472, 2861956277613293171274347457454307154725021149314538628891257768478457701324, 0, 3088869197428380221208718049781962173929661010473290246192409326092597173704, 478750060, 3188015686232832095444670761195702161329087167438944499436372763156383360046, 478616954, 3218135418458624116389483179899967811233032534593823535554644713824269902938, 0, 3249294497880988998712931941204572343008964132277178714207356412852815606506, 0, 3443323407556516364245317238893222232795603132894198811036099756465379334074, 478666749, 3560748751796305109926316490614590626312325029699608112617882372236700010839, 478650230, 1005641463139525263451460480488164588225364955321730482132661116739994520435, 147573952589676412928, 1038505336670485273451890540160761990222029219726730515210681223563748995513, 350488137400481480704, 1078483138947601010183959984864409753831074290269155891848200313866266106610, 147573952589676412928, 1100173519389938114706432104771410554630218844762989361227096721304048769987, 147573952589676412928, 1130269012831805887280111011648838710284596359024266908686608542999882176748, 1, 2680633255777880901886487376943264491821654340889451250807840622156489015287, 0, 1137634925587126723145505405637357239154272713931730636131738280556574610039, 18446744073709551618, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 3534376356488999952331838601462942241692009817427896691582296709900998104380, 1143427927246206559330144931071343625371422111650814526192531814778869759745, 18446744073709551618, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 3617681102087199325260489628517720982489543298162989525311823752854444464301, 1160555744684369144893927601365817457865359786599174021015399730308184004004, 73786976294838206464, 1167308997181988172794199355360948221122326552364796026686426545993934674029, 73786976294838206464, 1181570290550200331778444255462468117821371009040491607272789351744191406159, 36893488147419103234, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 1320494727771355845656597901567680220472243090100309092902517116478433805306, 1183836733666917418720483584143059811342700463941301555079199861269845593587, 18446744073709551618, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 3115075001380509866812581542358844644621587509866347304834413629395233823645, 1185794882487673337086881643732037264584112289543466737462106789575680792538, 110680464442257309696, 1203547651708349271448768365881041305352887755542740175005943917204658012493, 1, 3529846410482810186200098618935183620847697251796602448347288123140312255260, 1, 1287007982458420489202076269717151635955183234738881878702186293938408693573, 129127208515966861312, 1297237956510034958352724387816941379812877615242334855032550032462376973381, 18446744073709551618, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 1881299681068905222474168578707688965986968644551259493516015887863314439236, 1309420966095155553022316424338646826909794490643136865096757336367485310949, 147573952589676412928, 1321404547370823421944277759589803129586947888489751844755380383527071762619, 147573952589676412928, 1367030537986731653709805417847897102253973616451607261819695323166312404735, 221360928884514619392, 1372882548073012799515697292915208968741728807374701434035020081703254271884, 20, 66087940047987351303406285027476311248319333924496739561007606645229045437, 338738712511719699481793347196424707566294815274593785774119344176826948916, 114684522822749325770135661270900809221014529227497040442817026007142217468, 46616, 131275950039622275486312641084425028226283327599485045354283081453444041619, 2726426444637179173072992147021329249968512650854144892059398161295906795038, 147995611255773588279950026594685360246368973665518859648658370804744505732, 46616, 1174192452782534138840305590063828371147332478644069496867974192525869986462, 2188133553501960157633969353382096734553400897334995049594851865777949774704, 1583432600392786713333775776918159528901648343337401656598896395410672302657, 2, 1583432600392786713333775776918159528901648343337401656598896395410672302658, 186294699441980128189385912026739972940624907351820636845284730798459219555, 1583432600392786713333775776918159528901648343337401656598896395410672302659, 24468952910429554252983018327753713278553160542734386, 1605635662638661101178486757191404789385290207478431043311135385427791335242, 1, 1825445524108059133665007196789048322215471351627913815135984614984698554837, 320715937824437041911891744486147102801213281982148861989808415865551951713, 1923587097221638423290125579614723739955204805367756004438662170246857696257, 2, 1923587097221638423290125579614723739955204805367756004438662170246857696258, 186294699441980128189381862495366511453426556760498563919873787301991305572, 1923587097221638423290125579614723739955204805367756004438662170246857696259, 26673017287998695735489153804262922398321666590011723, 2080065250840758218680338855717186348515684470607591486634016601013596561007, 1, 2142926773232116448491359761228822949761848940051872045667818041959663588459, 2, 2142926773232116448491359761228822949761848940051872045667818041959663588460, 186294699441980128189385596718752923682485799241473440861201746593430460760, 2142926773232116448491359761228822949761848940051872045667818041959663588461, 18510358931175889169884984504449513138764842682437233, 2626668028448702485011945451380461393472292147284570039878774476520608507787, 2, 3251538881910093836393993696354493339290895069129975764026263844956409085900, 0, 3555287593645268948441915030923909692337018464724390996222652612002581176847, 1, 1443256991455002012489707101299531631756053740297292457273962854749486458643, 202914184810805067776, 1457735542254534961245879845382529408407964919977094126167470909724308013904, 140010787519455496765440, 1477621155111399194841607020590213514937912124948726265152855515153711380257, 147573952589676412928, 1477958061776343908512132920404358987407467282924901853957251486123263480942, 129127208515966861312, 1491281952647383486033050921623520099481016132453510131481211470811059354813, 55340232221128654848, 1497111195782287473946848242214563729502762467685404114429572272682642987953, 147573952589676412928, 1514069400567134593623241595556740631054152257070117596469635093985516492230, 92233720368547758080, 1516725202224296228051725837391977261346444886502603289048900197047533121125, 147573952589676412928, 1545148138819259169345841007550363568950102124191240932556305306116477129675, 92233720368547758080, 1546357268135039797160006326589972524451687803316058093943530891944161681102, 18446744073709551621, 28313022832526220435919396777106196834975646952251820764508704287550374993, 58256001704608589532901430, 318282615767336963149749833198806753140642073758831345755744923003368466034, 345600, 550557492744938365112574611882025123252567779123164597803728068558738016655, 0, 880241901581652276300822791360025363358516560758384169656351614433986727311, 2102952380429910416796859096437893090601124082200675190674115565540528193980, 880241901581652276300822791360025363358516560758384169656351614433986727315, 1, 1548543509850472990253845755423705523889091343471712563908810532965589863095, 147573952589676412928, 1568855107974356013358748133927946801020688906312027029621513814469009756308, 18446744073709551618, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 1789248161906717909865117863700749604257009439348386193666793533145671790570, 1644735411940565992417762416355288444388417295664691992426087163630553004507, 36893488147419103232, 1650103323470009744527249614419046611372669132168696087272524657342357983336, 276701161105643274240, 1655845894865575334688186506486808264835446524530948669799362065008628016363, 221360928884514619392, 1684500945003375094651479195073237525353090950861675534217735828619909704801, 147573952589676412928, 1696952280587286237864668966496563363144725120182266875378986902295146701696, 92233720368547758087, 28313022832526220435919396777106196834975646952251820764508704287550374993, 58256001704608589532901430, 318282615767336963149749833198806753140642073758831345755744923003368466034, 345600, 420809302088575566661732159258626015934899866033455122060647015585080981641, 1696952280587286237864668966496563363144725120182266875378986902295146701696, 880241901581652276300822791360025363358516560758384169656351614433986727311, 1333937629665405678852389728552304436915795604948848220823358711680744726886, 880241901581652276300822791360025363358516560758384169656351614433986727315, 1, 1596797181605835465375385856756254615380245139672087060603160900530960374661, 1, 1662968741416162122709795668327058413808168082301235317239158738933362048792, 1665095769147373104817037689867011641318726238529317742642661963529240154211, 1730843735206909102151873616508572655403586088642065623634736218019865421970, 5, 155287036224941278673048898811903080106685732735976657883045403235053576225, 1000450986763821975, 1865260297076691547314904828635635891752551249106930403121690209571541790037, 3230447486821097, 2558666525990586205664073414813657982378883608041270823950710827282323687914, 1673016408, 2968419558496500917523855132943449701082567859018094568151423360962418967759, 1001031134335517111, 3292783328031196147794727491483987945757150386459531706639568971280315082443, 219151610267283, 1766854722920889510286912148298563654018113327773207963561371468227576687662, 147573952589676412928, 1800183467442795704834351108856352214553121056971130626817075086655396593650, 55340232221128654848, 1828433647114967809176092738749168281864044425518747333523955517789655911852, 110680464442257309696, 1840631118098852257314009702857924957731981054202475168442361640315664009536, 6456360425798343065600, 1842410739340708474435776913773939618593210949806007090366321173296735822604, 147573952589676412928, 1845374652591302522280067136656974150702656917589814517106815266021681331866, 73786976294838206464, 1865087347327005138825574120292363544645653480122826741425112488593153699332, 2, 482148859801725464274198147480840119334382080162606228723774290742111978842, 294144749403688, 1682616122439700963125842779732081843652936160554716663941676487055655231372, 0, 1885700244799638965261593599406209215328541113860548105070772999886731022243, 1, 680641068382147823690491849560675892800103278811133310055689865859989991742, 6, 1955014856316031219551106924170587043350472606692170039280037665286686758967, 73786976294838206464, 1976116259487849312492355695320380942153209908997880779234707344294669942230, 4, 155082539558689579094930820457537605560250202889383976768599028600060638458, 2609297646883760, 860370950108688216340004790080337058268427944294306403669698046952904826247, 1405277826224892087, 1450773348621475531073306325960351147940191236122574546481360435247650274113, 1673016408, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 1739899878, 1985747568956074234204719897928496300186778866545231912184260710022333645657, 184467440737095516160, 2000031840833493536440815036539786941974305919381618969872893526239637868210, 12, 57710803628123934738294484807731439060979305060159250593821916838634699440, 1, 473434589049321578451808802462973805661945717081342353954145899239363111522, 2816873442989236847978911749117210040458997899422818276913307686380384078824, 613284673524558615169506299008783063833091923562230061568321480529671587241, 1, 1174818932869463045958929167767551911637428101985049754185415268052609229529, 25, 1635910137303138938487811819595705925046717684426713370055409867175157417217, 0, 2414390358669163205724379170922942778996202318202064555775585752437975786339, 0, 2461066508901277548899991030089111914585369673562109348718488426710740263516, 1, 2822809031319031883046627032261944299519501168803910936329930559203379426141, 1, 3053682581570382896696741053631809282170497258293024719358442353131795163164, 1, 3115916063801803538075149538897739834501062702775823490643245531364161654192, 1, 3424118241015041141895621316804952359775079895532951553458237632227997136584, 1, 3551164876695855543415522510004217552063716473174178919185415482873533222276, 1, 2012387058040211114802888695026885592558096858002879540929317056857186665667, 1678653710707569197056, 2036488744656008508844329605741652878424232294898402669296345974068123078542, 147573952589676412928, 2037143189184459591671341673969366030234457385522657720759367583063115065479, 1, 680641068382147823690491849560675892800103278811133310055689865859989991742, 12, 2048243334570722827645621788812810234783084984769027815323143480105390822649, 18446744073709551618, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 3440936486802757632175735951593762902199314479201154432725199189479012997849, 2087021424722619777119509474943472645767659996348769578120564519014510906823, 238, 22277641233901991821347318443424689246732292254151994515217877903058651711, 204090121721440, 31704902930368140112658001717049909418938089408504067588522068048675215892, 1328549847834986, 66349093937302979359286510892377444077036053824674340808329357457101415205, 11994151897495791, 79457496281677387749234335151491762336299901301344337505557842034791056699, 5520000000000003, 105190425903575494960793418071546831366358552715243946431306219517664640223, 12055666969416956, 124405103041235923762578981151837663060430815951166100395545926649825224776, 3229249748516152, 125821470057485706653266013203208094494800108867704995782809385419903856668, 5254965550990384, 159094235392585313059606583555758121928176349607915249964404645544399910402, 1004404625138, 179713030914778878865947257012061628481308530760351117767744427854161165967, 99391565606831741, 181689271127819029716662207302072722618025774784609370169644366859841620460, 12222647425192655, 194475512988343245271854449012147305767275860199061621623158275306369433865, 1974302484739137, 194787891059999964331592219698246479523205003947700083403368766861564733141, 72584438730238248, 201350241601577766365697293755477846333370256093309178793839723555217709856, 46553200239680544, 206002616360383096345611846507153912436154012597220441886816839513414136510, 61340511805252885, 222486485780775062472669391632037591145977239758889826952694295375367149565, 1974302484739137, 242093197055058173197224098811697140130707085881617974523799967021472696878, 54739061948436936, 252790372279270528795442811830632250552751401009358076384586248315975361661, 30584616489722525, 256374719779139741060433478074172338563653900918206788326011129725934959305, 22520374513312519, 307852089217618976872244113233340640645334651555057447406403725112520098082, 1984782165234957, 323994779981528176687403415066339683202299263441259166022632964860473055424, 14868703914522696, 332569282225391626484531371480479593126853988122891812250706424316161249507, 368703914522696, 354056590800734425244060894440320140472640865559352032128949761402114204655, 523918379767135, 367580064677682742880554620079938392117118138712573844086017995919277195007, 12223838408736575, 382050794949217837977874281945788199559827986873463904202173033531193616404, 10858703914522700, 402203818018003161230395989487321866767371283189591635162574585819009405729, 123292438912493392853, 428650674642184865022893384444317084290408074248944933436649374096479233401, 13061209696888263, 430968756370166604015793672241745370567046236160821294216288302462302551248, 4151713935122451, 441344640849221860209759822103730846295627057001026345298614258639159165837, 13060750441040022, 457377651111563798391283354184159300225680924293377371715069138859968579950, 295395392855852715, 482148859801725464274198147480840119334382080162606228723774290742111978842, 3101700460340068979295, 528924422315663367549276966357861591402110163449613804769781401631241890944, 578919914692052482, 530450410226721762434775131623762598171626822810909340870307009257679703008, 89298542230468920, 546581558892338486735264727375536024961588859417326566247086257712487826751, 45476716185943082, 565745925398567066426904613052892224678806147481378029432591526102532075882, 13060062582943108, 568392453366548492808283557360581090679607133035478778508259630809050612971, 2494398729705687, 597420404441808449011364150755906351344583469413203177413298362222825420408, 34921369072351683, 612737575275438932055294422022098230449528101460064023139253495398762035621, 75505559004927322, 619449020899886271854386404223514526540383650984344332351330311202225006761, 5317932931828156, 628109595431490593261987212481781127190506675881300341125018015992845604474, 1282804251446256, 646608795913760120771899260292518323307621613440140257054890249498569457534, 8528386932536026, 657533572842826350894597868992571239613965822313669397522511695148857268669, 2970988258800416082, 697670845485794228064499059753069952439186778054115760206974114744495716437, 13039113020761557, 722152846214425388967228118819971147207168413279912429981346277402994048314, 33260677151400879, 736096612412768757777397628460502734601754933585760847135473936754952772589, 4858703914522763, 780558680270735257855552903536423240718723907408422573890068556201173185758, 9724248673130212, 782833801965819520746687359777114206424906916884064610013255351082084195507, 13059589447091268, 792985955619778553349299217630311706976597674370358120354024088100275525617, 58023482584889116572, 820580139489932746310243065039722611623846373222977080843781834859635015978, 142100162842805553, 849383378649936458257677858724919311149459676551509006893546028693316103559, 13042456889583481, 880392625386235333507346032566076439390612848838817286977238310498013443704, 1107762556825446, 887505755123858077308286083782373037803187185496939373227823976620179979810, 22791748429195473, 894494740565075254114805131136947374253847362485384440542724273900555103247, 18388043908308048, 898761996713120463261335615554386363605539879952005790622381412265394868808, 340282366920938463463374607431768211455, 898761996713120463261335615554386363605539879952005790622381412265394868809, 340282366920938463463374607431768211455, 904211283965473761288156450141376987257029464073680515775494653064252896121, 500000000000000, 929472723231440120938332214482457012331298280857162989529798363194994901330, 340282366920938463463282037431768211455, 974264646110288954465714838517899051298067204604974106315950614788651301040, 13060865254538419, 1004198188081378403373077322181708495612662628132048865509174363611341184250, 8505693965761, 1032601248907542615258449229738808602783644384825846850790096954510958828421, 45538261360304143, 1052379141674878033093438417056041072472380025765798593561695803364819817058, 10000000000000000, 1069914512980818541310416461798350637943102047413546406986649206859243516781, 22101176397209106, 1084439362151503632259379285891025094948268369412284910762844866335659002085, 611466240453, 1115279073485494352151912114346258010338449404352592640943675502659110130951, 340282366920938463463374337431768211455, 1115279073485494352151912114346258010338449404352592640943675502659110130952, 340282366920938463463374607431768211455, 1117456469852211967676477551994944543459501046712144522725889109458974878508, 3973440338879056, 1152727106211396259140091207827118600132265329261534079744841410197073637338, 12224562527963184, 1183885709768818401460011308385133536534136985734437362622067795586383542540, 340282366920938463463374607431768211455, 1183885709768818401460011308385133536534136985734437362622067795586383542541, 340282366920938463463374607431768211455, 1195163485343446635214223764838029455128175853158530846375284043859882614473, 18369593741737905, 1211070274354628081452117772762698729958567518216889926845918413970363095888, 2715533181296266, 1216645980112608405775830566997152520867257708979450578559073691532259861053, 1062989091484345, 1216870908333219866436330141390514259229384846117916197021220072648215289983, 566079452051994132, 1225343044516778929889140842243222111026228266916871809346041305346578527826, 2948354126638344, 1228248302892514080190675724793776915044498707530364993609324541344553260704, 6287830627002, 1236935133399772576831107584727715425925801820177215951656355203928680955486, 4151211265689880, 1242961667502489982137566440052763825675805717062548777383918840762225236717, 917586259627016880, 1249120860965796989929381392012302904511913171711698877135693954562641037530, 6331744987405, 1266820626410028177326272121865924261542617047649021979581357136139299006263, 7980174612159, 1286292630924943677125075491931201253113725503489866804246930743040596201194, 4186268065859263382, 1298811118990702436328122259774772564584978734189387655838277539541470276640, 93000000000000000, 1320232314355409233189409340887596203249112018931840907090409690030748420543, 11190122122458325, 1330357911284980772469519496451618267470081642369356629586517095851301250103, 7960189871224500, 1368871041466334677211829927271455364419723415599255768861733708349271655907, 5557896428300601, 1374871419107706444678280165740217201846960534738354876692786118910180265237, 8505693965761, 1379561444525261029098205136503544078537532679298076854960352976051840457085, 6498666734724739, 1388347388118324085536824809218166106264853174015784451438851832112394976537, 62918700250088, 1422431712154221163893225861705254949170190172245081779609387637829677137402, 1467081865185370, 1429123164114303659163766474118291297372706226068394918442012283207467056810, 18450566371440340, 1443405388289311574231110250392522139736811497305453357401698420568924556169, 13060507196695644, 1484679250285395543655266267119211048996423824541528229262972967984790555874, 11057090669151876, 1518786662809535025666407252440251829065784222381277142484438569379362046850, 1918813612162507258, 1545385655800757522177861217495707469485559390486383746310751878195260241822, 5620319108514216, 1548358905463889631965572012381805048717816719351540207323998084563311422000, 500000000000000, 1551295464932725588329544881955942548326391922317197183991608023295022187629, 5220625857272315090, 1572625741285213004731361678027466899656616935024678997763509149929385071919, 166437867641102, 1595517802378557429129650421348658636161467942764377925579567378776951665218, 21385837466457206, 1597515413631289340063067014854816898878403317281841766521735815766855104905, 3617546716937239, 1600032792156592552261293018888165665525153888060252452451623961771943844522, 9705631564390170, 1649637075113774915027306193315202958293296063927621391602095549911622772135, 1182629716139382, 1650252325342278732440095565797435761507604668927172681110211164115239059401, 5826675803988760, 1652239641646305300575579602320743469502857623546232173982230148497915557877, 6732168761480604298, 1682616122439700963125842779732081843652936160554716663941676487055655231372, 2938696305314615, 1695987450550443427300022631300920189702625937534354804002468130343059777075, 66838899115498866, 1714309106533579681143081423620266872091296158812002240302629181552261193522, 868703914522696, 1721597220826937541657887555997539805968887515245235100587638522340018194732, 511601188364269342, 1735406997336054397337596720969018426417949648981707266386785880670628048358, 11056822924313039, 1744594547916028369388509251096729992937129871814783977003867211598705361047, 7912658799063, 1749272124046260677887970801919602791433901416204192717365868783022035138808, 12056015725038635, 1781646500031547897843925177388543551472814314308425265501221313012182231916, 15372461866425, 1800145955748138101062017668109106148413084370646649687836068623981961180623, 22744654558756889, 1817052707574250250632212547017114778885904303952832353858496843714728995212, 12223821688929714, 1828085787862695356202010773789136452399253007766476449716858361677688393471, 1974284899759575, 1840181302630197216736448699824220004964975261847035538319844130732817594446, 1974284899759575, 1888229111922114633841428239369812175593018433906119851207459406623933789478, 11057291227738853, 1888838098264709643180541551353939687414664252736289829724782440721776625540, 6660039907450972, 1892264461723800639200130878739651406945542458925101723841831863480544174947, 1974284899759575, 1899552720198722771277162656835258340612323767506916486820863243712222171733, 12222867405007056, 1940791000146432930802100462663445381362697460365620538212126286807285404653, 13372975700285, 1941016969128234713337153376684751925207818121667929094144913222514111272444, 4058367009109892, 1941628257377679610414551193650098127918655755565712988275335278770520877355, 3824098150514249, 1948254167133089823327413568637655423477241543952134180117845277390456079441, 340282366920938463463374607431768211455, 1948254167133089823327413568637655423477241543952134180117845277390456079442, 340282366920938463463374607431768211455, 1952489446076277864207709817308875989378567239790521371652989363825141409998, 1974284899759575, 1971374028779529037826596259173865717766232238287144290325564535547161695710, 9551869323311734, 1984204866861146331833477874182436390508511877286230880031921155006015136060, 17617740426494642, 2003561682757252155975041380203972803926874678969350866608423958464534305068, 8559637229763156, 2008288664448329457681628269902766427236278382345741933816948869097868766778, 89674781910833648, 2013454934109602389656720449090466593189139657232418160661519395137003700744, 89484962308301461, 2027193724548570167474241386150281709135932050450164978059757501698204332754, 89399956638140994, 2039192972284091102090823279465792372364545905248757076637132094071967017632, 10955131588524449, 2080037615531541424052627774131776954053136160026366393532422137005078726123, 340282366920938463463311507431768211455, 2082332565896149669096986593843450666768575991251296089487018576539152871154, 116603334601169624501, 2095677469019083103022611424209589939334899314717931028320642911938589857174, 8505693965761, 2109699638369276071162398899942446894014030801705879401661286277805418974096, 2727478834584654, 2109895075998154347912734724214053662672952430586634509994236792015799104546, 93263519222931616398, 2119821028778997585275221921269705834311460395205948843969984166068157233609, 5788554075840883, 2122290784575048428693959260234774041049086049217544556235431364470388046510, 3276517118998360, 2165068172781813775914698746722864821182624635729263432749575481585877215540, 4868703914522723, 2180927851618083046856263481012920589421673818132132484250111564212549245203, 21765849889971892, 2210055657767086463858338964911459768187835833995052700108631970695557993087, 12223373495294502, 2222425713353155413095023697329910072986909257237566667250550181842332761779, 13059802407657745, 2241314577577302629273218380426751031169316010294653513144342672374584390058, 25322417258327976, 2261368756317980644682562322165328437153541103811393251062449145023386443981, 340282366920938463463374607431768211455, 2261368756317980644682562322165328437153541103811393251062449145023386443982, 340282366920938463463374607431768211455, 2273257594522337472311375254681673534137756187878877501517520949219811500753, 11057399155983937, 2278165820219289465916419572938941268259845751889823329193269062018827167443, 13061080300619792, 2291203060842194227970820769010210115812141417719459053842844417124019982535, 12088893338197456272, 2304860482753858172164437251738458313907612705484474016824240914857588163819, 893258955663188, 2309746277804135658585982316275395365118496004855031296640971045807370611024, 7580938390047, 2337919786715290031230901177095702722911391600053123818224598794006173580670, 8505693965761, 2347992921625348757453229892142140941717242894856439787094688158514714339866, 6958761238890236, 2348433169301553940004561138045512538776712106214606469606188560121634991974, 456884674887865, 2378327258535977090996593168833111181470751833015955733443534038424980796436, 4151658314714808, 2379334544397506602822080563022013408802136117610950871004111600177374490289, 1974302484739137, 2379945981099147838425741140892857524659977124566672673532276079236354782740, 12905160710254615, 2419763288310090467466645465942723516356787169401614904953760547068997240637, 89858051545726190, 2428766774058008270820997910643961112645345588554695665224965086113638435205, 4868703914522696, 2433659584868108448525596594427275488580803213219772400599184824330234511751, 960878203568694628, 2440252828302488155467565897642201170114765046977421236507110169506006509291, 62918700250088], z=1237411705490934676451754888782807144824034362601772880098376296769763669168, alpha=3039586842814229524160752528918840053733091775359451885052508385591480804034, prime=3618502788666131213697322783095070105623107215331596699973092056135872020481 ) => ( factHash=906091993A11041E4E739448D3855429A6274ED5426CE404159A75E3ABC2BD90, memoryHash=52161859948703845096275147999658633277161369610744394758169383592962346774072, prod=2967910582910068887978544813177466721561848471397460726328294896087020456248 )
{"FactRegistry.sol":{"content":"/*\n  Copyright 2019-2022 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.12;\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 = false;\n\n    /*\n      Checks if a fact has been verified.\n    */\n    function isValid(bytes32 fact) external view override returns (bool) {\n        return _factCheck(fact);\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) internal view returns (bool) {\n        return verifiedFact[fact];\n    }\n\n    function registerFact(bytes32 factHash) internal {\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() external view override returns (bool) {\n        return anyFactRegistered;\n    }\n}\n"},"IFactRegistry.sol":{"content":"/*\n  Copyright 2019-2022 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.12;\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) external view returns (bool);\n}\n"},"IQueryableFactRegistry.sol":{"content":"/*\n  Copyright 2019-2022 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.12;\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      Returns true if at least one fact has been registered.\n    */\n    function hasRegisteredFact() external view returns (bool);\n}\n"},"MemoryPageFactRegistry.sol":{"content":"/*\n  Copyright 2019-2022 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.12;\n\nimport \"FactRegistry.sol\";\n\ncontract MemoryPageFactRegistryConstants {\n    // A page based on a list of pairs (address, value).\n    // In this case, memoryHash = hash(address, value, address, value, address, value, ...).\n    uint256 internal constant REGULAR_PAGE = 0;\n    // A page based on adjacent memory cells, starting from a given address.\n    // In this case, memoryHash = hash(value, value, value, ...).\n    uint256 internal constant CONTINUOUS_PAGE = 1;\n}\n\n/*\n  A fact registry for the claim:\n    I know n pairs (addr, value) for which the hash of the pairs is memoryHash, and the cumulative\n    product: \\prod_i( z - (addr_i + alpha * value_i) ) is prod.\n  The exact format of the hash depends on the type of the page\n  (see MemoryPageFactRegistryConstants).\n  The fact consists of (pageType, prime, n, z, alpha, prod, memoryHash, address).\n  Note that address is only available for CONTINUOUS_PAGE, and otherwise it is 0.\n*/\ncontract MemoryPageFactRegistry is FactRegistry, MemoryPageFactRegistryConstants {\n    event LogMemoryPageFactRegular(bytes32 factHash, uint256 memoryHash, uint256 prod);\n    event LogMemoryPageFactContinuous(bytes32 factHash, uint256 memoryHash, uint256 prod);\n\n    /*\n      Registers a fact based of the given memory (address, value) pairs (REGULAR_PAGE).\n    */\n    function registerRegularMemoryPage(\n        uint256[] calldata memoryPairs,\n        uint256 z,\n        uint256 alpha,\n        uint256 prime\n    )\n        external\n        returns (\n            bytes32 factHash,\n            uint256 memoryHash,\n            uint256 prod\n        )\n    {\n        require(memoryPairs.length \u003c 2**20, \"Too many memory values.\");\n        require(memoryPairs.length % 2 == 0, \"Size of memoryPairs must be even.\");\n        require(z \u003c prime, \"Invalid value of z.\");\n        require(alpha \u003c prime, \"Invalid value of alpha.\");\n        (factHash, memoryHash, prod) = computeFactHash(memoryPairs, z, alpha, prime);\n        emit LogMemoryPageFactRegular(factHash, memoryHash, prod);\n\n        registerFact(factHash);\n    }\n\n    function computeFactHash(\n        uint256[] memory memoryPairs,\n        uint256 z,\n        uint256 alpha,\n        uint256 prime\n    )\n        private\n        pure\n        returns (\n            bytes32 factHash,\n            uint256 memoryHash,\n            uint256 prod\n        )\n    {\n        uint256 memorySize = memoryPairs.length / 2; // NOLINT: divide-before-multiply.\n\n        prod = 1;\n\n        assembly {\n            let memoryPtr := add(memoryPairs, 0x20)\n\n            // Each value of memoryPairs is a pair: (address, value).\n            let lastPtr := add(memoryPtr, mul(memorySize, 0x40))\n            for {\n                let ptr := memoryPtr\n            } lt(ptr, lastPtr) {\n                ptr := add(ptr, 0x40)\n            } {\n                // Compute address + alpha * value.\n                let address_value_lin_comb := addmod(\n                    // address=\n                    mload(ptr),\n                    mulmod(\n                        // value=\n                        mload(add(ptr, 0x20)),\n                        alpha,\n                        prime\n                    ),\n                    prime\n                )\n                prod := mulmod(prod, add(z, sub(prime, address_value_lin_comb)), prime)\n            }\n\n            memoryHash := keccak256(\n                memoryPtr,\n                mul(\n                    // 0x20 * 2.\n                    0x40,\n                    memorySize\n                )\n            )\n        }\n\n        factHash = keccak256(\n            abi.encodePacked(\n                REGULAR_PAGE,\n                prime,\n                memorySize,\n                z,\n                alpha,\n                prod,\n                memoryHash,\n                uint256(0)\n            )\n        );\n    }\n\n    /*\n      Registers a fact based on the given values, assuming continuous addresses.\n      values should be [value at startAddr, value at (startAddr + 1), ...].\n    */\n    function registerContinuousMemoryPage(\n        // NOLINT: external-function.\n        uint256 startAddr,\n        uint256[] memory values,\n        uint256 z,\n        uint256 alpha,\n        uint256 prime\n    )\n        public\n        returns (\n            bytes32 factHash,\n            uint256 memoryHash,\n            uint256 prod\n        )\n    {\n        require(values.length \u003c 2**20, \"Too many memory values.\");\n        require(prime \u003c 2**254, \"prime is too big for the optimizations in this function.\");\n        require(z \u003c prime, \"Invalid value of z.\");\n        require(alpha \u003c prime, \"Invalid value of alpha.\");\n        require(startAddr \u003c 2**64 \u0026\u0026 startAddr \u003c prime, \"Invalid value of startAddr.\");\n\n        uint256 nValues = values.length;\n\n        assembly {\n            // Initialize prod to 1.\n            prod := 1\n            // Initialize valuesPtr to point to the first value in the array.\n            let valuesPtr := add(values, 0x20)\n\n            let minus_z := mod(sub(prime, z), prime)\n\n            // Start by processing full batches of 8 cells, addr represents the last address in each\n            // batch.\n            let addr := add(startAddr, 7)\n            let lastAddr := add(startAddr, nValues)\n            for {\n\n            } lt(addr, lastAddr) {\n                addr := add(addr, 8)\n            } {\n                // Compute the product of (lin_comb - z) instead of (z - lin_comb), since we\u0027re\n                // doing an even number of iterations, the result is the same.\n                prod := mulmod(\n                    prod,\n                    mulmod(\n                        add(add(sub(addr, 7), mulmod(mload(valuesPtr), alpha, prime)), minus_z),\n                        add(\n                            add(sub(addr, 6), mulmod(mload(add(valuesPtr, 0x20)), alpha, prime)),\n                            minus_z\n                        ),\n                        prime\n                    ),\n                    prime\n                )\n\n                prod := mulmod(\n                    prod,\n                    mulmod(\n                        add(\n                            add(sub(addr, 5), mulmod(mload(add(valuesPtr, 0x40)), alpha, prime)),\n                            minus_z\n                        ),\n                        add(\n                            add(sub(addr, 4), mulmod(mload(add(valuesPtr, 0x60)), alpha, prime)),\n                            minus_z\n                        ),\n                        prime\n                    ),\n                    prime\n                )\n\n                prod := mulmod(\n                    prod,\n                    mulmod(\n                        add(\n                            add(sub(addr, 3), mulmod(mload(add(valuesPtr, 0x80)), alpha, prime)),\n                            minus_z\n                        ),\n                        add(\n                            add(sub(addr, 2), mulmod(mload(add(valuesPtr, 0xa0)), alpha, prime)),\n                            minus_z\n                        ),\n                        prime\n                    ),\n                    prime\n                )\n\n                prod := mulmod(\n                    prod,\n                    mulmod(\n                        add(\n                            add(sub(addr, 1), mulmod(mload(add(valuesPtr, 0xc0)), alpha, prime)),\n                            minus_z\n                        ),\n                        add(add(addr, mulmod(mload(add(valuesPtr, 0xe0)), alpha, prime)), minus_z),\n                        prime\n                    ),\n                    prime\n                )\n\n                valuesPtr := add(valuesPtr, 0x100)\n            }\n\n            // Handle leftover.\n            // Translate addr to the beginning of the last incomplete batch.\n            addr := sub(addr, 7)\n            for {\n\n            } lt(addr, lastAddr) {\n                addr := add(addr, 1)\n            } {\n                let address_value_lin_comb := addmod(\n                    addr,\n                    mulmod(mload(valuesPtr), alpha, prime),\n                    prime\n                )\n                prod := mulmod(prod, add(z, sub(prime, address_value_lin_comb)), prime)\n                valuesPtr := add(valuesPtr, 0x20)\n            }\n\n            memoryHash := keccak256(add(values, 0x20), mul(0x20, nValues))\n        }\n\n        factHash = keccak256(\n            abi.encodePacked(CONTINUOUS_PAGE, prime, nValues, z, alpha, prod, memoryHash, startAddr)\n        );\n\n        emit LogMemoryPageFactContinuous(factHash, memoryHash, prod);\n\n        registerFact(factHash);\n    }\n}\n"}}