ETH Price: $2,097.04 (+0.53%)

Transaction Decoder

Block:
16255920 at Dec-24-2022 04:54:47 PM +UTC
Transaction Fee:
0.008608745033102088 ETH $18.05
Gas Used:
500,031 Gas / 17.216422648 Gwei

Emitted Events:

247 MemoryPageFactRegistry.LogMemoryPageFactContinuous( factHash=9DC30AF14086BA613E273A5DA47938C505E23387B56EC5002371208EA7291C03, memoryHash=70167475095130609377264675714429937184004731168916915955739867992538245621832, prod=1134928300335844160977681597435304400917745025969765771179612889762699761282 )

Account State Difference:

  Address   Before After State Difference Code
0x28067505...8E73edECD
(dYdX: Memory Page Fact Registry 2)
0x99Ade43B...98e211FDA
14.500022395578313492 Eth
Nonce: 48511
14.491413650545211404 Eth
Nonce: 48512
0.008608745033102088
(Flashbots: Builder)
1.174382344665295103 Eth1.174882375665295103 Eth0.000500031

Execution Trace

MemoryPageFactRegistry.registerContinuousMemoryPage( startAddr=10000036, values=[26, 2162951993049403874701410372560252781951430030802477250730713051847421207863, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 2788000662405990628400343329369478717461568589029947752239632817042650296661, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 2324875445821707033378256961560823587077938314328082482608621166085206494653, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 1666592670856149508010198169846033261314760387265975251545726928187763841137, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 1886898413921871608761575354524241423664029257282630939882588043786941324547, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 441022134531977815514999432017041190477616638053226371976150807540620480035, 1390726910323976264396851446996494490757233897803493337751952271375342730526, 508400959289411487507572062322683209810939923450653524850805730173107532067, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 2494290314147076543015457737596191645261145919783039350533322053132372237670, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 2050770916635067990277405462821607033984357647936986601283060708708919024385, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 854988630964644509992593596816805096493497860649946196010883101887351535449, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 1511342650800423897184620715419466731400374076134525370691669223743619747067, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 1971673453835293544185887076872832777909684062209332265188714707432988429070, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 2634578313191855412517104994288157636545540773256443462897956203823007450718, 1072035497076846607322037267784110659410341675694031857644447227002241788184, 148, 246930652783857782251838442103670756662366630621379341567502181154550565, 15, 63938801657132194740785661950281043454853499266937989790434534019297669353, 371365686407, 69036229591699849960932814930274583219423937176044869651883289380133062597, 55954080293467991426919276261732, 217220084042943934043295412551804878100253593337652225984163585784397531836, 12854735135139811511962193555621, 482148859801725464274198147480840119334382080162606228723774290742111978842, 3055568562878896, 731009553143347574080655238666149040102619103132239422267183761870156583437, 264683618110578632744346322334422034499, 731009553143347574080655238666149040102619103132239422267183761870156583438, 98161388725, 860370950108688216340004790080337058268427944294306403669698046952904826247, 102794450432547246158, 902142801162675579356515311200305936865176462885343262364435227123841162456, 835247515, 1446821757104641781948757487033289620065803269090287896475220893178955257282, 1671881162, 1487011170663390732875708189770531354637454399594246707593116311126072700163, 0, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 125052923696, 2318736887331368761321803003856896048755498951048464294335952677135793010967, 42556761492143, 3019909688069890737741574725596704419617603778498894174214991772106286960766, 0, 3349213099218697603592661749244251314285879613521563175985596427468670792737, 5612300747, 3419738051628815889894019326456610349067037039727820702520995196837583035197, 2195899417, 63566587435701112570191070764527783853874497197971032079474608076528173532, 1235931852938539958272, 120397426531127866862563252170906085539486841162656606871681204615275090633, 55340232221128654848, 152201502138245915089786488685072006394814178378037108939217998542167361923, 903890459611768029184, 178351805533563298117041883423455747555720413701925333133197612626600180024, 1, 680641068382147823690491849560675892800103278811133310055689865859989991742, 1, 185878909114375441311204518622931910136047914769384476783036265615318829327, 129127208515966861312, 229128395627260930605902722751468821512471554350870720359487903010907755253, 129127208515966861312, 256888730534968306799600632864986299817291084903956014639864170728388541669, 129127208515966861312, 259157523736167110307150371253158433542881002907323497968793474327842743429, 202914184810805067776, 284813039582630196493677839395532243076141534999175785955803592926082817829, 295147905179352825856, 298128761628879147656192823016542380183828802209715334556026263166893556135, 105, 132151754204371311788557178072048428694777243581500164329564530088703071200, 1, 155901465447068407236109400328005977659235568446890170047528005550945226020, 1, 177952950118147474671712126787244108314593175457444431765254541827158479125, 1, 189039779671408875132609730386993881838814722456089023775439031734364367976, 2501197571271320855120047528832331123510148573457328543584645377490543904644, 234763898705345910703912378846804413213821377687877957785315849104162895110, 1, 243491509101456352879981835088639359984943693871906728587288553409740635482, 1, 262008651713594879506517843124692898091721291943993867670839982806525226644, 299134475554263009487813689407035197060719985439495192705582564981986862381, 313150568498344648028448314101629509801825580711340507880452891793881701748, 2510311930948312860888746648673069926967991117874046150783903360396160844589, 314548594837727395131998055082794548322245262793652633631913904976706375345, 1, 318236531437432123340134301684822951792250027545054282262089822280067591278, 1, 335241307444663341078699983340061379173838289155437174214245755112231283655, 1, 346628727233312200039024472519034038178750938982550360792749747100156864551, 1, 352057373751511148453396174427830091968660532395529376240255217904696888245, 1, 352196268184603084925799286343248911983603102304160709731919275797712178941, 1, 397217009110544551576371838114395457815974328889070534093390275034369463792, 1, 402325438565599501977443413834424656866666173565905573067678729040357228301, 1, 403606116849156965245545556197346081471870829606222161547606863546648324205, 1, 406928115482797220303906414222230999200673461509625714401226069874060638048, 1, 419654931417590059960742042523777150128349888369747355741708779597321947084, 1, 472050989138219600046881245178120953538447345709297295038077745018146823892, 1232600957714418518984979605943789584020464573631934588733329196242693611372, 522227845286641700903238354193258992692265530463621468024536859054005649490, 1, 534970936082892853688300249024781641342339200337490356120932447353939253217, 1, 592059885961087610230479782289123114228069719847273856569232240850028726409, 1, 610634988292624289707959254590006513760732449495958288527159237400458460755, 2235689057464243069089834112206528892314423903076157471106271546020106975256, 616381595020593771224342537638088607958264317072615729939023300473805125920, 3603193612695104771999809547027829400550347972076186082855191478151737128775, 621874165928687965909713144657658909563702349623966798036826052254902281542, 1, 625680686033637686559483416848144060177622193079807800386062951165258186260, 1, 627754496883584552232246130177975810745827224819049607499415275365535808928, 1, 678071855648788974364955240357677077769513629986509080098104546404181417318, 1, 752169191504844708228447638711424753024858425157913766023483046147847372756, 3195975042297119021293350561954816604692708633148577705992368854717682265051, 801415334277234376035704493279177806796043223711011479255110252711273943325, 1, 837670929213994996370234711093869644278122896493271131850771280132784032721, 1668404190135314842624705930679424332635211089872329595309524028040690242555, 865703646637951132311200445589279479560206830303805617129738913421574720795, 757555842164696099617913495950495140157758265409923705561771417572062570352, 913969764925322386762456548030362934722465177537379418690885950260928624011, 2329462876958386087029884564183992164036677261087171795185961046433465435143, 960768515958798853394409115336733386237658937674556750050324250650240453819, 1, 965339499418972750524257642654031194088446186926014946190678552383020532144, 1, 967817047658210522866190170679690428113983313405338175303708283020140920904, 1, 971528109988078146437777887537672649711340156294746973778430177284296503746, 1, 975184583655218394195582386996538409114456331847990175742422391144008858897, 2283636320019051878183028757484836638579526544549125214159751490333817159499, 1101068454805363590641193274654980245023321932503212505794686944773554160164, 1706011629104944754649969865484451376612236008565809509229105288062015510162, 1140241942134240330201794270869965636644143081549539695952361757489378166283, 1, 1174814243640776523938796686105625093834574078926198375714841011659518134849, 1, 1187762449633998627663247077007301379835655161290078847050965791913883169656, 1, 1238842801882198170642102850200845525317294466678075387026284479923121698278, 3135466267386622496492708766987309994068079228977314066272570210746757040331, 1248525842485940172780895427493561263583737125001981849595012923675984061626, 1, 1255319810453508848230380427236229551701337796375729480148567082546888968808, 2054773944626935953869301990574055894065429226480282493002757159683275705634, 1299019599571552236523731500438904854566452916327691360653154672137199631957, 1, 1381677535416850570372747809293180361392694851078022648021795091242919494459, 2884276388064012809157363176190811710599909684056492104599683067693130502599, 1384953984453499877771011744150773227193974360747116656023958970970976903703, 1229411904307186964754204270001767857117486396582467539369771850146510731562, 1434030566725111666991096976308838868048394297133546307651352063870304974944, 1, 1445623838045707379682979109732552135282461484057922887431787395626425429079, 2528789957643790327051649642310484377027639168805660860642726848118007165277, 1493828659666312899949658777882599524589450162890530232621014684517185283679, 2544566452803152791897237043384796118802713833561991886792547124933570473891, 1566410558949450424532736832024609410939077529170138643790623220090696921008, 1807568447816581587858539719228986951635118189655014075324315442389806589846, 1636495781763738892620095595060692457149709640483912108242002601867981577964, 1, 1658661010820476533348023359283404193639285834704366705561989364699131307599, 1, 1695151190334039901125136063443037657143336107937909062886605522701456852434, 787296928150718691172906042115683474840838500939677856082142496200170769398, 1796077777596659582026988211515917729729516969593193959603876334165137536393, 3560125726855500433674710739662133678408239264982130553477720764403297488414, 1809693566425530621084648799068668734136081670337895784220276816944195109660, 1, 1884366127235750519931673284527917888344478405871842253051159635332519049249, 1771215152746747295857534017546550182159582584596907685438970256591099293477, 1902442838807554463125864584585439635843637875258762662872521427546209799190, 1257661955810422059095029173339289898585497858315163470208160670775434992553, 1913204420264181555819396884022658166403580615997595503262855024244899551820, 1136166598369525531397782931917706510876574714061732140355977961955914792737, 1998240766287182350421788406821341614363523178471441039446606769868737755041, 1, 1999472019587237836693505751011008069230232717242385399549935326726016178283, 1, 2035987778608392546619239400203249260723055462951597842174859606047160086908, 1, 2065131132031366244308658968940263052592495456126624302707207566823959275144, 1, 2069927929946522536190612861188845864506931577517313786260784738161434330824, 1, 2070815674438724182189537174598012725864096776628482211218118859039438260579, 2399193085594621874913532242279209099118073449299040022524154386589597561684, 2083540184053632193644234234336483320410472671921992004477617569553438853423, 1, 2136525607545588777445597037485156137218712675681113855455977969681021038184, 2095523820568416717354155482997063907035873444130920473276463734431952797308, 2174489951776929951368552297678303588344939497202049754489392426034460131587, 1113721527689386624158916702166915831565311181898284097360440772643201413967, 2195534251847901897527702604456988583274551933123463178459622299491848907238, 1, 2219951253187773689842529628360760809958559597458844010222481205817777317766, 178351805533563298117041883423455747555720413701925333133197612626600180024, 2227024531427144245551267591542573719675387318689001721673525317014229767649, 3347502972306288781707456201900078368407816949745521976384934666892884568016, 2248955647205678259026584538516734030597059191979982396885849623199992489592, 1, 2256549995232891655609411660985033630968129562931007022886326980885502935768, 1, 2287705874964063962226537764336936948803384016389167170151430447183610649919, 1, 2308766626846934331223545106237720153744285227520221121720364241657956220356, 1, 2402321775814633705516926801451405004223550165552392701709435996770754705585, 1, 2437016226436560203530723183071308463029889291431799502604896487450768166598, 1, 2483890868937885803745805721877887662061035633609581272535135299401538588992, 1, 2537456972670378780845257440438284888052939128789879387652477860024483825937, 313559355411661393084284424333609784651557621694489024883275855514113055802, 2578818083648998187602557605614551949531147575747365429751335331287939722464, 1, 2620928854327295056340998216972103146410916396952523537465643384598643229442, 185878909114375441311204518622931910136047914769384476783036265615318829327, 2622073960117696020131949293051239643925445555281499183135718175168881165465, 3504321902348366949602491284128992668140025220937909063580809439577797764834, 2720156455231507780149139124624077142725427228894576325742528789764973317967, 1, 2754709289718865437931272543211514906037341530825276579261429390697156069984, 1, 2765049094753633817749978350278820654627712905812901691025932736881802173132, 1, 2782561140129029140415859897530432314456315614154499152058291817985102124164, 1, 2940117716279430124722008942727135360148610164628339481371276659498538131531, 1, 2946421544100787529820963236529912687072011349332019189061326269105564583532, 1, 2995085650854182598239747763555410956073970457077875741236577747918659217767, 1, 3094019344025752051045328805438710040227254335022924389052028258910993711409, 2777446043382169962897101280566984620117709421035522054986554406121643851785, 3116447146444361485538874818264636433801734672710606800449834177106257071365, 1, 3164543439075667490295260606023777371904959220283072039440289543106635491997, 1982617254556607933699545953095680132021643513456350526655444257911663281484, 3222996381351773327723965092861089345339876642753099974614454314024696223040, 1, 3254191506862835818175157899980123727357708814810460924207595995524752528368, 1, 3344328566571718047725813274726146967788041730990922538990995240919306173364, 1, 3347055216878287063577087984414079327393491005415673107858827415212827120077, 1, 3357566668917602932501075132901886098592457052549933242441024690296144544120, 1, 3403225975696858883439335947068890531483417161517730085413129455836618098783, 1, 3447863967867375435730599068334929128455550149298688067875391282505195311181, 1184258194467861561783806219163085703372502838538178191614308450289727181977, 3451906973475705657620275300969954704210916057417399267422464003943842079428, 1, 3515350966220339988257182127040018376949104165657721329274395539985305387463, 1, 3526875519462219865795855454807161072408468026899554965629078193737081536060, 1, 3548024503750848721088062252953386291196696840196212320459984340650994589130, 1, 299134475554263009487813689407035197060719985439495192705582564981986862381, 1, 680641068382147823690491849560675892800103278811133310055689865859989991742, 2, 299223658181314318526156265660099771441901601968928136272334834826629066200, 110680464442257309696, 299978774178018170765175633763226900729824650680597949580617401342405334918, 55340232221128654848, 313559355411661393084284424333609784651557621694489024883275855514113055802, 1, 680641068382147823690491849560675892800103278811133310055689865859989991742, 1, 367197906183797993130452795711865096328910691665422431405262502990466134059, 6, 155082539558689579094930820457537605560250202889383976768599028600060638458, 2060601051233036424, 482148859801725464274198147480840119334382080162606228723774290742111978842, 1816535672787508, 860370950108688216340004790080337058268427944294306403669698046952904826247, 1882064608846326249526, 1450773348621475531073306325960351147940191236122574546481360435247650274113, 1671881162, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 1829464773, 2968898976908453840001807206548636386320520861311889988744626555369552485291, 96518037777, 384918973153937049015919927186241759908995061601208369053733449216707842121, 221360928884514619392, 385291772725090318157700937045086145273563247402457518748197066808155336371, 10, 98825239756614816983270276180368744138846281776833942936961586311426048972, 20890913264937866155978, 372358463242533673501505231224237831914550017995412487235216350731550874070, 3403368340302626, 405036536023650514592325729730151021030543071815363022056708755100260425355, 132255080781348014, 915588446794131777159526703368365415901433943378494142395982820566886304711, 0, 1138102585933080762687588574951940568393916737061955149298889590431930889549, 15320424293447504356822, 2436310261554382555287233942534966802579366278341115349704995268949260214829, 12047865846619235203, 2650525587979760243536244492935258079594240371076596729522476320712808148636, 1882064608846326249526, 3259304810148919690813670196313815206294170495727880211469181375648808356411, 0, 3298669954467703805962831276428874579969194911828264957077015137243261364697, 12540000000000000000, 3525194980737912385049107613448514062213202902929788511473563379714242677787, 0, 387462613158072919962814955810722371020044985925728422885558617409660261946, 1, 3543555662123367546885245781956944074988187446169625359431135689989072951742, 1, 441022134531977815514999432017041190477616638053226371976150807540620480035, 18446744073709551623, 28313022832526220435919396777106196834975646952251820764508704287550374993, 58256001704608589532901430, 318282615767336963149749833198806753140642073758831345755744923003368466034, 345600, 420809302088575566661732159258626015934899866033455122060647015585080981641, 441022134531977815514999432017041190477616638053226371976150807540620480035, 880241901581652276300822791360025363358516560758384169656351614433986727311, 2719375072388930312125962235373722121510261546645993710060371764062457350061, 880241901581652276300822791360025363358516560758384169656351614433986727315, 1, 1596797181605835465375385856756254615380245139672087060603160900530960374661, 1, 1662968741416162122709795668327058413808168082301235317239158738933362048792, 1665095769147373104817037689867011641318726238529317742642661963529240154211, 467359278613506166151492726487752216059557962335532790304583050955123345960, 6, 321751264442790402984935101055086840420519863546320125522244203922488951779, 15320424293447504356822, 321751264442790402984935101055086840420519863546320125522244203922488951782, 12468425441171305738, 1032717993920308306191823419406815870858725944687744986845677154805147281824, 91131500340152668857, 1032717993920308306191823419406815870858725944687744986845677154805147281827, 111080901450, 2115492923921523814468632200599040563669287468411561214414663525667701459652, 8923954492491253096, 2115492923921523814468632200599040563669287468411561214414663525667701459655, 10731383924, 502757339944989757453146859343565723730152880602197720218712107418073021644, 110680464442257309696, 508400959289411487507572062322683209810939923450653524850805730173107532067, 36893488147419103234, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 1217717538163272004547708793685186809780920861759741597441159713644651387953, 643937766635386712865257017949557149728803670533789168342001762530470366980, 498062089990157893632, 676028716993851673397918835131328481427799807821756534219643869301313604743, 10, 69036229591699849960932814930274583219423937176044869651883289380133062597, 26833420534984816059585151849700702150, 217220084042943934043295412551804878100253593337652225984163585784397531836, 208263799539213639892318298330507394408, 482148859801725464274198147480840119334382080162606228723774290742111978842, 571763317935256160079, 731009553143347574080655238666149040102619103132239422267183761870156583437, 5208028265256305130714180197734064079, 731009553143347574080655238666149040102619103132239422267183761870156583438, 128800, 860370950108688216340004790080337058268427944294306403669698046952904826247, 20890913264937866155978, 1049315609823804293936504925464266520419086930831295843182409478834312871668, 3284279499038672, 1446821757104641781948757487033289620065803269090287896475220893178955257282, 1671881162, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 16933756726860185764, 2318736887331368761321803003856896048755498951048464294335952677135793010967, 3745094248997869540, 683106628730556228481532999843105292820059075950393720316109284206660864730, 73786976294838206464, 690117004052734146049673087296086003956913078920286097917204789942207627773, 129127208515966861312, 702124445484098954609457138310017956589612282540392161440340926243168022005, 295147905179352825856, 733172861119948759425714010005241471127006362662426050147441074121487756239, 184467440737095516160, 757555842164696099617913495950495140157758265409923705561771417572062570352, 18446744073709551621, 28313022832526220435919396777106196834975646952251820764508704287550374993, 58256001704608589532901430, 318282615767336963149749833198806753140642073758831345755744923003368466034, 345600, 550557492744938365112574611882025123252567779123164597803728068558738016655, 0, 880241901581652276300822791360025363358516560758384169656351614433986727311, 1363322344253903234024893750679939779463811011956243950763978333444652610158, 880241901581652276300822791360025363358516560758384169656351614433986727315, 1, 787296928150718691172906042115683474840838500939677856082142496200170769398, 36893488147419103232, 837284854410715721367875650251957266513782304235778511936759061974550297649, 55340232221128654850, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 1563672576422918850564506150092036819309968525068313502302455251173901598124, 3, 845797147307840686364972096126581516549024375153601326650593297167463111281, 424275113695319687168, 854988630964644509992593596816805096493497860649946196010883101887351535449, 36893488147419103234, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 2385627485609881344745794919189154010366147063873240338814917021692548508054, 896829228434996418404457288844200787824067631387656650609247225079964011401, 73786976294838206464, 954238268657422051450813391328783022583693145554034557602987484076373912568, 129127208515966861312, 980641348758169158361564622616439166824113829417782360965256920656439161142, 9, 63938801657132194740785661950281043454853499266937989790434534019297669353, 2047518293, 482148859801725464274198147480840119334382080162606228723774290742111978842, 2708026668857735, 869607105607012660680875190615923746067723533470608376520778458724440486487, 16503903110, 954803091634814637842110590476828844991973569238602708734111684965802370533, 0, 2077245375163959628523084685686427305440424553390168869893946859753017626072, 0, 2684822265546812728038613363117134593045842901870339015993862965087565358039, 1215754977631, 2907650886262240231091340501141116529819309483511743624629474767485020709048, 292214235480, 3349213099218697603592661749244251314285879613521563175985596427468670792737, 488265947, 3419738051628815889894019326456610349067037039727820702520995196837583035197, 1464797841, 1106281169065441123440100313835936801177276436548847014284370625205444080383, 1, 680641068382147823690491849560675892800103278811133310055689865859989991742, 143, 1113721527689386624158916702166915831565311181898284097360440772643201413967, 1, 680641068382147823690491849560675892800103278811133310055689865859989991742, 1, 1127347108495161553982349493466880963618004727273003239784420786536822903967, 239807672958224171008, 1136166598369525531397782931917706510876574714061732140355977961955914792737, 110680464442257309696, 1146167188769563183579610978506002895215742075256848261088925895953234424028, 73786976294838206464, 1169841783304404900912783148642992957613022986079680952010957624242714471480, 92233720368547758080, 1184258194467861561783806219163085703372502838538178191614308450289727181977, 1, 680641068382147823690491849560675892800103278811133310055689865859989991742, 1, 1203547651708349271448768365881041305352887755542740175005943917204658012493, 5, 55583852890716041767307418200912756975529385137481305234747662804004120387, 2, 3176524733826083873672329386379993405830010939099988768613861505468006056823, 1, 3451708540378821391964979010578475462618914291452748078246635245335185285950, 1, 3472208217624165743586418819321558085043251230376453992099411176522267865618, 1, 3541481279686432982844022021282148042692248657595688611344969598403482267991, 1, 1220326440971553691651513025018986313413489513206369660995921976440593870938, 442721857769029238784, 1227734677947700406237605567034634688194683612892655574852759301592749902752, 92233720368547758080, 1229411904307186964754204270001767857117486396582467539369771850146510731562, 1, 680641068382147823690491849560675892800103278811133310055689865859989991742, 1, 1232600957714418518984979605943789584020464573631934588733329196242693611372, 18446744073709551621, 28313022832526220435919396777106196834975646952251820764508704287550374993, 58256001704608589532901430, 318282615767336963149749833198806753140642073758831345755744923003368466034, 345600, 550557492744938365112574611882025123252567779123164597803728068558738016655, 0, 880241901581652276300822791360025363358516560758384169656351614433986727311, 58620972096851280283748987858451550766714342516268799248403004035514514563, 880241901581652276300822791360025363358516560758384169656351614433986727315, 1, 1250980422148795968862458562981952557808747978884850923769034940470874916792, 55340232221128654848, 1257661955810422059095029173339289898585497858315163470208160670775434992553, 1, 680641068382147823690491849560675892800103278811133310055689865859989991742, 1, 1350355257678582732141423846257751672682612313161205688714795830375912950634, 719423018874672513024, 1372882548073012799515697292915208968741728807374701434035020081703254271884, 33, 114684522822749325770135661270900809221014529227497040442817026007142217468, 42296, 147995611255773588279950026594685360246368973665518859648658370804744505732, 42296, 310951349563467280228370075737060290529583285923643716860963951284836629950, 2, 327825313072850052455900524653965419847856572210433336380225990025382987198, 2, 479306022287975933845158481812838233390228854316356667210777939005227001849, 1, 551858656956157178003775243865207485724800994821581528668244870413914284494, 0, 852434549312128831553256416785017059207123671824868601552728388750396381064, 1, 1155572794049604360053805700855371510476787667666307253471502996459858678399, 1, 1180388391783812240655088806789066113969857511043640212084189413081881334287, 837284854410715721367875650251957266513782304235778511936759061974550297649, 1480436806757227620290931145777527690746307581412639612501362908197279629480, 1, 1716796227679440107383610404142601946942458073270912585682955434879190974117, 896829228434996418404457288844200787824067631387656650609247225079964011401, 1989474069500472127984256817128583430707384767330831825227235430019447854267, 1, 2006220813877834602220986284032185328311682877121290899979145404069301056626, 2, 2006220813877834602220986284032185328311682877121290899979145404069301056627, 186294699441980128189381032271243553371207391668586582673222391351693619794, 2006220813877834602220986284032185328311682877121290899979145404069301056628, 43953698048716873511092020998215238354691730798367828, 2303952290607394975606082716323873543198212437808642724426432434598636788545, 1, 2376643260677774195194666092607313321459528533895984202217952471075860327082, 1, 2534191212645284598083391973943036955126796313472330666604934301459597494076, 2, 2534191212645284598083391973943036955126796313472330666604934301459597494077, 186294699441980128189385566027399037357569826596282961586671878521357423429, 2534191212645284598083391973943036955126796313472330666604934301459597494078, 30433170846389955817130289609650418532763253961548886, 2653233388453212986393092960219065392771274622955539712222969521858389767766, 259157523736167110307150371253158433542881002907323497968793474327842743429, 2728552182784056631564316779825834670957353796174257638997444705480525950715, 502757339944989757453146859343565723730152880602197720218712107418073021644, 2749424786427375357095490722838315118240090029496456474757707613682183041770, 1, 2755096235764130205119065902037561822138536324986156915206327107156637173804, 2324875445821707033378256961560823587077938314328082482608621166085206494653, 2874304371830936721129966594557020389792246074216639443630240092859528534093, 2788000662405990628400343329369478717461568589029947752239632817042650296661, 3116139712275720657648913021074953573037507443109153836711806410952705068063, 2512162066263429657687214401099252168622692864898474451771348856007250810879, 3210209637158330252318378590127672613911593110322978153118495478286961562935, 1, 3405271241397973588316654681499680835690742910877135646195335428717269560087, 1, 3411282299527364627125358513737604372634918349873733559813860051793306162735, 1, 3510685180045596521346125979322436789646817825041599733423712005106970712238, 1, 3575222744418365209866099842674179308733695595080355749664782533374284526252, 2, 3575222744418365209866099842674179308733695595080355749664782533374284526253, 186294699441980128189384776667319774303457701932985302194663346843738270584, 3575222744418365209866099842674179308733695595080355749664782533374284526254, 18833294930873471743564926578238030837069609723263097, 1374002828385270273452562671177573567977428949797371094544942604457823992224, 276701161105643274240, 1397833961530826319677318755859321311536431151928960150799717094965620508465, 239807672958224171008, 1411912428190955175025457411817749242394403284375046881569897464686172859651, 258254417031933722624, 1457735542254534961245879845382529408407964919977094126167470909724308013904, 103467787509436875014144, 1481980909207477987471021395307550929742770229443075282896111652230323233476, 21, 294580558309796238077853817015321069338363274298816300761089550547238760367, 1671881871, 1195251400652151190085814703104052752432993841119366014885360398719695213595, 1671881873, 1360166102994301741242586908772306297541603778658526090050728664306749758371, 1671881872, 1360166102994301741242586908772306297541603778658526090050728664306749758375, 1682900000000, 1437664311600518933648989607756790072888430269307855847616108400360155106728, 1671881874, 1664772817032978669288968389624982613916547460935065698682629903786504576759, 1671881873, 2138281233876316965393901449521465900743949125267692232053653659294998832247, 1671881873, 2138281233876316965393901449521465900743949125267692232053653659294998832251, 1683054999999, 2308415812348558971615063098928011758329580420869061607356021408784579812435, 1671881873, 2308415812348558971615063098928011758329580420869061607356021408784579812439, 122009500000, 2322347035689040617843868126596562983813429617125779326166175134665665762784, 1671881873, 2370701311682459354389995670901941055128496451404586149985723493809470353760, 1671881873, 2416398194948356652452759541484009944586636292919908395240175123542135303840, 1671881874, 2416398194948356652452759541484009944586636292919908395240175123542135303844, 1687080000000, 2951151250570115487575607720634151593850652904483735225295888456098944971758, 1671881874, 3016116695992780747803189565485375821803653333147252921429639753904317044117, 1671881874, 3016116695992780747803189565485375821803653333147252921429639753904317044121, 122046000000, 3134869505771111361250330924768041581815502559644398602887689121977109973273, 1671881871, 3347768566853934174371986561032260491507693457219247608390916089551034446905, 1671881871, 3347768566853934174371986561032260491507693457219247608390916089551034446909, 122000000000, 3355907602259494737193326526805341643955107965839735571892486096809028932858, 1671881874, 1511342650800423897184620715419466731400374076134525370691669223743619747067, 36893488147419103234, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 1270571204031407680331743879427684087767056384005715005211596095626505254118, 1514327990945574462833678968626945280407318601028285527154782240566252571214, 110680464442257309696, 1542997163106931128843475193952581251012576863059461112026402768608157038891, 2, 680641068382147823690491849560675892800103278811133310055689865859989991742, 1, 1662968741416162122709795668327058413808168082301235317239158738933362048792, 1665095769147373104817037689867011641318726238529317742642661963529240154211, 1551066570109226709806227376227887644988747649547125652677001655415970355349, 258254417031933722624, 1666592670856149508010198169846033261314760387265975251545726928187763841137, 55340232221128654850, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 1575604834910298421912310365339735050444042703893692061039748889573983464372, 1668404190135314842624705930679424332635211089872329595309524028040690242555, 18446744073709551621, 28313022832526220435919396777106196834975646952251820764508704287550374993, 58256001704608589532901430, 318282615767336963149749833198806753140642073758831345755744923003368466034, 345600, 550557492744938365112574611882025123252567779123164597803728068558738016655, 0, 880241901581652276300822791360025363358516560758384169656351614433986727311, 1107407888284078137384337682990194348656074619136131875836243074202572260144, 880241901581652276300822791360025363358516560758384169656351614433986727315, 1, 1685137400476867095909275115545185243085080099242861905325746632051081472089, 258254417031933722624, 1706011629104944754649969865484451376612236008565809509229105288062015510162, 2, 680641068382147823690491849560675892800103278811133310055689865859989991742, 2, 1662968741416162122709795668327058413808168082301235317239158738933362048792, 1665095769147373104817037689867011641318726238529317742642661963529240154211, 1771215152746747295857534017546550182159582584596907685438970256591099293477, 1, 680641068382147823690491849560675892800103278811133310055689865859989991742, 1, 1807568447816581587858539719228986951635118189655014075324315442389806589846, 55340232221128654848, 1855966213384827733333454489642968182168710763334196511870839563344445384880, 9, 69036229591699849960932814930274583219423937176044869651883289380133062597, 133717999063202339764062073739977817250, 217220084042943934043295412551804878100253593337652225984163585784397531836, 360094914294775378072, 482148859801725464274198147480840119334382080162606228723774290742111978842, 18319637614, 731009553143347574080655238666149040102619103132239422267183761870156583437, 86992718459904446702340908794352940001, 860370950108688216340004790080337058268427944294306403669698046952904826247, 19038678269, 1445656894303332928361312581976543402322785683164387168273016333040194613451, 47928880, 1446821757104641781948757487033289620065803269090287896475220893178955257282, 1671881162, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 18914121204, 2318736887331368761321803003856896048755498951048464294335952677135793010967, 45758380, 1886898413921871608761575354524241423664029257282630939882588043786941324547, 55340232221128654850, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 3103347105160966224665750161602291939787149001271191628161291052624222257403, 1920662749010943397485124691498743640874207585204427824809402773204970398209, 73786976294838206464, 1924749839070205015946030827609233663663292771025120874978704798679706592226, 2213609288845146193920, 1939161357636858184126467760024657538771550147304211035214333558066804969741, 166020696663385964544, 1971673453835293544185887076872832777909684062209332265188714707432988429070, 36893488147419103234, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 1266127778096435754470875327019570231827020828116181074942061396712314364682, 1982617254556607933699545953095680132021643513456350526655444257911663281484, 1, 680641068382147823690491849560675892800103278811133310055689865859989991742, 2, 2000031840833493536440815036539786941974305919381618969872893526239637868210, 9, 2323914997884770380811073845427018286876388793521520055214699314103691119, 1, 9765743188649950261373196341713625278679117579990755434498905125946408620, 0, 28702455650482448000510714313139543295516335661147978010910728826532870118, 0, 434839862970579977830122498851759506070578807700943774934481800695160562002, 1, 677606533805079853054030378185056832292960173290091395587188984232713359404, 0, 689526227811467421348025442540529366612934969294730499346809990426896568757, 0, 1129958640456447357095505646263174997795070685649229059556377562721273554175, 1, 1787765763790397683112452180902603283211320584584359614381836673672439327034, 0, 2036597902087349189049751024828636071736394479861723683253297887908071890839, 0, 2050770916635067990277405462821607033984357647936986601283060708708919024385, 55340232221128654850, 440168123437330633874675177419976431975019168943402176995739208264668116428, 1449178161945088530446351771646113898511736767359683664273252560520029776866, 814079005391940027390129862062157285361348684878695833898695909074510122245, 1661565353376954853698415960728029249879559552786411323830263201935773962384, 2054773944626935953869301990574055894065429226480282493002757159683275705634, 2, 680641068382147823690491849560675892800103278811133310055689865859989991742, 2, 1662968741416162122709795668327058413808168082301235317239158738933362048792, 1665095769147373104817037689867011641318726238529317742642661963529240154211, 2087021424722619777119509474943472645767659996348769578120564519014510906823, 205, 8461654510961973394023899284276957200676846058995640463841384826658641710, 7565340894725310, 29151247492436453864216185896857906706303115346423145345126961443615963352, 503303458557735, 63938801657132194740785661950281043454853499266937989790434534019297669353, 91456710641267843, 69541709151352335129839936537732313983016176653025407946836356015967316763, 622767705846936, 72171396227405187148712327395813734894323766603954578005287297957969733117, 20467285786525589, 121916561903736208353389551502229050632775605502873876589935693414302001200, 513150329280441215, 151890494386444004931177909170463036697543909682339414209061834644965170298, 5951636584577635, 178102404161711199556723002370950263685075802908700344026796160102059799456, 540307210194166, 178400748482722180165164187509782187307250750852784328340803090559871300141, 540307210194166, 190019991189806600893560965635865308925008213398447656461834589132897249284, 403314334335650, 215084930553364122479076328291696009085371232723114844194478800471713842022, 90000000000000, 242287240538528597495210577778127484749492272250747250304714608446570668304, 1616588001591019, 243207862161968717741065324355821854979692240985955181213110211824966585936, 6114034379358604, 257038376413331414594815401402232436580308812193153246030006297956215618460, 340282366920938463463374607431768211455, 257038376413331414594815401402232436580308812193153246030006297956215618461, 340282366920938463463374607431768211455, 310151501083080319035347005517769248563980259619570386802646128733154766574, 15750398453210002, 366824644367798889635580032934264261729802027972399576657589449888237202025, 2494325784469892, 392030582083712217994465445181035227789908360815397518543764954694370517097, 354830670193049, 402203818018003161230395989487321866767371283189591635162574585819009405729, 71442580157057915680, 415626563744540382107130425904279578432349200129487426631020090331172029058, 8002268972701670, 421562058344303932197680403502068454062032250094331772528272483390853994412, 5861488428087701, 449836543316960625005707653109175812223608118414302425678964781959366993489, 4487345967727, 476398573504626604051779703530776739089914253329940979318024843416360597925, 20624992813605071, 482148859801725464274198147480840119334382080162606228723774290742111978842, 2966170876946898989509, 534912713353916955164205327113022238045644466115775048321026541031945018886, 340282366920938463463374607431768211455, 534912713353916955164205327113022238045644466115775048321026541031945018887, 340282366920938463463374607431768211455, 551529899501518527714043294833552208822272484146430490515863825373323162134, 32593642669220, 562347938779520418402914680368070380203306494787251485607532344622460605528, 340282366920938463462473807431768202453, 562347938779520418402914680368070380203306494787251485607532344622460605529, 340282366920938463463374607431768211455, 563928454353549155067861137473018085704290431759421904803266632876245232818, 1055006484860013224, 575833881255184818758165324589541597263531512675154229332978552386820405494, 340282366920938463463374327431768211455, 575833881255184818758165324589541597263531512675154229332978552386820405495, 340282366920938463463374607431768211455, 580339621325350781384269088855736636794375396331715429285055542068877398283, 11959649739645951, 594335226051681844398407892070037880147148436181329546745313535074751773243, 2581389053491901, 606899534256248349215136513223395978972854153834721893863956947707519357473, 1536637481931425, 644511616606436237274362243119953536127652585524703721173526439598073333741, 403303458557735, 644897827231342799267922653042093051584975455662020423025134593293388782125, 503314334335650, 651407714779850427023735633053670729139820293245184583518859861775058215425, 19698650279651784, 657533572842826350894597868992571239613965822313669397522511695148857268669, 2346096504921527201, 696457903080908368712913476042520485824128193555389029181602743338927475801, 18957653074662537, 702535792965916883959027488774735993030895717882234670311982203941350252539, 275011451763367, 713109197918249708773343729294000305280032568565123758454583661946667648978, 16520528433124505, 716848044794508269392395776417536498055450923140597029284689365016583061875, 4803501625389630, 719862538619009825431384982398054913523532598437421366706711239155029426272, 1299562655503214, 751145864712353944978957987258331658465560538238711746755003691421745882751, 4063974715253694, 755568257962284293560186704722821355106342516774591675312089310824520969296, 630909913872195, 792985955619778553349299217630311706976597674370358120354024088100275525617, 27234982214781386812, 795478088683117702935220356299125656858848259214367724580008038072915672280, 19684570072253, 804857392112233357972792802885135080030069597653444764664999629648662705639, 21870633461853487, 827514060942238422578104401520391918486342934617480910968681565489539673431, 99024188331192770, 837565360993694767328725068049706234805294751595928235860866341588694391487, 790853100735040, 852707621136428972805438590438955702213683185440365660719978781447595339312, 340282366920938463463374307431768211455, 852707621136428972805438590438955702213683185440365660719978781447595339313, 340282366920938463463374607431768211455, 869607105607012660680875190615923746067723533470608376520778458724440486487, 934811869298537, 902142801162675579356515311200305936865176462885343262364435227123841162456, 254113076096782340, 912922122771621613867320897012214035477697545295456503698465472252053231942, 29363971202125, 917044151362340494517106275430067246847921583066117051676561219143979582366, 34670617662756, 927020724127051785887236232911451331675376751382964727189317883223544097661, 8180528265353, 954803091634814637842110590476828844991973569238602708734111684965802370533, 818154625245685401, 973906438095203894961482333721457719310100897384059621654776406183482199222, 0, 979284535198187607269887496517477033640649344726105260264265769549287728857, 11760573186170480, 1046716416471623621898133267409909771003969714091374118861924652182592081747, 205614167128316331, 1049315609823804293936504925464266520419086930831295843182409478834312871668, 220028342215665453, 1076169565746163740943198885483178158916360603230239618496091657281882785004, 14787095771535960, 1095058536729138257819678133003850436576641665153787055221577183502235759167, 381656323268693, 1117198644964069030468876088483568140166035202284101948830975504806671546375, 37154065671020559, 1127706784520711839338528549456531715653840311165378580017803757797806947962, 340282366920938463463374337431768211455, 1127706784520711839338528549456531715653840311165378580017803757797806947963, 340282366920938463463374607431768211455, 1172366073993168744304824877502696286051787822892010762000317718123802970855, 340282366920938463463374607431768211455, 1172366073993168744304824877502696286051787822892010762000317718123802970856, 340282366920938463463374607431768211455, 1175512701032616318589854669835036177314253293168683523742739523005516572684, 6000000000000000, 1203744423333316956734074236716861377513270114718875354183152595072670681203, 849310472712776, 1216870908333219866436330141390514259229384846117916197021220072648215289983, 1116279452052207312, 1228044001090048671953775793758146206510285764547187593257165641465534815359, 622767705846936, 1240982829347887857212996718558243557919180259047648033999436946877865359648, 25812746762223865, 1254285308745929120228648241297455222538166382683504707564166750978411141615, 503303458557735, 1269796206973553193279599116817037378993739919255243187891122835922470783556, 1285215406073675, 1280547134640472733247171964542575012020663993592945286658113830413278973213, 403303458557735, 1284329944980033848388803549836655903442747363468385228706367829094529178443, 503303458557735, 1286292630924943677125075491931201253113725503489866804246930743040596201194, 2061993383751475013, 1295074395104935012632253933893001729260127587238992125164852185028573508785, 861367297302982, 1380844290200934791565224373402095536259383769514506394458432889203910136784, 10629131288007145, 1383671650063342070083953886747909561747481031815798254387120287493674453272, 634463257091865144, 1387536047781636478079329289500314065338096487448848303615364718797662522075, 622767705846936, 1416699374217700948280069069284640501932557198369073770731570393438740414806, 6000000000000000, 1422626005645102754528129935456888233402949571309958599642102671472916700775, 30988867483931392, 1439405707454083216372480418239765150377365161789948736010676603182603469776, 2323783982719773, 1440996741188778502147636815207390137097604374369224238787869367331129927274, 103087395970624629, 1445656894303332928361312581976543402322785683164387168273016333040194613451, 89309521547996795, 1448186678395818510954253115834328717056497505635849956277734495333743945102, 4496504264816256, 1453890622293872215265512875577307120793253679872521718485323416001547685278, 621408630520535981, 1487011170663390732875708189770531354637454399594246707593116311126072700163, 299824058916104389, 1518786662809535025666407252440251829065784222381277142484438569379362046850, 572177931862507258, 1570211484599706194152160660818014651215171652336160958078378476904789653310, 9221116337582350, 1571060836945638417223555222324778897084302399055197889600477060701258975824, 503303458557735, 1646097897418501360949195714921671072246885073680053289651654289159284993749, 622767705846936, 1652239641646305300575579602320743469502857623546232173982230148497915557877, 6286466050810744548, 1669138231458663475054039826210766773075736929183846953494192709322802438355, 12410824205103678, 1684481194946572157678998337440213122257950975437634150613965551668030287879, 471822784164651, 1717568410328992318275950746036949568000252801919793417816671028868312218952, 499430187360969692, 1720525240559367336978600387361438927557780318823607547935637486469015457412, 438452747146091, 1737554209613176420304394351228234072402316909838859775002561306923851903691, 363367602053855, 1801292367229365643184247479436218367273808679365781105918121655559229665225, 154930732170459365, 1848266152295288356985115283747088426067114759241612918997695455957471968696, 403314334335650, 1878258046273835282660464329816825519750175948570524413156574558818672340506, 24246197696707, 1881482924237567860686590196821829359504643259963553606535239648635132467152, 26048323580553489, 1904846411118340756464578526217964160773902488482021076795402038899216169941, 17663061960343841, 1905513300430770031368218103702115131942777769235681500106894486568481242622, 238948007653675341, 1944450272887157223426610653572423031362266550222155892621605508213924829719, 7624671208588692, 1982728178468065104207436223387373511708760326231584352032301258230043663348, 346705910288075, 1986447937898956409248811614509882865363565577741344176200976721472410219590, 340282366920938463462852926431768157427, 2017990297613190653991372914344030149819479627288178142546936410015944054070, 5652990080819039, 2022583602348616218672109462827703094192909032480119622175982566288202525400, 746996778363480, 2047037892017182969209168622546047657798463462402932644962564586518502751091, 4487345967727], z=1740025911685501043848553778050761803570263315322858449433254594921426199457, alpha=2235513047215247894260494345845824146231340135148294479945774337064389265744, prime=3618502788666131213697322783095070105623107215331596699973092056135872020481 ) => ( factHash=9DC30AF14086BA613E273A5DA47938C505E23387B56EC5002371208EA7291C03, memoryHash=70167475095130609377264675714429937184004731168916915955739867992538245621832, prod=1134928300335844160977681597435304400917745025969765771179612889762699761282 )
{"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"}}