ETH Price: $2,429.86 (-3.50%)

Transaction Decoder

Block:
19059552 at Jan-22-2024 03:16:47 AM +UTC
Transaction Fee:
0.006702902165051064 ETH $16.29
Gas Used:
519,736 Gas / 12.896744049 Gwei

Emitted Events:

313 MemoryPageFactRegistry.LogMemoryPageFactContinuous( factHash=B66043FA4B27D634B4AD68D4D37568067F05FC60946C4C4C405363219C56696A, memoryHash=17415577258496467390018268263418307964010689472374126923076575168103058568307, prod=1062274161607330895509227071398628561191035337219891021465666186634509562713 )

Account State Difference:

  Address   Before After State Difference Code
0x16D5783a...6B29589A4
(SHARP Blockchain Writer)
444.900831368200490558 Eth
Nonce: 1142715
444.894128466035439494 Eth
Nonce: 1142716
0.006702902165051064
(MEV Builder: 0x777...C94)
2.560441960234687705 Eth2.560493933834687705 Eth0.0000519736
0xFD14567e...1ca7fD1b4
(StarkEx: SHARP)

Execution Trace

MemoryPageFactRegistry.registerContinuousMemoryPage( startAddr=3518387, values=[135, 1, 1, 514024, 1916842259357779196237592357115848619905507082229994718774066447208053936358, 158098919692956613592021320609952044916245725306097615271255138786123, 51, 149446818744498386695737949611168657073696412603028331205512473665407675343, 1495111759253203619252814524387291, 149446818744498386695737949611168657073696412603028331205512473665407675344, 1499521437717368506913312133147289, 312315438748525754360220431200994411232431897970199375382788413860782092338, 3618502788666131213697322783095070105623107215331596699973087042106071630475, 345381334118464255126052493771507379815109476557698899710045454408725427272, 6933604012431413544812655650862883851153078362286360257924005813124905, 431547474510769702155100159945148009395846458350141606592086115523815136618, 1130971813307082139, 459769723891515913928412348996318145485566725625034331602322234964080782689, 2999434015947047, 491954319610721434321200489999624384751262042711307339948050150059002058244, 5859871903100829, 866076183335652856342187577625543322353280177614838183410969495231497411978, 79566983006896980082878204803230338796, 931728884292689509436548352375510202562030379366429925699120448836107708623, 2786508487986, 937345983583519873284404485236519743766176961670027462038500476491579260972, 2071343139049838465173589477529566451562000094557949939624541802, 1116473848291956473645860131404313652761312890672060775456894509993886798709, 56611437498256604290086574591540, 1116473848291956473645860131404313652761312890672060775456894509993886798710, 56685026681159373672671100181951, 1215703449301762375071780693108268399126922127951589379198975600462357800991, 4356960195407, 1215703449301762375071780693108268399126922127951589379198975600462357800992, 31403715830347844199546083306744439888, 1215703449301762375071780693108268399126922127951589379198975600462357800993, 81030501687625747899311888208, 1904092789285874673081327266623210373424487922914203728069976234956103548643, 42530709350089587, 1972640192590292121745188909541438638236900464745877898886385688591982544835, 1616792641576358788125262713466755, 1972640192590292121745188909541438638236900464745877898886385688591982544836, 1621952342446584731761193955546945, 2062276809979065972868033225094057750465587480698459578680695424035650284894, 1601315760632373260942118172231021, 2062276809979065972868033225094057750465587480698459578680695424035650284895, 1606287976235826252904340213623987, 2157388767959686951351327063936045322890004698354907305737242238410963925383, 87616295130105, 2164259064448792656683110531645557419488088626838598915610992084802246372989, 8071893513266672, 2228587327193083716109407420185383142116024217638096218032987595692409626220, 120968522490689665604975007980398, 2458417299871186073952050632736681010778824499663422560212376240668145302393, 30451149535669029, 2561371391786001190511122834318912130286957294967154168490315112691495753152, 2912235066, 2561371391786001190511122834318912130286957294967154168490315112691495753153, 8775861067388250697965458695661512, 2561371391786001190511122834318912130286957294967154168490315112691495753154, 8795408391332415392773237918758619, 2617165693770499205865153776930675365897318356185300008280020303742734696479, 5835111934492915, 2686925398807993759300683644150400259406572641296674021406013295424340829581, 6914293797907675172685289613798735627180544220909831731106350028696924, 2785735167638534099817315612601605046291093010903147253176147288874738461654, 1579577889995218483165797300771753, 2785735167638534099817315612601605046291093010903147253176147288874738461655, 1584622121004660778403804990934430, 2997878784073616168456344855405903597049099745228765459305212475926945267789, 1954036661818932175059026244776232268442283156266653044893179833, 3045090468723042889640446608447876349593023651824166261370084887412010621349, 8779000537448841221968897115387987, 3123772588048439710258337510316890470073398577728683620599016348675097418047, 2723155693550, 3188250638588548972371202057265079734843037210054969249153945869664776237127, 3618502788666131213697322783095070105623107215331596699973092043004302532980, 3287119508663585868635005725969566764585134426992504170601255761428757444491, 3398815887078445, 3445038001558616718297057437085533279192114148054409451784502998406433428264, 1753578013471, 3445038001558616718297057437085533279192114148054409451784502998406433428265, 25306293499256927576830633365562812640062, 3445038001558616718297057437085533279192114148054409451784502998406433428266, 56051697496291554042686850727573, 3467110093849686882923543663388200766909409214787007297899642350881069679655, 13131569487501, 3478000659310757169480341879062039246539615237833936365933560559638858045501, 12183883973114125106588182421111, 3478000659310757169480341879062039246539615237833936365933560559638858045502, 12200014508017888353948593934884, 3478645109519650720152398844199162396617659691287053610633780670522651242069, 3618502788666131213697322783095070105623107215331596699973092053349363532495, 3484704768389920572033470444135716127631919979308222640863994588224048834470, 1512971119541239530552250122840272, 3484704768389920572033470444135716127631919979308222640863994588224048834471, 1517507967853943763739116761462452, 3532244258681429045116552842110699640217302426734431843453805582709940221540, 2723155693550, 3538996367122642164438464591782115438942440124475831946331205214476517365912, 11388721592566111, 3549184526799682985056670563349759164012469156518119417824095031315510444798, 94016737670753, 3549184526799682985056670563349759164012469156518119417824095031315510444799, 1590015191657547525997412761016313514927, 3549184526799682985056670563349759164012469156518119417824095031315510444800, 4039442065848069772126266200687, 3573668717065253301887781113318729317336816840571832987798218217809289759164, 19566315672993627, 246930652783857782251838442103670756662366630621379341567502181154550565, 6, 69036229591699849960932814930274583219423937176044869651883289380133062597, 376168677137985769281454956164663, 731009553143347574080655238666149040102619103132239422267183761870156583437, 297229029761104012203148103280962185356, 731009553143347574080655238666149040102619103132239422267183761870156583438, 390524848075, 860370950108688216340004790080337058268427944294306403669698046952904826247, 360908635330794961357, 1446821757104641781948757487033289620065803269090287896475220893178955257282, 1705881256, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 886696410576, 31044402731992597031691846374778374632026264261002514082335316419529132473, 940783947759187132416, 84386485312597548087364031012269478474953862610275474628345266950365750193, 2, 482148859801725464274198147480840119334382080162606228723774290742111978842, 58993742096, 573626898100370092484029577799205407210558772901379288068197999563714079081, 445529715, 89969248537275856283909992903723960799405901172202770579163235044958208013, 6, 110244652309005374945798656755709771675416732780445712498678505832701316319, 467432203020900892896184594, 138836169848540343002265209867274254697778318298195092277383810183877129713, 33325766464280871025032, 427440394881294156717486485601507960246457600280196632312567665931482301697, 11228706909435575, 1042064173078032847147380598477853770687611561233835971197476790740704582249, 853613830077565953324986198510, 1307423984895089609360774513102017208534062222438544567594916900687590663291, 1705881256, 1720794232242994781284872244532386137553814968655022101269663356738117448992, 13520991968410678975, 113350801523752587799729242906386935701410789755416117654615327954700145261, 903890459611768029184, 177767439017273396618530403282160490035297534062389939682493842533154699023, 442721857769029238784, 228127240820201420112041055406192968922581942321662179607685569770048015434, 3, 827220861550361775567781794488524801583671955481509831981744502253130788360, 388907336207, 2056412668049510940615103414180044371230942148893240032791745910809459502031, 1094285803, 2994533810071773497955239204243153778132620958118904347398428987327182091394, 0, 269242478517357483266307750280459981291489533828625277735439342672007790912, 2545650682171918123008, 309784071081583183773609220526117365754443134739061239909914001935299503748, 1420399293675635474432, 317991406541072468184702269284250699015490689182939768054707495579168358755, 737869762948382064640, 349517979495965525467549721847130407949326083660575503783677770263102863610, 498062089990157893632, 358810199151218248631742943895848912302453816508596486318701657214701944486, 2, 1449143547645090542063072844265667315741990491499711687374710081456680373748, 40916467, 1449143547645090542063072844265667315741990491499711687374710081456680373750, 1705881256, 382143358468880876315369482034700825209636286761163100995679768156443838143, 719423018874672513024, 384951977558067211932542654495690093534227763489052484082782105002523159930, 3615561838447072116736, 385291772725090318157700937045086145273563247402457518748197066808155336371, 8, 83894559634946061282897779767617074190092610659383120448435867114857739327, 1108591665817466445, 186167829651843665370731720802845897128705963237440697899567858752896827244, 236272581727880515, 294905775355887106345926294398320040021202719377510594830934362350702720264, 33325766464280871025032, 972561937136063678161908936632902287790063448398979008459691685301784412513, 3097225068616376806, 1138102585933080762687588574951940568393916737061955149298889590431930889549, 131842016106960174913033, 1297713107789520337982513184691958288380927033924334369025906284470037001886, 302561444232412159975334, 2409203347321682120730340486800913758037949958275226110807096803934878526777, 49508840337548957, 3490545143558998883370498273209413554535332859630182278663381716338609741973, 1054560036061962939019, 443096675116300591155898743535709747298358601345362485293029762307555727806, 2434970217729660813312, 467359278613506166151492726487752216059557962335532790304583050955123345960, 6, 321751264442790402984935101055086840420519863546320125522244203922488951779, 104208999192688146681013, 321751264442790402984935101055086840420519863546320125522244203922488951782, 42165674812359851795, 1032717993920308306191823419406815870858725944687744986845677154805147281824, 293888385689660401137, 1032717993920308306191823419406815870858725944687744986845677154805147281827, 722666429811, 2115492923921523814468632200599040563669287468411561214414663525667701459652, 72988899055164190597, 2115492923921523814468632200599040563669287468411561214414663525667701459655, 180002652699, 471628519931846617465142146132066318864334758115234711506750392333400660198, 312414057632344966168576, 482876828289395875538132910579471976747156502741786274588755116050381611281, 5, 80340527977747097836840676902151392697085070393758918284682978558379809493, 114895425153377168000159184257194641, 677354190155201038743814045316493356103373441409500801990605276230462941219, 3927641486527491450081791, 1023548229505677656203287193217489233849259240504126459756641548042885197554, 186549406843939673030486792293394995951, 1346935111623457922835109395913052593384289375301391022701050325983491543226, 297099303105964762193193466198999467601, 2098812999887966088271632188546537644100645662027595579976334003949714660354, 923957748925236990854663249, 493360829108061899262517154793100363383981223714803999887425052077147402534, 1457292781823054577664, 510603248825308464772911100850272011660279365732490477733199747309683746437, 10035028776097996079104, 517125115337780208081305629975956820263165114138824120841711207270231259977, 2, 1347340110289942584270262332930643676430285484022411348472957753175710398317, 4110947230598157245213, 3359472927526315962066065975657266385472136482794618922230834917843173525212, 0, 517212358319618319889203249563571866606926169772884408235348152795041861881, 2213609288845146193920, 622334442476259515302654494855977161470926588113966396576817679898061235090, 1069911156275153993728, 656847641993206356497917094634766613739825969845064837583799480005674680585, 1, 1387944465229145557758564728920056466484656792384318304143034956887121406598, 11235113873776320284, 710138760971140078039998435810221110377579032407993842108676816120974905637, 276701161105643274240, 773419650418337517107856101029931836850298774485466530128029681791734852785, 8, 731201994662307612410455945909975866563471049183908834065597335128492884422, 12778132380171444, 827220861550361775567781794488524801583671955481509831981744502253130788360, 2397793497488674321049, 893284474521630244125712990578842148064419567169923444611532385061314488898, 5830277957567635, 1375717967750623798298895497655119049852330582872737438099622830011246499436, 0, 2056412668049510940615103414180044371230942148893240032791745910809459502031, 741355354474113161, 2733147718641086191045968956862591838917883533625487852371361885317705607468, 17239205839266, 3080718803218369009748661676279686032652479789116665023720925481279526792844, 0, 3254955782286712753898471588288205717601065913455071424137573892706740737710, 0, 801027926088678394545989668124472259567188191090479149332311438674972409525, 340282366920938463537161583726606417921, 747754797100332948667821850294777448537830572225381519032197321912236318723, 440168123437330633874675177419976431975019168943402176995739208264668116428, 0, 902492192278866739529390795567852665941148840926620678225438377550865106375, 2, 482148859801725464274198147480840119334382080162606228723774290742111978842, 83211775432257003258, 573626898100370092484029577799205407210558772901379288068197999563714079081, 286445600829534627, 939113133580759882202429460363925195026675967536778748012114351347777987633, 3855369511405296287744, 953429167854021456214891659882545993405655670145442049572617078272991464023, 36893488147419103232, 964110019943162826494266496576960521273208404751188077798416911616216523509, 793209995169510719488, 976508635660205698674353412389843959059465266392542433860111510580991172055, 848550227390639374336, 1067984100240814579515843871227336301355934990850405384652752863679638970093, 442721857769029238784, 1088182639472493090413753496775985725192653342502072948950672367332513160437, 1660206966633859645440, 1113799926267506976202174783456295795618804114220774482202125604808956218119, 811656739243220271104, 1116487147160809221859139243037574942329674571852683717813829861470668103545, 405828369621610135552, 1133554628447552981256540131844071545911934628546701194874689908215289562105, 221360928884514619392, 1175572009356733454133335088913823440509708769469613108446894679460468399694, 1, 2815696378712028266699452022705844117385407119751224256357304881108518326404, 80715915645072336, 1219913316856414975665226547503919263736589216504981943158992194534804866138, 1180591620717411303424, 1233108998134933370701280005178683984071017247694264976893617863414710516554, 2, 250390004875120143670264695442168943986073957923741845592117765458923491073, 34047, 827220861550361775567781794488524801583671955481509831981744502253130788360, 989533123, 1316564170496685921105761547606808659335894555550884750797574753463431644358, 1420399293675635474432, 1331238263733600393839612276802914221008801731112900598486557480996514991449, 1143698132569992200192, 1364966298610332822004431829378657695887305321053242855044178008127238159039, 55340232221128654848, 1391491929744351893352532043850012693180054121000338878049546206654623374136, 645636042579834306560, 1450657962184898807403328580568797334355195727550662100704544185329371242313, 553402322211286548480, 1478026850042277379114963086546268169563341437741914609330885434707408017503, 2, 1145406006069203011066621832378357599194796429802616844187680650303949633888, 1, 2901683604461182171964874900352702469241847081187672485320219043264655207956, 2373689376328122109163166413341653961250463467658623033461773253298801930939, 1527483966556291511536685042339962542825415317606290981097430858326242892393, 996124179980315787264, 1534537634122216499525610407631357887714995777081321560297134704828027343191, 1, 3591615373686779495322654028116410248526891992020403629506472404047157157969, 1, 1555197577114756355564027573249253948451081696529857263833814842831167582747, 1235931852938539958272, 1556364664457008469814027780522789991240606452304018482773708304758311752323, 129127208515966861312, 1620093712576881948733021804868959589487087352118466242186876149977525759417, 848550227390639374336, 1643259635762822448459660201834866900626400807431107152255815709746067589674, 22039173695088191955009536, 1646627772114694833557736554623386963084072513260480755542486924645482061805, 2434970217729660813312, 1652309332987561460785275841861681796788021484792653689645089497347178366154, 2029141848108050677760, 1677290724602248194235965421062728690228153014236776357559189893884575859998, 424275113695319687168, 1685350303583855117067389446639056279535833095086055362704522061094272870148, 479615345916448342016, 1697976047109086824598844652502672822017710741082085130473926301342748942512, 2, 1756247346368670695840003654156050889557105595455455357691117085274403197148, 66606, 2511057619652868685601839158172903168246378978025250291153886553294430125617, 28524917651285400280618191303997270364719804274265626708276909356468190194, 1775236255776325910660168546791296621805647577050431225652466633972662474030, 1199038364791120855040, 1806018566677800621296032626439935115720767031724401394291089442012247156652, 2, 1557004084459112997824749542614895278421960010079122453994546383358924652269, 844382204, 2518956419953065494757467196911830486676336860355478130250654895994864965222, 15090, 1821241059578769026879901964196602904803580551708761127809313177494711937122, 239807672958224171008, 1857528726261984879842734480794736339011686251193958467600605747156619555920, 368934881474191032320, 1898492906140482124744169414871110996235491741234557367095480463712903909197, 645636042579834306560, 1900349827966178126873344004147115241884942459992503582028709687083952888002, 184467440737095516160, 1910746401101904538696486738549106129291709643808705363386001447682393341920, 55340232221128654848, 1911362221108458007031139052628740874868749552206838970672814932936156368479, 166020696663385964544, 1926760329306112340144187447697068455023892882272805676982178070738796435418, 516508834063867445248, 1981022873393559553336672619699930291725680312684965386034567682836102097098, 1383505805528216371200, 2012594228993036168055541936466547238879417581195527922057532121962236728595, 1088357900348863545344, 2026277432377627077586592265423680345970848104991533515191680388006789313670, 5, 827220861550361775567781794488524801583671955481509831981744502253130788360, 1293250132843, 2056412668049510940615103414180044371230942148893240032791745910809459502031, 3467574722, 2083099725560866882966711635427972303385572720531643159854711283098981832498, 1912033473, 2839513147746011805083518106680616279171435975040552051691545546037220613147, 5425247, 2874051356517244500621840933001742814867570881739945084372581445003138767067, 4812035, 2038750380419552583401254313617686042694182141506478825249815000071343264564, 553402322211286548480, 2041704402488660517880191064324272458644124483389449319613813678101908067485, 88212330160479075827712, 2060277651458890427650416674780376248380567265331152131373671630182845913615, 350488137400481480704, 2074216815754527303443131220891807782653098447296898211060186770063472766814, 664082786653543858179, 35236809363788569519825745812479087242050199893875722393165884661561316891, 1706486056, 35236809363788569519825745812479087242050199893875722393165884661561316892, 1, 469119304951288885725395913604045731347180558159232348366513628519066716553, 1, 2087021424722619777119509474943472645767659996348769578120564519014510906823, 123, 771083640874344086535825016699278150573461798891203551032898636331704275, 2547892370498017573585, 45123482009675352067909268678592464852294126699604735889398176461417899838, 4290289414567869, 46847859343447362310880390452412054592006473218689625297274723382519104388, 3596207337861808, 108294437618954245308470622169230846780142328206570975719230615493934927801, 204925300372073321, 139827815235313464815754661842614698192632040842461267509618921963044028601, 118202956125032368, 166297985748700225243656325148081991531522678038829317673728198846528187056, 89076171577599534, 166645000162915562092656609374474013823530132662965509622940641492201481546, 16367688312681947, 214940245319543007839765195141426980434846456627618131283231975352631038458, 74590085120135200, 225831468579574368057183072134556114867341486479445886097910452972037971326, 12806772449562136, 323891885492457778233525294477296396208215149955440536196330919208738274166, 2197000000000, 377766902601750629007157546007702578055638857435925496127844537175197204022, 901298481601630, 378513094368701533349813868133188323653602095026561704646898843444571481857, 680243525106281, 389031809197776346620335798881977767379801165683876707144667936824307391261, 6788917571245793, 402203818018003161230395989487321866767371283189591635162574585819009405729, 166741137514156517540, 443541455057444282910284236215284793452495932297200653369857077537936901000, 14053725719314345, 477739387559832265241027190798176272980242435411250765045387175076361358985, 75521221729588412553, 479053546877463922344476448369885864431527618241733554813403752039534142613, 4657350394248472, 532320707624087532551459463889202928854108227597037837417686440593060374439, 41636717743004220, 542226083529455693099718050072207985417866375893753900479717617702096744486, 5820903154026842, 579707194106057406913775648753831104588209996274323151342520324306881063312, 32425207939446103, 585205623185273036175010917179074623132577709196335840296462050270615247391, 265658262919586697516, 628761852809811115532590034011493340140592667013273182127332754134313169154, 617822001519427, 649330761512956570175984869251785908595459974357039585326554712618877491828, 3017665799006352284, 666782163539171191656574278079335345743885087905096771788320321546223135024, 784558666947618, 671754451047434162007156778213593764036683269570848193157408915916840196964, 9673929830433771, 702287404589959990801083050394306185826492075933202130858552339128365867033, 1146234981001431867, 726301869043112555374345760027383563033428210027589866653168423832920658410, 545064907564639, 736843370170446423575941528287591624790725967471937900718817659405792398252, 2174720243321362, 748147558372805967393311899814774569297146288729483086675165787356694614762, 39638830610817729, 757993482563316245971049349164665123322793452109344654523010696647319570374, 826818322988511, 787145297287210009536447184719241376647102240076248427735647158920554743816, 384919367780930, 853241088964285534426013068244190968166882477279765395275771302730599621946, 4269436181203485, 874332031539286508615644308127500565542578026980708159388740229084746987832, 4320230097480804, 875263605039863451238255097155136285643006883080350282026311634014225017964, 7654419088367675, 905200277542882580243389769044933442386340578852089656946956938838404761968, 318636178015706, 914451516149353195712427132007559502668742724027985138178570284887782306690, 3853475701370995, 949003807792041328754233260379474615517164405062218237407600350925658793879, 582246087467512, 953458885787918404571956200640028727642735241956930372415558768241830024325, 4239876291296918432386, 956145948687768719921932521510819506803690786167345724506005409237799903734, 35331359948621, 1130527439342877213401147197005637495033712634168481017792865424841910099057, 30363775575916314, 1157149891383336645336465577141014516081816141982511554252152489452971679184, 1616926146021850, 1158090360117003259551914491736073189174937900088893809818543344086441290858, 218014200695793, 1164683553437737680633841816717503420866759201471788682893919881989843203168, 935478178085394, 1165137249275543885884157166540746539359497669668853213573728310332500396782, 40270443737477024, 1192116653699533230212045043708350409976474893442228731062904453010776484193, 2846665834724179, 1208801280346351324626648077919031701664255681724753034544196157805673537500, 950692341515925998, 1222320345634912353007797063090892445166534244424516685796698543961621401118, 1125006444220327097, 1224620293963675779519379633035085676318411249635648052208090951329829222615, 35381907106429, 1266805826136240061667038058725796119899681966058938410405896067329642963551, 1043637363409292, 1284474929291798753417022886673571342162439710371384846709794271978122560486, 170343105813860717, 1284975956978757520112775897520750575873361471596103470467401728704630602153, 251635176, 1312084403895863057963942902234492722181073809736317183750701312513180558870, 1596061807952271, 1371993389891865148303585068415732567507912916324012940633759615479029120120, 6873857959419804, 1407191673652212680568258156774167677047341710566519929689243975582995403053, 3005770409175868085, 1446221026751427853379212177821843448910587001581581429242575711794060062451, 32733666667832535, 1450239411879873849930380922399195087337467367494502005372817823843660457310, 515181691330052513, 1529237037670849394647868374551406468590922959215575835821494946170933418456, 2560425115512374, 1557004084459112997824749542614895278421960010079122453994546383358924652269, 1940080507047082430342, 1562109336547863293182006871005276577659184300027168101830615042294641304944, 1448880913484989, 1573030817367796109480701107367628034610398653627191925860263392029834636104, 10930665407639048, 1602984760122078679149661122507987226338308439597818632041100015261386701852, 10511711439887420, 1607865437984290962440510866741788653690938325948736859732969371375727822462, 40970859332997477307, 1728229173183636630271744797515890568150362030638950535813534171845837097531, 14611181407944429, 1734720905223843735220320310210983167389302381713057035896551323468870873915, 102366759238589141, 1751702849850557455201614697361820189002346027143742645886986664977166253269, 244036057869326172, 1764452845055321715653915226628443325623994794478412812495038274281159971608, 4574205676462027, 1767389773463448207461145512322314675086283171827755824374904420086006491203, 5729187538489543, 1781536235053885886099789611586120281959579631171179037867534081377637900922, 340282366920938463463374607431768211455, 1781536235053885886099789611586120281959579631171179037867534081377637900923, 340282366920938463463374607431768211455, 1807437159733345517048249596081255605612783969910328618168557025977390239954, 10278828087506912, 1824036244364533413254958472504496100795742092933040419179148407613738172091, 3555343776386975, 1891706297657710063177088449701528835042630451745687503312665771809380203359, 13411641085915216, 1893209567787940994205162176128744018379566065162569908176875863428800613391, 9994486862800817088602, 1919009528300487416898558168639787817852314761514939568475739027942176236393, 1437736775645439508793, 1930994365900899695429444560050618425741988066264827252268401655484010074701, 0, 2029818166372553666119221082213410849546805707282838612360195242643391909730, 510450713720559, 2069912081026075203807678298279896756222141755567472685243376726986185287735, 2131331560137680161, 2073228319134722934002131549888439625535063166635370537656356776182006122472, 1103102967301160, 2082332565896149669096986593843450666768575991251296089487018576539152871154, 583751583782738991024, 2099133669117905593205850514672276740219000125441725408400966709934811735662, 2191414082027750, 2109895075998154347912734724214053662672952430586634509994236792015799104546, 360908635330794961357, 2122156395028693122186496439085055661184620410483882639247233395912481839977, 2463829906639572, 2207636239603716684184393288174208495007324526654422500447886254587750319165, 2118476891391687, 2208059073744556149822006709027739717959372376766265106783257875801585022251, 13936043683896984, 2221325728307493334030575785697341902095945680037298924014161754345841374801, 7418951475023597, 2265099120321344950966228481602114626762232937629987767147172319747633209374, 35381909449436, 2271148595433951036079973120554115043318384478541018789169355381250434203246, 9860769930813767, 2323602637484024052605926866981049595580958996713260545382442960512853208370, 515070565981857297, 2345745222630486167335756192569440662722620538186376818619995233863392326430, 289634402043150, 2370651675913000754589304875999820947824162823964143540462643623433702955803, 9162799470783818, 2391257774930840040377368641019581761981250012793463501307151573516264315546, 35207945395286760552, 2518956419953065494757467196911830486676336860355478130250654895994864965222, 1120705167667262, 2532290790251440433677323745489334849965693012882803163997621633864619360894, 620753838073519430, 2633251562791263856344493080917607276819575449089624535433925382831494175506, 6862158345745068, 2659716755973173492668704776233898299103575495199093537783276721882440546314, 152248880261496, 2681661231811948515051807739401100367655920621452970800151855753254784513986, 3604646354940378, 2696839242932589119200088102684821387595776329505063842866396287972957534843, 3097971359299347, 2742224147407884254551833977951288067818231273869276578603698152261111084544, 3172735364796584, 2764865763360449164962941614342766461856913993394385110741110904012176029667, 3914501106184772, 2799582665928320899833602850225836583210252736464672083755245503596458387459, 5189617848935763, 2858855483973009517425352051435508845295014349497334599017480944677546299274, 116119507693063, 2863752157223093227856398413390596113758882163955489312563489865379785240995, 15599178770446463, 2897571922590892540007956674348073874377532864749274938839737488310668390791, 14503785581830129, 2913666722361658156591642569459777396484871787646129802942982837712495101315, 6767589593892418, 2970665336275833829169438428987162794471102753583259648182049239387236095329, 839208176998650616, 2983396153394711857273269349725615970215640590372392366855020529773303878378, 5331635134051139, 3086505767621357777614965372197783484649885819725416716087621196842140770004, 2350268666050592, 3089574447607411224270055840182189610586486669833514598921133609955787316722, 49246417353054839, 3165388930327014798695292409894512041374666513754606646154640169945096921789, 5555358688273073, 3196419406368728321227353647475885675500393823824246066285534926734768317261, 16139436111219668, 3232322160520640222476238627865137322614879458203499940159432493212738651374, 13520991968410678975, 3261304740995392596823358535348101644603601731645417592963737031508564890302, 63417069610399, 3334450694004141511729644730856010498425036875176322123624532046791877891105, 515364732488878931, 3343972154005516744986306537226722810503981753380181890811177556099997234108, 852216900189777, 3378107237808856434496168836203973445099371374602801736360612940175127565144, 1285520392381749034, 3432629149588052561349375157588725917344760338242663376783004188822755572081, 313194278490019912, 3493701930541769042550003392568326651226851733452811768403448949896278445010, 12577180998482380, 3519057350847493777001704817595387927584088050134800066312634372565839379225, 3479053291534496, 3520437286468285536782231424961318019377305680148685834422395232203380371325, 149364636747291, 3538162679753978589400548646839291151151413799026210405080101965966463137414, 9463759163166291, 3544208797201901395456909634545163151059394703198126451144631546604135304792, 1717429571832546383, 3550619521645306881407868136402532780691879113013057661753158761229061378275, 34846660672940558, 3581789766478510329721326375275522964041915113614290812087187469098624737407, 11010938643591409, 2149625499377050772775701191274921578103398273298955620360611655307104287237, 30, 50404373779445950712495491162526906454398246659896615095321081563512306190, 1705881256, 50404373779445950712495491162526906454398246659896615095321081563512306191, 1019856622465363407207423895, 50404373779445950712495491162526906454398246659896615095321081563512306192, 1029403165438287329321497832, 50404373779445950712495491162526906454398246659896615095321081563512306193, 26441727267736912540756096, 50404373779445950712495491162526906454398246659896615095321081563512306194, 34281013383009624819357137, 542762213637252100279728039289979460748476929192939719841854647057139830184, 1, 817389594602328319572423729483317878651794985679461747248832986206971992980, 4, 835428841296833179314561266156163682004928226840052760501397386552958520443, 18, 1765998000210666686542270346035434941067019742775617789028650466327812549537, 830100545157142, 1789340305022514556868961069266240009084182093271297189466242695057487573046, 1705881256, 1789340305022514556868961069266240009084182093271297189466242695057487573047, 1001711331451103794899912657, 1789340305022514556868961069266240009084182093271297189466242695057487573048, 1012683821838597529776814463, 1789340305022514556868961069266240009084182093271297189466242695057487573049, 4549955544756300061744839, 1789340305022514556868961069266240009084182093271297189466242695057487573050, 23664203527382677935480124, 1789340305022514556868961069266240009084182093271297189466242695057487573051, 456032524039649128300, 1923811904468401123940018413124166886870699051797664152053126940304778142395, 6, 2060004538396169651313621397383418198310978326934093217159479066329091952950, 1705881256, 2060004538396169651313621397383418198310978326934093217159479066329091952951, 1022577484402083990310429801, 2060004538396169651313621397383418198310978326934093217159479066329091952952, 1032522595829158787240871522, 2060004538396169651313621397383418198310978326934093217159479066329091952953, 27332380512044082605977859, 2060004538396169651313621397383418198310978326934093217159479066329091952954, 34853586145502434179389618, 2454773981848664650144951026436489859421744980325273491042777137089597519377, 4, 2970473744488901163079250775372500011690505536786210299280744849648421723670, 320, 3140353121183616294214261456491700588582644956581959131214257531128470045788, 65, 3384397665662073639046412740352903226445069594320044188880925030122953402604, 256, 3497355258858845713745264256090071678867016701734028114828810804196164149027, 1705881256, 3497355258858845713745264256090071678867016701734028114828810804196164149028, 1006419323804537032390741186, 3497355258858845713745264256090071678867016701734028114828810804196164149029, 1020536541240128286040511735, 3497355258858845713745264256090071678867016701734028114828810804196164149030, 2494385699758654633537892, 3497355258858845713745264256090071678867016701734028114828810804196164149031, 16389818555484415985101887, 2174638511841737981141519476379213046554268517094967496121318408370098406833, 3, 1449143547645090542063072844265667315741990491499711687374710081456680373746, 14986051750078637, 1449143547645090542063072844265667315741990491499711687374710081456680373748, 36673649, 1449143547645090542063072844265667315741990491499711687374710081456680373750, 1705881256, 2192185015552815667795098006747700517719605501427252033035433606745772754846, 1, 2745730450024240904892142469016600081802652271877296813896365119570977932404, 340282366920938463463374607431768211456, 2275942855081102642178493683741461760026517049185027673592173609793487400358, 664082786653543858176, 2282211910749421378458496656261589310905316811275548126887288964306015129490, 1, 1237302206674639316347003565312085892609745594595746883870180208969618781058, 2384498131663282660, 2303053674119330263676549895157929533706718767911031169890633457697673262738, 1346612317380797267968, 2327415890527496416664689806179186193519486768448009985822134689255501323268, 1365059061454506819584, 2368576823837625528275935341135881659748932889268308403712618244410713532584, 36, 771083640874344086535825016699278150573461798891203551032898636331704275, 1058989257341, 46847859343447362310880390452412054592006473218689625297274723382519104388, 0, 92366628414183272194356986523133228951279346193897391678957407733991505289, 1364503099, 166297985748700225243656325148081991531522678038829317673728198846528187056, 0, 389031809197776346620335798881977767379801165683876707144667936824307391261, 0, 443541455057444282910284236215284793452495932297200653369857077537936901000, 11787416, 477739387559832265241027190798176272980242435411250765045387175076361358985, 184189831204, 532320707624087532551459463889202928854108227597037837417686440593060374439, 30652413, 579707194106057406913775648753831104588209996274323151342520324306881063312, 0, 585205623185273036175010917179074623132577709196335840296462050270615247391, 500477214935, 874332031539286508615644308127500565542578026980708159388740229084746987832, 0, 1192116653699533230212045043708350409976474893442228731062904453010776484193, 2833887, 1208801280346351324626648077919031701664255681724753034544196157805673537500, 2284185802, 1284474929291798753417022886673571342162439710371384846709794271978122560486, 3030694, 1450239411879873849930380922399195087337467367494502005372817823843660457310, 9988889464, 1557004084459112997824749542614895278421960010079122453994546383358924652269, 301609191894, 1734720905223843735220320310210983167389302381713057035896551323468870873915, 0, 1767389773463448207461145512322314675086283171827755824374904420086006491203, 3633898147, 1817224574720863184708667051221050385301646908614847068959914496608709141167, 490, 1824036244364533413254958472504496100795742092933040419179148407613738172091, 0, 1919009528300487416898558168639787817852314761514939568475739027942176236393, 3120316605645, 2069912081026075203807678298279896756222141755567472685243376726986185287735, 5999864909, 2082332565896149669096986593843450666768575991251296089487018576539152871154, 831335726071, 2109895075998154347912734724214053662672952430586634509994236792015799104546, 886696410576, 2208059073744556149822006709027739717959372376766265106783257875801585022251, 0, 2221325728307493334030575785697341902095945680037298924014161754345841374801, 3100, 2323602637484024052605926866981049595580958996713260545382442960512853208370, 9981556847, 2370651675913000754589304875999820947824162823964143540462643623433702955803, 0, 2532290790251440433677323745489334849965693012882803163997621633864619360894, 1963352722, 2667393672288546559217156171230116371781887405155122247271748780929413405088, 1159026725049705620230351189529, 3165388930327014798695292409894512041374666513754606646154640169945096921789, 0, 3324347670910979010094325332024451354588958587675959080680531874831367476431, 229690437949, 3334450694004141511729644730856010498425036875176322123624532046791877891105, 9985596800, 3538162679753978589400548646839291151151413799026210405080101965966463137414, 0, 3550619521645306881407868136402532780691879113013057661753158761229061378275, 25774453, 3581789766478510329721326375275522964041915113614290812087187469098624737407, 0, 2373689376328122109163166413341653961250463467658623033461773253298801930939, 73786976294838206464, 2391855390141926402188931803023969197482576403727974830640533611372823518343, 6, 446127535987530822843443754568064058475455177152358443253709926349977944908, 659900008663242139541, 446127535987530822843443754568064058475455177152358443253709926349977944910, 1516354356276, 1174987432824581858839632426818705946102296612739133317214367202361599722109, 75521221729588412553, 1174987432824581858839632426818705946102296612739133317214367202361599722111, 184189831204, 1174987432824581858839632426818705946102296612739133317214367202361599722113, 1705881256, 1174987432824581858839632426818705946102296612739133317214367202361599722116, 2125783702499567, 2461707722432395661708797885477397117007458536930774680416205805182417362616, 2, 482148859801725464274198147480840119334382080162606228723774290742111978842, 3557800401912415635716, 2099133669117905593205850514672276740219000125441725408400966709934811735662, 7452626466017419, 2488385703784809824579876289161891422002764493781162171058812203494394314333, 700976274800962961411, 35236809363788569519825745812479087242050199893875722393165884661561316891, 1706486056, 35236809363788569519825745812479087242050199893875722393165884661561316892, 1, 469119304951288885725395913604045731347180558159232348366513628519066716553, 1, 2534681784017457087083809392510965130335560357182539279475941175006939624703, 10, 386918961764817236287108214349577874309930319273103704100420691745832602120, 1705881256, 587925051117230978859677575049329787515210459282303081540953785716124100576, 1705881256, 601897112170075566160254981726441596935818275695192844971359424918398073149, 1003980333658797349, 665510422891536736896014676904009373149827418659757784304889592851338223545, 1009628226307949359, 758014221171417364361118162078084356608003610083196408368113766612707124778, 1001870393752610892, 798830203618326948083471758956654105137674854207683174722935940817377787785, 45939878976468610, 955192637227222433438357776172610783478143472656848452353611940490902060748, 22159961043912117, 1436023221535982289757115934076816918911257223648826818507104343548396451356, 8182861540051706, 1662441835987761786991711945639535246520408167559589718982749543340721955785, 1005972981989466480, 3154843021503698496355874493826627483684847192136306888174943696622126007100, 30153056856370681, 2568481846582071250617113310015055953378698145200988933475684223485680594317, 55340232221128654848, 2584337183454067003868551957713576646166149016476289015424833629662663894348, 922337203685477580800, 2622750019743232303588409313508898196771891356668647053829438298132154734201, 498062089990157893632, 2647041896431971002231638184270570442859244414840588264296193445204675498214, 866996971464348925952, 2650041872375786387356098295345461303918671315832493531436339392722753333679, 3, 202076337303480953116594651839550915238578971325369550611892065508922103492, 3418601436914521848168401819632407163532934428249326639858481096123647425929, 1956090068269827350000199733057975632271994610674617304782153416979240551002, 1, 2828463714380751707353783682751898600554436948359177956795154825589439682699, 2, 2651722879560814669652856477504602945267782506345687644982244092997176673782, 2, 482148859801725464274198147480840119334382080162606228723774290742111978842, 2214092306886, 1824036244364533413254958472504496100795742092933040419179148407613738172091, 20134808, 2702431736017357540771502328594535337126947050258672692947704411192748936123, 903890459611768029184, 2708430770370153727205750321773580766830936095209040938204300450040392865828, 1106804644422573096960, 2723614570637910654941924916895835605239497627034752054520009779930931938488, 10, 28218595321148644836398965925859967884391572803125190865652730732107505841, 2012594228993036168055541936466547238879417581195527922057532121962236728595, 123675789485886839608493138961756085179723145710917172673489931224044056775, 4, 311376053842020174427729940728400233503633884286998038042663507927998774568, 720921236364732369708807512587554656855046850883224269557133444960710510, 538438187814210993457318746053842549154703512651065096158129816486265058847, 720921236364732369708807512587554656855046850883224269557133444960710510, 717511783135957835804591424268889957571779054553113058131386695908317410107, 828618, 793491981620552022593162453635000235726593593242942052970170682162933816479, 2647041896431971002231638184270570442859244414840588264296193445204675498214, 1397200276800833901403443151307459405557445435711686607039413325140771744019, 1, 1933164654240430075969022398066630484547750856874926419436200834580076930741, 953429167854021456214891659882545993405655670145442049572617078272991464023, 2758695932494202586155115022365902694874805853778238020047590473189857777162, 720921236364732369708807512587554656855046850883224269557133444960710510, 2961674750234518725621676310103124975624437333381942845291224199009912562870, 3, 2741180043512727809208737523595432515124858643519232998927755270161316037482, 922337203685477580800, 2770575734193010936772285481217978818378424054319693155465517378421859274113, 1180591620717411303424, 2803345917452555284579040112833099945005441424227855460946344411558694416026, 664082786653543858176, 2819444681748608035968244425328339700137817725404498615266088247754721857429, 534955578137576996864, 2821497379321526665180529326788580671666981684112661408113385766981822475004, 866996971464348925952, 2843076215692768972570000012330671668830421784835045134425071715381576931697, 1457292781823054577664, 2870349333964510286380914737058228524157042262825361557489201427352359401029, 1420399293675635474432, 2881784089635581531990915478758751940991299157529132407997792197850455433320, 553402322211286548480, 2941115406264387552877069593577614991326344477644966476196784573589474598569, 221360928884514619392, 2962719412825598700086523922686151698567499791006962445539149059358357648549, 1291272085159668613120, 2967174050445828070862061291903957281356339325911846264948421066253307482040, 13, 139827815235313464815754661842614698192632040842461267509618921963044028601, 19678248, 166297985748700225243656325148081991531522678038829317673728198846528187056, 517117, 542226083529455693099718050072207985417866375893753900479717617702096744486, 12883607, 1284474929291798753417022886673571342162439710371384846709794271978122560486, 2753129517, 1346446300952445496278220074988990778620090302385772101910063841818303861150, 3289939328, 1446221026751427853379212177821843448910587001581581429242575711794060062451, 9835604, 1557004084459112997824749542614895278421960010079122453994546383358924652269, 85818831775, 1721597220826937541657887555997539805968887515245235100587638522340018194732, 80891086997, 1767389773463448207461145512322314675086283171827755824374904420086006491203, 0, 1919009528300487416898558168639787817852314761514939568475739027942176236393, 1293295754034, 2082332565896149669096986593843450666768575991251296089487018576539152871154, 257689132029, 2161567160997683832389951669838279139791969450398203272741782165178905049921, 340282366920938463463374607431067157356, 3324347670910979010094325332024451354588958587675959080680531874831367476431, 268429097098, 2997181825693567353242614091637022585541477264365138836312752559837601876432, 4, 482148859801725464274198147480840119334382080162606228723774290742111978842, 300762, 2846135615435928808024035720602487180920768383256028639431625061448958179939, 471640, 2897571922590892540007956674348073874377532864749274938839737488310668390791, 1, 3342781271391775316824169692221075700366919895463417969972297250414131685119, 5851435497787816636316120236260039378853857878197894039314941739554, 3018392479574306791445080999512370142376309927130430104776840538516325643896, 2, 1323577066191568536463745624567125504530305609499919084050376537969633390481, 55349935767, 3255655339602896624831506237725626115430568378609932469357797192419959371690, 54855777423, 3105627954024171728943648069298653427429411586213940893986915533212817278370, 498062089990157893632, 3134719011267553977417911148421667093217000125607673209560089936321886029401, 10736005050898959040512, 3142222072820029721085468934398814268196703074634559415914372050780466969943, 4574792530279968800768, 3201627967081990066498997313338837982057829795074019527100498100439293397800, 1531079758117892784128, 3230436211061110110542529745760425900693053923490182062720670674698241408487, 2933032307719818706944, 3316477087992405266266995935632625508727922603857096609611105650095648183848, 424275113695319687168, 3337835517540446821244179376450762306284653344821494965905476980160418255129, 1697100454781278748672, 3343288599962965634876502253942849525815945617466592723699278124347514995905, 774763251095801167872, 3344662365413012717818732637518271827201391817997708353449773951692365623062, 14, 203362232108484838150157242315959560427393158046760706782853502321523470258, 2821497379321526665180529326788580671666981684112661408113385766981822475004, 270731339991180432013090089191198232625760410221803501848995803117387610120, 13, 653219560118133455622531417681038231732446467244546249887034161550105380531, 1, 863975400081334841180334288380152665297612657995225465152391294275894285372, 2803345917452555284579040112833099945005441424227855460946344411558694416026, 943594662004425151023105911404075317611471665645846059752835155064165242934, 1, 1086377101490712841001059540684986875039683585392245651135222763812425918283, 7, 1855097219723756523688904123926023046507255125506851928284161418924224401599, 4, 1927654616865292560863588084313935218338492757574224270925336553043469880474, 3516253074384279387013157142640466222867382793296777322455170324875529568886, 1948783494131118900621030447416216653506059648282067003611938751720112810531, 3412226202408456105524658486149948135941589878821190131163583752047007464057, 2101145619162886267854386414868918521114659207867457920839842224551706400318, 1, 2333117578563049105533074199312853508421901500269724307823767165488487451979, 12, 2492812008434711883541456456896673684642543146965835858768868074852216697346, 1, 2515315519082141731549351218285028438045184634285120212802639015035677549947, 1, 3145365331263347774887630566387962917554977024471880565664839392150369109666, 3516253074384279387013157142640466222867382793296777322455170324875529568886, 3373368620270374106990345329539298944881094977152521824421763317216145491094, 1088357900348863545344, 3378789632741211790337583322798288062896236709627912560383554110626213928904, 1992248359960631574528, 3409835186704546656557951979285501487724219793704230758202768696912778003070, 405828369621610135552, 3412226202408456105524658486149948135941589878821190131163583752047007464057, 1162144876643701751808, 3418601436914521848168401819632407163532934428249326639858481096123647425929, 129127208515966861312, 3424880921719237797207323901978477342951432116276432834558172126529079797126, 442721857769029238784, 3483472776507015561285986536838325939219926145935612105002447628545704826352, 5626109368528823566467072, 3488796095165551003812490975976509991633322013578458084167226256699277019952, 9, 748890510849191756010743701867930768365285201810990978215789661982690091922, 269242478517357483266307750280459981291489533828625277735439342672007790912, 1204924672323742639977784086162820172392729600738423511995094141631922710158, 351897, 1881941154303160133684148959394811510566860465865221853689092378872876337391, 2, 1883394950726729737946501761153178696219132533586757031304583894607669751672, 4, 1896385928699539744784459041145725681741516119336610697747471540449232909345, 384951977558067211932542654495690093534227763489052484082782105002523159930, 2540957480814222358193239461225070325451084983242192773171739907215353711093, 1, 2947457326563526980064833634605809316407640035483195146318408164435250210573, 1331238263733600393839612276802914221008801731112900598486557480996514991449, 3338547677986739303440717345824511028484533768168585347231262238674606750067, 5, 3369586836610164503206448434649715418711691434388218742143898598759420906762, 443096675116300591155898743535709747298358601345362485293029762307555727806, 3516253074384279387013157142640466222867382793296777322455170324875529568886, 793209995169510719488, 3531573890894924400865460246450296108386933607128947513796992875108120052684, 5, 446127535987530822843443754568064058475455177152358443253709926349977944910, 30000125592622771, 1174987432824581858839632426818705946102296612739133317214367202361599722109, 229690437949, 1174987432824581858839632426818705946102296612739133317214367202361599722111, 268429097098, 1174987432824581858839632426818705946102296612739133317214367202361599722113, 1705881256, 1174987432824581858839632426818705946102296612739133317214367202361599722114, 1041485, 3549257624288170332134806429412453926054303202565933141431495707943968246219, 442721857769029238784, 3581963385690862708893780813160475191968432215368408750771736020547213921515, 1069911156275153993728, 3597367839896006176584799578064665144832674207667773920670444787087921746385, 4, 155082539558689579094930820457537605560250202889383976768599028600060638458, 136476886841717785085, 860370950108688216340004790080337058268427944294306403669698046952904826247, 4110947230598157245213, 1450773348621475531073306325960351147940191236122574546481360435247650274113, 1705881256, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 1364503099, 3602181349175769039555453528446755363208261195102277579402287892689896750482, 36893488147419103232, 0], z=928216040594954501731122489438256522773562676631092572108406869295064699432, alpha=2294078056845166414048974638115695377041593068255483052007100907896222076052, prime=3618502788666131213697322783095070105623107215331596699973092056135872020481 ) => ( factHash=B66043FA4B27D634B4AD68D4D37568067F05FC60946C4C4C405363219C56696A, memoryHash=17415577258496467390018268263418307964010689472374126923076575168103058568307, prod=1062274161607330895509227071398628561191035337219891021465666186634509562713 )
registerContinuousMemoryPage[MemoryPageFactRegistry (ln:233)]
/*
  Copyright 2019-2022 StarkWare Industries Ltd.
  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  https://www.starkware.co/open-source-license/
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;
import "IQueryableFactRegistry.sol";
contract FactRegistry is IQueryableFactRegistry {
    // Mapping: fact hash -> true.
    mapping(bytes32 => bool) private verifiedFact;
    // Indicates whether the Fact Registry has at least one fact registered.
    bool anyFactRegistered = false;
    /*
      Checks if a fact has been verified.
    */
    function isValid(bytes32 fact) external view override returns (bool) {
        return _factCheck(fact);
    }
    /*
      This is an internal method to check if the fact is already registered.
      In current implementation of FactRegistry it's identical to isValid().
      But the check is against the local fact registry,
      So for a derived referral fact registry, it's not the same.
    */
    function _factCheck(bytes32 fact) internal view returns (bool) {
        return verifiedFact[fact];
    }
    function registerFact(bytes32 factHash) internal {
        // This function stores the fact hash in the mapping.
        verifiedFact[factHash] = true;
        // Mark first time off.
        if (!anyFactRegistered) {
            anyFactRegistered = true;
        }
    }
    /*
      Indicates whether at least one fact was registered.
    */
    function hasRegisteredFact() external view override returns (bool) {
        return anyFactRegistered;
    }
}
/*
  Copyright 2019-2022 StarkWare Industries Ltd.
  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  https://www.starkware.co/open-source-license/
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;
/*
  The Fact Registry design pattern is a way to separate cryptographic verification from the
  business logic of the contract flow.
  A fact registry holds a hash table of verified "facts" which are represented by a hash of claims
  that the registry hash check and found valid. This table may be queried by accessing the
  isValid() function of the registry with a given hash.
  In addition, each fact registry exposes a registry specific function for submitting new claims
  together with their proofs. The information submitted varies from one registry to the other
  depending of the type of fact requiring verification.
  For further reading on the Fact Registry design pattern see this
  `StarkWare blog post <https://medium.com/starkware/the-fact-registry-a64aafb598b6>`_.
*/
interface IFactRegistry {
    /*
      Returns true if the given fact was previously registered in the contract.
    */
    function isValid(bytes32 fact) external view returns (bool);
}
/*
  Copyright 2019-2022 StarkWare Industries Ltd.
  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  https://www.starkware.co/open-source-license/
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;
import "IFactRegistry.sol";
/*
  Extends the IFactRegistry interface with a query method that indicates
  whether the fact registry has successfully registered any fact or is still empty of such facts.
*/
interface IQueryableFactRegistry is IFactRegistry {
    /*
      Returns true if at least one fact has been registered.
    */
    function hasRegisteredFact() external view returns (bool);
}
/*
  Copyright 2019-2022 StarkWare Industries Ltd.
  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  https://www.starkware.co/open-source-license/
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;
import "FactRegistry.sol";
contract MemoryPageFactRegistryConstants {
    // A page based on a list of pairs (address, value).
    // In this case, memoryHash = hash(address, value, address, value, address, value, ...).
    uint256 internal constant REGULAR_PAGE = 0;
    // A page based on adjacent memory cells, starting from a given address.
    // In this case, memoryHash = hash(value, value, value, ...).
    uint256 internal constant CONTINUOUS_PAGE = 1;
}
/*
  A fact registry for the claim:
    I know n pairs (addr, value) for which the hash of the pairs is memoryHash, and the cumulative
    product: \\prod_i( z - (addr_i + alpha * value_i) ) is prod.
  The exact format of the hash depends on the type of the page
  (see MemoryPageFactRegistryConstants).
  The fact consists of (pageType, prime, n, z, alpha, prod, memoryHash, address).
  Note that address is only available for CONTINUOUS_PAGE, and otherwise it is 0.
*/
contract MemoryPageFactRegistry is FactRegistry, MemoryPageFactRegistryConstants {
    event LogMemoryPageFactRegular(bytes32 factHash, uint256 memoryHash, uint256 prod);
    event LogMemoryPageFactContinuous(bytes32 factHash, uint256 memoryHash, uint256 prod);
    /*
      Registers a fact based of the given memory (address, value) pairs (REGULAR_PAGE).
    */
    function registerRegularMemoryPage(
        uint256[] calldata memoryPairs,
        uint256 z,
        uint256 alpha,
        uint256 prime
    )
        external
        returns (
            bytes32 factHash,
            uint256 memoryHash,
            uint256 prod
        )
    {
        // Ensure 'memoryPairs.length' is bounded as a sanity check (the bound is somewhat arbitrary).
        require(memoryPairs.length < 2**20, "Too many memory values.");
        require(memoryPairs.length % 2 == 0, "Size of memoryPairs must be even.");
        require(z < prime, "Invalid value of z.");
        require(alpha < prime, "Invalid value of alpha.");
        (factHash, memoryHash, prod) = computeFactHash(memoryPairs, z, alpha, prime);
        emit LogMemoryPageFactRegular(factHash, memoryHash, prod);
        registerFact(factHash);
    }
    function computeFactHash(
        uint256[] memory memoryPairs,
        uint256 z,
        uint256 alpha,
        uint256 prime
    )
        private
        pure
        returns (
            bytes32 factHash,
            uint256 memoryHash,
            uint256 prod
        )
    {
        uint256 memorySize = memoryPairs.length / 2; // NOLINT: divide-before-multiply.
        prod = 1;
        assembly {
            let memoryPtr := add(memoryPairs, 0x20)
            // Each value of memoryPairs is a pair: (address, value).
            let lastPtr := add(memoryPtr, mul(memorySize, 0x40))
            for {
                let ptr := memoryPtr
            } lt(ptr, lastPtr) {
                ptr := add(ptr, 0x40)
            } {
                // Compute address + alpha * value.
                let address_value_lin_comb := addmod(
                    // address=
                    mload(ptr),
                    mulmod(
                        // value=
                        mload(add(ptr, 0x20)),
                        alpha,
                        prime
                    ),
                    prime
                )
                prod := mulmod(prod, add(z, sub(prime, address_value_lin_comb)), prime)
            }
            memoryHash := keccak256(
                memoryPtr,
                mul(
                    // 0x20 * 2.
                    0x40,
                    memorySize
                )
            )
        }
        factHash = keccak256(
            abi.encodePacked(
                REGULAR_PAGE,
                prime,
                memorySize,
                z,
                alpha,
                prod,
                memoryHash,
                uint256(0)
            )
        );
    }
    /*
      Registers a fact based on the given values, assuming continuous addresses.
      values should be [value at startAddr, value at (startAddr + 1), ...].
    */
    function registerContinuousMemoryPage(
        // NOLINT: external-function.
        uint256 startAddr,
        uint256[] memory values,
        uint256 z,
        uint256 alpha,
        uint256 prime
    )
        public
        returns (
            bytes32 factHash,
            uint256 memoryHash,
            uint256 prod
        )
    {
        require(values.length < 2**20, "Too many memory values.");
        require(prime < 2**254, "prime is too big for the optimizations in this function.");
        require(z < prime, "Invalid value of z.");
        require(alpha < prime, "Invalid value of alpha.");
        // Ensure 'startAddr' less then prime and bounded as a sanity check (the bound is somewhat arbitrary).
        require((startAddr < prime) && (startAddr < 2**64), "Invalid value of startAddr.");
        uint256 nValues = values.length;
        assembly {
            // Initialize prod to 1.
            prod := 1
            // Initialize valuesPtr to point to the first value in the array.
            let valuesPtr := add(values, 0x20)
            let minus_z := mod(sub(prime, z), prime)
            // Start by processing full batches of 8 cells, addr represents the last address in each
            // batch.
            let addr := add(startAddr, 7)
            let lastAddr := add(startAddr, nValues)
            for {
            } lt(addr, lastAddr) {
                addr := add(addr, 8)
            } {
                // Compute the product of (lin_comb - z) instead of (z - lin_comb), since we're
                // doing an even number of iterations, the result is the same.
                prod := mulmod(
                    prod,
                    mulmod(
                        add(add(sub(addr, 7), mulmod(mload(valuesPtr), alpha, prime)), minus_z),
                        add(
                            add(sub(addr, 6), mulmod(mload(add(valuesPtr, 0x20)), alpha, prime)),
                            minus_z
                        ),
                        prime
                    ),
                    prime
                )
                prod := mulmod(
                    prod,
                    mulmod(
                        add(
                            add(sub(addr, 5), mulmod(mload(add(valuesPtr, 0x40)), alpha, prime)),
                            minus_z
                        ),
                        add(
                            add(sub(addr, 4), mulmod(mload(add(valuesPtr, 0x60)), alpha, prime)),
                            minus_z
                        ),
                        prime
                    ),
                    prime
                )
                prod := mulmod(
                    prod,
                    mulmod(
                        add(
                            add(sub(addr, 3), mulmod(mload(add(valuesPtr, 0x80)), alpha, prime)),
                            minus_z
                        ),
                        add(
                            add(sub(addr, 2), mulmod(mload(add(valuesPtr, 0xa0)), alpha, prime)),
                            minus_z
                        ),
                        prime
                    ),
                    prime
                )
                prod := mulmod(
                    prod,
                    mulmod(
                        add(
                            add(sub(addr, 1), mulmod(mload(add(valuesPtr, 0xc0)), alpha, prime)),
                            minus_z
                        ),
                        add(add(addr, mulmod(mload(add(valuesPtr, 0xe0)), alpha, prime)), minus_z),
                        prime
                    ),
                    prime
                )
                valuesPtr := add(valuesPtr, 0x100)
            }
            // Handle leftover.
            // Translate addr to the beginning of the last incomplete batch.
            addr := sub(addr, 7)
            for {
            } lt(addr, lastAddr) {
                addr := add(addr, 1)
            } {
                let address_value_lin_comb := addmod(
                    addr,
                    mulmod(mload(valuesPtr), alpha, prime),
                    prime
                )
                prod := mulmod(prod, add(z, sub(prime, address_value_lin_comb)), prime)
                valuesPtr := add(valuesPtr, 0x20)
            }
            memoryHash := keccak256(add(values, 0x20), mul(0x20, nValues))
        }
        factHash = keccak256(
            abi.encodePacked(CONTINUOUS_PAGE, prime, nValues, z, alpha, prod, memoryHash, startAddr)
        );
        emit LogMemoryPageFactContinuous(factHash, memoryHash, prod);
        registerFact(factHash);
    }
}