data.cairo 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. // Generated with generate_test_data.rs, do not edit
  2. use pyth::byte_buffer::{ByteBuffer, ByteBufferImpl};
  3. use pyth::util::array_try_into;
  4. // A random update pulled from Hermes.
  5. pub fn good_update1() -> ByteBuffer {
  6. let bytes = array![
  7. 141887862745809943100717722154781668316147089807066324001213790862261653767,
  8. 451230040559159019530944948086670994623010697390864133264612902902585665886,
  9. 355897384610106978643111834734000274494997301794613218547634257521495150151,
  10. 140511063638834349363702006999356227863549404051701803148734324248522745879,
  11. 435849190784772134907557391544163070978531038970298390345939133663347953446,
  12. 416390591179833928094641114955594939466104495718036761707729297119441316151,
  13. 360454929416220920336539568461651500076647166763464050800345920693176904002,
  14. 316054999864337699543932294956493808847640383114707243342262764542081441331,
  15. 325277902980160684959962429721294603784343718796390808940252812862355246813,
  16. 43683235854839458868457367619068018785880460427473556950900276498953667,
  17. 448289429405712011882317781416869052550573589492688760675666957663813001522,
  18. 118081463902430977133121147164253483958565039026724621562859841189218059803,
  19. 194064310618695309465615383754562031677972810736048112738513050109934134235,
  20. 133901765334590923121691219814784557892214901646312752962904032795881821509,
  21. 404227501001709279944936006741063968912686453006275462577777397594240621266,
  22. 81649001731335394114026683805238949464016657447685509824621946636993704965,
  23. 32402065226491532148674904435794801976788068837745943243341272676331333141,
  24. 431262841416902409381606630149292665102873776020834630861578112749151562174,
  25. 6164523115980545628843981978797257048781800754033825701059814297149591186,
  26. 408761574582108996678203805090470134287794603493622537384530614829262728153,
  27. 185368533577943244707350150853170361880334596276529206938783888784867529821,
  28. 173578821500714074579643724957224629379984215847383417303110192934676518530,
  29. 90209855380378362490166376523380463998928070428866100240907090599465187835,
  30. 97758466908511588082569287391708453107999243934457382895073183209581711489,
  31. 132725011490528489913736834798247512772139171145730373610858422315799224432,
  32. 117123868005849140967825260063167768530251411611975150066586827543934313288,
  33. 408149062252618928234854115279677715692278734600386004492580987016428761675,
  34. 164529520317122600276020522906605877985809506451193373524142111430138855019,
  35. 444793051809958482843529748761971363435331354795896511243191618771787268378,
  36. 247660009137502548346315865368477795392972486141407800140910365553760622080,
  37. 3281582060272565111592312037403686940429019548922889497694300188,
  38. 93649805131515836129946966966350066506512123780266587069413066350925286142,
  39. 394112423559676785086098106350541172262729583743734966358666094809121292390,
  40. 35403101004688876764673991514113473446030702766599795822870037077688984558,
  41. 99366103604611980443183454746643823071419076016677225828619807954313149423,
  42. 10381657217606191031071521950784155484751645280452344547752823767622424055,
  43. 391045354044274401116419632681482293741435113770205621235865697077178955228,
  44. 311250087759201408758984550959714865999349469611700431708031036894849650573,
  45. 59953730895385399344628932835545900304309851622811198425230584225200786697,
  46. 226866843267230707879834616967256711063296411939069440476882347301771901839,
  47. 95752383404870925303422787,
  48. ];
  49. ByteBufferImpl::new(bytes, 11)
  50. }
  51. // A wormhole VAA from a random update pulled from Hermes.
  52. pub fn good_vm1() -> ByteBuffer {
  53. let bytes = array![
  54. 1766847066033410293701000231337210964058791470455465385734308943533652138,
  55. 250126301534699068413432844632573953364878937343368310395142095034982913232,
  56. 374780571002258088211231890250917843593951765403462661483498298003400611238,
  57. 23190137343211334092589308306056431640588154666326612124726174150537328574,
  58. 238750269065878649216923353030193912502813798896051725498208457553032584635,
  59. 29844190303057534696518006438077948796328243878877072296680853158289181326,
  60. 106329507856770018708432343978518079724691760719405501795955774399597471533,
  61. 50779865592261858016477142415230454208001695486195806892438697217059319645,
  62. 448669871976126446102256476358498380455807705600424321390063431836375575318,
  63. 115682669871397824853706713833773246708114483862317474710603223566297521279,
  64. 301634766618012930739391408723909107532790832406455099966028276947414082504,
  65. 104473166230846104217366042152018649207811514257244625711402436055500423094,
  66. 64445621634231668761998815864645440965239569561546522651415024970517905416,
  67. 192317190225976528694195501079591384434869624408066864018183189813956862386,
  68. 289982656017597431343118552054719821766658675456661448685110903889153449006,
  69. 218840601196095059731241556733624112758673153548932709011933806481899680620,
  70. 430933799927481265070475198137531816946660368757134588278434352703899277070,
  71. 69322998883710289192076494057541346430050879299268159627180404869988632073,
  72. 23862615839737051269352321086490452186237833007444069999578906611768140646,
  73. 444634264607471510688862284107804392707600799506487897206707262445172121289,
  74. 438038196736233160320436150616293672539386464061037100698335568417587662951,
  75. 4682255185797880874381673193118803274635247527626050223938224759013169366,
  76. 337620725992972686809095065321563509600769533202700218393281926304544120094,
  77. 106657917096532484607371891267699639824731774168349872862335217581425289654,
  78. 71240348385993236445536577509595968468284689483611375124653855125285401592,
  79. 347603391821038175842934311068097986460257977131947418186118379296987051086,
  80. 414263571545410645948841360836383289766662078574048514890988877286444618669,
  81. 250301638008739107522011802538487063969565433276260914336890309092111026583,
  82. 43192785595291340058788190601908070333310658291317702311902081,
  83. 52685537088250779930155363779405986390839624071318818148325576008719597568,
  84. 14615204155786886573933667335033405822686404253588533,
  85. ];
  86. ByteBufferImpl::new(bytes, 22)
  87. }
  88. // A random update pulled from Hermes.
  89. pub fn good_update2() -> ByteBuffer {
  90. let bytes = array![
  91. 141887862745809943100717722154781668656427509438421147322308927102724604288,
  92. 195033686964122459031146728084966594727160973586244819321236510906147812136,
  93. 407284115079266273703820558425166316148631567216546256235525584097593977317,
  94. 183129361303443069966099786368613810060875697145922990811223748156446589691,
  95. 211770679289991149680353390875789870975985702604862549317442965649242842854,
  96. 41298198921888098388050109123025093584676988661378162916458822634098826126,
  97. 359572746139636176627880323656946781436397582111029599185414977621837758948,
  98. 43447892561644560665969604494602790081648904091321555611985917062718198323,
  99. 316437306873153282515085292041850009011090069549805063905017828400895631621,
  100. 1808632073924798965594749672351412209316017296820761025927133223030729934,
  101. 87584277168619570562471109095348481799030125672881500169442972604855612229,
  102. 145163433499348629410116614496529397795347778158622069564370141889397312663,
  103. 25684035278413112962744577918057971807941515684998747248789566171837872999,
  104. 423647305080460104318143794931391156124390714431230676173138853704501590277,
  105. 444039338990033458186993461729004007742007577708240647605304483226650067090,
  106. 184316502645626096366264329829812897824286251050516888372699966791394695797,
  107. 358217074190908261457486811927517167368883562819513731015463459672884467276,
  108. 276891297522985882981807711468559725764477062687613644610588250767972958976,
  109. 294684739650331758060103423875803012643846741112777525170937278228428495145,
  110. 273403044175742158946841597110899681113013103975839063186643512346821053777,
  111. 181430008875487814186280787211458694926090715860589986798941427087388139743,
  112. 202405815764322437351169692760143906797339071462594057357500300785122471946,
  113. 362249706137881332854178699625533098640027521804984398645286411405577517456,
  114. 108891577618151682868702186452892931741988086496887553343303288245933117528,
  115. 51562020660219963117721568171928218510906779368200541632225568639965493074,
  116. 36265113879998172456877387291105778015251280095406084920317350894161859029,
  117. 42404838404896016009364484621891740482977244067428049062865199561561964596,
  118. 400309084726075656675334746913008755786417370187268409789718880162525027002,
  119. 184412225736261670476401152034394104500596028960049886422037988283378123034,
  120. 247660009137502548346315865368477795392972486141407805670155831411939431936,
  121. 3764185968709947175972435540804261264573483247991819761982749429,
  122. 330407311811859831895879432914238169233473332723627561500741563663520257152,
  123. 239008904555038498567552611749225600269238829894042362148974101308190490726,
  124. 263519001180037246614618451198674495650237768794904664051741501021771359435,
  125. 319621157572663509773811053656997796281807849782154038103099710071724420867,
  126. 371142574919487516620430124473731862752334035949677427525084182769927172891,
  127. 34529864768413294700260963626605680759186129379574488717138450227756192027,
  128. 300724598947183219344707986045989093146797544729497805400362056327810428775,
  129. 73559819098186314680566751133619385490187392057353932547381513965006148534,
  130. 387716298707040429040766458724262682246736227927618559740105419790525108736,
  131. 51421972426116570708669697807982264105083926945707485622590596040392442183,
  132. ];
  133. ByteBufferImpl::new(bytes, 31)
  134. }
  135. // A first update for a certain timestamp pulled from Hermes.
  136. pub fn unique_update1() -> ByteBuffer {
  137. let bytes = array![
  138. 141887862745809943100717722154781668656425228150258363002663887732857548075,
  139. 399793171101922163607717906910020156439802651815166374105600343045575931912,
  140. 205983572864866548810075966151139050810706099666354694408986588005072300221,
  141. 151451952208610765038741735376830560508647207417250420083288609153397964481,
  142. 86500771940909656434129966404881206990783089169853273096126376095161148476,
  143. 226128071698991949569342896653857259217290864736270016974365368327197190188,
  144. 377698250859392108521341636250067678937984182266455992791761951028534274645,
  145. 359481881021010868573625646624159016709204941239347558851817240293252854322,
  146. 269752247307988210724584131415546296182395279893478036136383326770680756016,
  147. 1795390197095010264738527441013169771569683827600670029637766897428840143,
  148. 234116006474879126519208934707397575502368608154160721412947025189419787194,
  149. 189800847222104556167598630039931285094024694085247523307780296439180585091,
  150. 286206863474379560841614954761399331434812535348350225390274576176798886031,
  151. 380778504466325787198909189418135115031120011427014465236265515817642556890,
  152. 128785010970678423864351132498736713626005612397319240493515416417380099413,
  153. 395419216432871057204438489759682910781574046646010114747283889104834443397,
  154. 184981610545658962928833309057692452941395349433458372962283948260273947156,
  155. 110573687320157468197346423602708230855113764048934963897254568602798981891,
  156. 359831064918860887692030922920274851680298668214543004760245859301314852951,
  157. 430048018037020109398934292236837834709370591653776097569938580165539734124,
  158. 265079002668517523371293797450754079826401787503533883360533359118093613709,
  159. 118956066417175616647948432812222980193178970842860785889932661265944570805,
  160. 289275771653255859826082430219295399339085718287922176066620100061685069367,
  161. 236281080443323007784750945204995275799519083197981738780888611083509567478,
  162. 251042542087561162756580709366349731114715604419679060279244203132266921212,
  163. 98235342442817522140724982668491795525073680697047819016960109902179866805,
  164. 88342865348230190810084665689239940103607621061956069700600977485132311440,
  165. 362045407519743532711403801060857872682086780812134177115599591240431143367,
  166. 16066483776176414842828409371714210177224680637354816226962534075790344474,
  167. 247660009137502548346315865368477795392972486141407802997108167405894850048,
  168. 3530678887550352072827758533436734366288448089041832078266099519,
  169. 272101358674132653417860014541384836605087997364704101839695292681479883518,
  170. 394112423559676785086059691419737479771752814065338155011845462169193807974,
  171. 151755140354137577506498286435010205890750984061355535849635897370673003944,
  172. 210196797635098012510106281616028853575843684847951745405842531072933610917,
  173. 65848881303037889845233189630325925691014776183743685310081069912626992101,
  174. 110542381473451658848567609117180625628841970992142907142739541724557861958,
  175. 157546342890129829983246193527213822449181723932011157069167729323808635205,
  176. 165998047372192053828934221954381957675361960853286466716634704795532379661,
  177. 28583007876111384456149499846085318299326698960792831530075402396150538907,
  178. 126290914008245563820443505,
  179. ];
  180. ByteBufferImpl::new(bytes, 11)
  181. }
  182. // An actual mainnet wormhole governance VAA from
  183. // https://github.com/pyth-network/pyth-crosschain/blob/main/contract_manager/src/contracts/wormhole.ts#L32-L37
  184. pub fn mainnet_guardian_set_upgrade1() -> ByteBuffer {
  185. let bytes = array![
  186. 1766847064779994277746302277072294871108550301449637470263976489521154979,
  187. 374953657095152923031303770743522269007103499920836805761143506434463979495,
  188. 373725794026553362537846905304981854320892126869150736450761801254169477120,
  189. 4835703278458516786446336,
  190. 1131377253,
  191. 3533694129556775410652111826415980944262631656421498398215501759245151417,
  192. 145493015216602589471695207668173527044214450021182755196032581352392984224,
  193. 267497573836069714380350521200881787609530659298168186016481773490244091266,
  194. 443348533394886521835330696538264729103669807313401311199245411889706258110,
  195. 200303433165499832354845293203843028338419687800279845786613090211434473108,
  196. 37282816539161742972709083946551920068062204748477644719930149699874385462,
  197. 111200938271608595261384934914291476246753101189480743698823215749338358345,
  198. 5785682963869019134199015821749288033381872318410562688180948003975909269,
  199. 372447340016996751453958019806457886428852701283870538393820846119845147788,
  200. 33251468085387571623103303511315696691298281336333243761063342581452341650,
  201. 323161992096034641767541451811925056802673576212351940217752194462561980347,
  202. 55852237138651071644815135002358067220635692701051811455610533875912981641,
  203. 190413173566657072516608762222993749133,
  204. ];
  205. ByteBufferImpl::new(bytes, 16)
  206. }
  207. // An actual mainnet wormhole governance VAA from
  208. // https://github.com/pyth-network/pyth-crosschain/blob/main/contract_manager/src/contracts/wormhole.ts#L32-L37
  209. pub fn mainnet_guardian_set_upgrade2() -> ByteBuffer {
  210. let bytes = array![
  211. 1766847065210651126944505525521222069599854288126726949998063840465138797,
  212. 39054013088470866893599813322035661048501117089555726788687392536164861911,
  213. 186918267413056900890218521593203545230034250983266377769400670103688217224,
  214. 54214750922097681971590495378823998039261772575502204791108963815396679538,
  215. 248994008232667872698758486001506749115615219491023036208140426934463230397,
  216. 224235483823871042187452194579994340291351644933258737665365374081962645784,
  217. 129444929990547403397151941456764812818993218972657847255833740800106200260,
  218. 318548597134783137700627869311159664823693239605331630210202210299165477657,
  219. 308852933010951129895011963941866000261904600807292935694851016610643657184,
  220. 57272874228621364335170723193404742446392708606247574725663969156507973216,
  221. 268057363923565984687253533797066429881117576606682526627284795527707196557,
  222. 421894189151847402000239734668088381785344768284464330085711322870200424121,
  223. 387584417395337067059819722404321580961380603778956902593594676080614899975,
  224. 443523131755342451570503958659975367050637907361274652611595274647186073286,
  225. 375107813087591446268414166006799680982485924290770541964399283524664437852,
  226. 269085314426821465871247165234113878276592898426373369094610290261431112145,
  227. 394348694527460459816454348661249546781513091938003106009521096332701847735,
  228. 125670844183465056159554034633959680574572737212268749779705635378223489518,
  229. 35053869475614771227400345921974210525173525784259894123687028214330135561,
  230. 57544237843860512274491447149877290860624174166427313971286819807773907946,
  231. 110681468147560408039747352809294082929396639199393789980441736520638055418,
  232. 45709869872872997180086402576677640909777820941436708911954532772405320395,
  233. 339910511168418517917975736269171135752028257685502872671902330279073260362,
  234. 76482764517489607955778008190826845581092838692650194719207882266659669490,
  235. 443663869577220861680293443959666949893574779475752540587040489501289361777,
  236. 231057874919577223790659840464529054850239319545221055959374917590157019925,
  237. 309066533217885002074480704480667619809952056265738927105682076502747220549,
  238. 212379788814604791028007106821871908074818251907335322546331543385945316762,
  239. 165408661499085325620077702639227003047567884011538988728381864749733773312,
  240. 29852013947978990147012099107546124222651092940097518043136,
  241. 5874446556610227706402640854088357165514903,
  242. 314635470832203526600706472223155382046271943513513368538979543914002758100,
  243. 289993023590817330918274026889451152915026890048318491140264484864242055689,
  244. 211265316833000774821515110003986084297271807500310630074520699505436206838,
  245. 314620948986744608212517578488307826224331071350776523303159889004405167502,
  246. 242768143829057016675085776170635413106817756232919004913342240722183648628,
  247. 289318220340670045883106021427202666948428587921558828582664470923483208386,
  248. 254304247593881109676724582609273741670949040469906895867342151706444640548,
  249. 324707984060675446628128892371664948354047882542253609514703956739624414429,
  250. 125786084546320950738753348592393927755418642173185609412108154831520915923,
  251. 192033422676298173731756291271054199566981168481817292625435767748408605264,
  252. 70237018464728620254434305961956673950089621204502627373468857093940647376,
  253. 75218391584551901010047495874303520775865073092730040058902770251005073864,
  254. 13453,
  255. ];
  256. ByteBufferImpl::new(bytes, 2)
  257. }
  258. // An actual mainnet wormhole governance VAA from
  259. // https://github.com/pyth-network/pyth-crosschain/blob/main/contract_manager/src/contracts/wormhole.ts#L32-L37
  260. pub fn mainnet_guardian_set_upgrade3() -> ByteBuffer {
  261. let bytes = array![
  262. 1766847065622031860560134801367788401015571316785630090767859240961980367,
  263. 408239335069601434456324970231880063141100099721451058487412176729277688481,
  264. 239499689753305520381601038928513796227317320911002802551444547638809838552,
  265. 377515301744513788082523380503265415136454305699441419871183462725292421897,
  266. 293792427782284265052215516935690252661713253004854348809536189867737815900,
  267. 307592266914902727916633292174670243188255704510048236277225897328900269063,
  268. 127373290139474278928992577974696343462455769904046193125018730285162391253,
  269. 391788800785481654990215164673817619378887263909639120513493454202816019863,
  270. 410413307118599096084169722886408584518140871169074821252461819158667354254,
  271. 18837648490111595970198935552266546643395427923804444528866768515056419823,
  272. 29964034682984173558839379357821569529808274426015494950430380078317881569,
  273. 86017868501532670528023530422115758730056738654625156800662778409971102579,
  274. 316587967137295297243489759859408971025377360462781809717927347025414193161,
  275. 412080542369789462767669836400697110505430973769191785499739175360336337147,
  276. 342817079347905714229318925597762381802367663565411998187223317628701911440,
  277. 323381353160339090772037140072061985169258958022395380273676898316834639836,
  278. 199931590715070935127318740956564588449721873695471932311700469202637695100,
  279. 53310522180389647586576928116330850824055549848985438538201222342553700451,
  280. 387322343922164253479438966163491855981414317104760621828688810466847848718,
  281. 81609701542274539489711635515209037026645626576756528749469616228397567798,
  282. 182108205861564989333892774796475580877981373947799860454217397980367659628,
  283. 21549663410658134468902761710868642321546772465973442277960059676129502668,
  284. 189434039785735939400321781125039794740638779195156759980704929066694157130,
  285. 52255833533187953003213955242027099690232530588872309460610106220279805641,
  286. 197105018621162723372171195601447549272902142615124680111298974553437412361,
  287. 243585516151555343004264928593678764289083751554802049062044286334698216184,
  288. 98577806073901898829375415748245478967425496216912736575886605480181121443,
  289. 92916551389967933235240931764170084503123511470557201449603712010638670912,
  290. 279247190794260779926452059689914005511524938154821508635388069101252378624,
  291. 27765181507524306000048567556593270127801507143251178553344,
  292. 5874446556610227706402640926145951203442839,
  293. 314635470832203526600706472223155382046271943513513368538979543914002758100,
  294. 289993023590817330918274026889451152915026890048318491140264484864242055689,
  295. 211265316833000774821515110003986084297271807500310630074520699505436206838,
  296. 314620948986744608212517578488307826224331071350776523303159889004405167502,
  297. 242768143829057016675085658054156069029173843566452718977789980910319968372,
  298. 289318220340670045883106021427202666948428587921558828582664470923483208386,
  299. 254304247593881109676724582609273741670949040469906895867342151706444640548,
  300. 324707984060675446628128892371664948354047882542253609514703956739624414429,
  301. 125786084546320950738753348592393927755418642173185609412108154831520915923,
  302. 192033422676298173731756291271054199566981168481817292625435767748408605264,
  303. 70237018464728620254434305961956673950089621204502627373468857093940647376,
  304. 75218391584551901010047495874303520775865073092730040058902770251005073864,
  305. 13453,
  306. ];
  307. ByteBufferImpl::new(bytes, 2)
  308. }
  309. // An actual mainnet wormhole governance VAA from
  310. // https://github.com/pyth-network/pyth-crosschain/blob/main/contract_manager/src/contracts/wormhole.ts#L32-L37
  311. pub fn mainnet_guardian_set_upgrade4() -> ByteBuffer {
  312. let bytes = array![
  313. 1766847066033426987337757245669159273063358729535478806850006662056807068,
  314. 191023158244075433218055661747029015323596061316379687901032561397223546211,
  315. 30156550775609732785124128084945604136341937408029517653427049258063209215,
  316. 301841618969457377999846355946508544313297803407604349411042057045510372286,
  317. 399879387152070823070522891203531321261797829310211644637928969034931151834,
  318. 1184971666775858810527395126763859219514013163556756790208661779020321698,
  319. 427827873217506136303198988655697899138087317492051993053159867826892618987,
  320. 55439109913191967501571602277685262841453050617358377329061538069328212552,
  321. 34944602254693785869427132065664922748183924456022812505745784482260734500,
  322. 50091615215549712387991200985741575718080363004681463525186508796585379155,
  323. 265247833149227842278059484961926330281584344437952973839486092319885300192,
  324. 421631446041795295328070636491346018953171276542115189082171457479754499396,
  325. 59057903625576869235407103565877017330396402246452653660114888284545941770,
  326. 315797852826246435174946736461540321579373154656484006452063031513301027405,
  327. 9521420622979958910372839981791309896262328383324674284772682980734269170,
  328. 272964069264268937653695089515793248726920319914036642027008415285406913245,
  329. 194708434228888226032102758315234166672190899487218971410889219134701358728,
  330. 117864954129109327302856065706421701676973859697066630532570005860486924893,
  331. 323457021720552374478769194145226061243431674370101604382965685057422991463,
  332. 327482733702858147057975319784026874245182397914737119038454598086198587150,
  333. 159726033816658034104416471293601013976445904149240898589368461412472508473,
  334. 165970343982649234398221341351816767302457220504375238905210573566962780340,
  335. 66269488760319836583658182431744051236825244016843316092957806563966254500,
  336. 360882001282595740056823749884962228392082962172369522212117195988772429063,
  337. 202692667772209236945884489592750537635169234501360011152939202347962132650,
  338. 407257364829649465305126488148712878739144584682351279109461295389594525334,
  339. 270499607712829989691415988895838806019492861138165540862008308077962735002,
  340. 388443296961168536186587069708212659389994895697827691755155284015603161464,
  341. 45068266527940236008536134081672474027695203549460934893262212861351952384,
  342. 31319268777966350508118557206583844424308993254125039779840,
  343. 5874446556610227706402640998203302487747647,
  344. 204224545225244051821590480758420624947979343122083461045877549162059250132,
  345. 289993023590817330918274026889451152915026890048318491140264484864242055689,
  346. 211265316833000774821515110003986084297271807500310630074520699505436206838,
  347. 314620948986744608212517578488307826224331071350776523303159889004405167502,
  348. 242768143829057016675085658054156069029173843566452718977789980910319968372,
  349. 289318220340670045883106021427202666948428587921558828582664470923483208386,
  350. 254304247593881109676724582609273741670949040469906895867342151706444640548,
  351. 324707984060675446628128892371664948354047882542253609514703956739624414429,
  352. 125786084546320950738753348592393927755418642173185609412108154831520915923,
  353. 192033422676298173731756291271054199566981168481817292625435767748408605264,
  354. 70237018464728620254434305961956673950089621204502627373468857093940647376,
  355. 75218391584551901010047495874303520775865073092730040058902770251005073864,
  356. 13453,
  357. ];
  358. ByteBufferImpl::new(bytes, 2)
  359. }
  360. pub const TEST_GUARDIAN_ADDRESS1: felt252 = 0x686b9ea8e3237110eaaba1f1b7467559a3273819;
  361. pub const TEST_GUARDIAN_ADDRESS2: felt252 = 0x363598f080a817e633fc2d8f2b92e6e637f8b449;
  362. // An invalid wormhole guardian set upgrade instruction containing no new guardians.
  363. pub fn empty_set_upgrade() -> ByteBuffer {
  364. let bytes = array![
  365. 1766847064779992178996580835909277664613661950847933439396875833330622292,
  366. 364268459763994160238907315760635322263304542127720162879870384990884673431,
  367. 419730305090247124548471445441531015782496798516552461724622762829422788608,
  368. 4835703278458516699153920,
  369. 1131377253,
  370. 210141960835432704,
  371. ];
  372. ByteBufferImpl::new(bytes, 8)
  373. }
  374. // A wormhole guardian set upgrade instruction with emitter not expected by the test.
  375. pub fn wrong_emitter_upgrade() -> ByteBuffer {
  376. let bytes = array![
  377. 1766847064779994286935846877901139612104608837038764127758248269325228906,
  378. 418887508807350452965708560347030276949211978189626151402664101079839557558,
  379. 197343809067707990824443354127489340211392396345777701010771497603219587072,
  380. 6044629098073145873860096,
  381. 1131377253,
  382. 307122819832911374634462256129025725147663742791077927773782095897,
  383. ];
  384. ByteBufferImpl::new(bytes, 28)
  385. }
  386. // A wormhole guardian set upgrade instruction with set index = 3 not expected by the test.
  387. pub fn wrong_index_upgrade() -> ByteBuffer {
  388. let bytes = array![
  389. 1766847064779996028795173168119917022867471281757617479529431178557452389,
  390. 193283302630366040376283958080462867566389017166937293916301423178932756308,
  391. 242372832420793675848312873608890898918531405734576271399238077831505248256,
  392. 4835703278458516699153920,
  393. 1131377253,
  394. 210624583337115497886730203944140689990237281548333499058561169433,
  395. ];
  396. ByteBufferImpl::new(bytes, 28)
  397. }
  398. // A wormhole governance guardian set upgrade instruction signed by test guardian #1 containing test
  399. // guardian #2 as the new guardian set.
  400. pub fn upgrade_to_test2() -> ByteBuffer {
  401. let bytes = array![
  402. 1766847064779995287375101177319600239435018729139341591012343354326614060,
  403. 152103705464783935682610402914146418697934830197930803919710856925871578605,
  404. 421150899970781847000318380764303006646986333759174982038890844802036793344,
  405. 4835703278458516699153920,
  406. 1131377253,
  407. 210624583337114749311237613435643962969294824395451022190048752713,
  408. ];
  409. ByteBufferImpl::new(bytes, 28)
  410. }
  411. // A Pyth governance instruction to set fee signed by the test guardian #1.
  412. pub fn pyth_set_fee() -> ByteBuffer {
  413. let bytes = array![
  414. 1766847064779993955862540543984267022910717161432209540262366788014689913,
  415. 322968519187498395396360816568387642032723484530650782503164941848016432477,
  416. 407975527128964115747680681091773270935844489133353741223501742992990928896,
  417. 49565958604199796163020368,
  418. 8072278384728444780182694421117884443886221966887092226,
  419. ];
  420. ByteBufferImpl::new(bytes, 23)
  421. }
  422. // A Pyth governance instruction to set fee signed by the test guardian #1.
  423. pub fn pyth_set_fee_in_token() -> ByteBuffer {
  424. let bytes = array![
  425. 1766847064779994694408617232155063622446317599437785683244896979152308796,
  426. 41831183904504604246915376354509245030219494606222324288494126672855141875,
  427. 245200731728170526984869527586075617087934630006881191137945784647849869312,
  428. 49565958604199796163020368,
  429. 148907253456468655193350049927026865683852796092680336764850032905682767430,
  430. 1535109346439504966152199052711447625482878604913825938427335,
  431. ];
  432. ByteBufferImpl::new(bytes, 25)
  433. }
  434. // A Pyth governance instruction to set data sources signed by the test guardian #1.
  435. pub fn pyth_set_data_sources() -> ByteBuffer {
  436. let bytes = array![
  437. 1766847064779993795984967344618836356750759980724568847727566676204733945,
  438. 319252252405206634291073190903653114488682078063415369176250618646860635118,
  439. 427774687951454487776318063357824898404188691225649546174530713404617785344,
  440. 49565958604199796163020368,
  441. 148907253454411774545738931219166892876160512393929267898119961543514185585,
  442. 223938022913800988696085410923418445187967252047785407181969631814277398528,
  443. 301,
  444. ];
  445. ByteBufferImpl::new(bytes, 14)
  446. }
  447. // A Pyth governance instruction to set wormhole address signed by the test guardian #1.
  448. pub fn pyth_set_wormhole() -> ByteBuffer {
  449. let bytes = array![
  450. 1766847064779993746734475762358060494055703996306832791834621971457521573,
  451. 304597972750688370688620483915336485865968448355388067310514768529150663948,
  452. 37753701654018547624593082738443625808734511977366199414609989499994767360,
  453. 49565958604199796163020368,
  454. 148907253456057279176930315687485033494639386197985334929728922792833758561,
  455. 3789456330195130818,
  456. ];
  457. ByteBufferImpl::new(bytes, 8)
  458. }
  459. // A Pyth governance instruction to request governance data source transfer signed by the test
  460. // guardian #1.
  461. pub fn pyth_request_transfer() -> ByteBuffer {
  462. let bytes = array![
  463. 1766847064779995673162446580588349917525470038054832932592992288867429640,
  464. 324153743158695484170440096219469152425935271630646363385677281984034639103,
  465. 9668785162708967120184333307045308321106903473741317705519937487712026624,
  466. 51983810243429054512432720,
  467. 101886477340929157123538945,
  468. ];
  469. ByteBufferImpl::new(bytes, 11)
  470. }
  471. // A Pyth governance instruction to authorize governance data source transfer signed by the test
  472. // guardian #1.
  473. pub fn pyth_auth_transfer() -> ByteBuffer {
  474. let bytes = array![
  475. 1766847064779996877169354131457289870145133774197236214231189828595607612,
  476. 135397929264511926704016137904543076941936590450380629211164830069940259166,
  477. 170704271745871732109596595409322690827425239986206012346500026141882974208,
  478. 49565958604199796163020368,
  479. 148907253454000398381888169517670981236167827299573051583944758214402801641,
  480. 366234460504415466174775710781157853773075726148887508605191363426437722203,
  481. 180989472713677925664001543732082345206417308361605690793789229681751359488,
  482. 721420288,
  483. 20782639266000304984163621011457,
  484. ];
  485. ByteBufferImpl::new(bytes, 18)
  486. }
  487. // A Pyth governance instruction to set fee with alternative emitter signed by the test guardian #1.
  488. pub fn pyth_set_fee_alt_emitter() -> ByteBuffer {
  489. let bytes = array![
  490. 1766847064779994296698028907175740560793090837330420619723848454331748383,
  491. 249896185465136242775777270873107292725618014836270803491051657047070145541,
  492. 225947213663038958976782611621298954045962455954572977382945927572467220480,
  493. 51983810243429054512498256,
  494. 8072278384728444780182694421117884443886221966887092226,
  495. ];
  496. ByteBufferImpl::new(bytes, 23)
  497. }
  498. // A Pyth governance instruction to upgrade the contract signed by the test guardian #1.
  499. pub fn pyth_upgrade_fake1() -> ByteBuffer {
  500. let bytes = array![
  501. 1766847064779993492421078898621749108301966584597749110380074216576492888,
  502. 60258065057775975798387405360763783639924599499836853429424581305786207127,
  503. 294385177406295901350483669059442590907311847252050490331308693098780950528,
  504. 49565958604199796163020368,
  505. 148907253453589022392359363374850830855966874133251507057423871596698519420,
  506. 10995973506805932843,
  507. ];
  508. ByteBufferImpl::new(bytes, 8)
  509. }
  510. // A Pyth governance instruction to upgrade the contract signed by the test guardian #1.
  511. pub fn pyth_upgrade_not_pyth() -> ByteBuffer {
  512. let bytes = array![
  513. 1766847064779995437839944646329090026725755072259133687464299849962947211,
  514. 364933187739398371603726688032548912702512452515951176241438841103710487524,
  515. 168967372750473928993542488698926019424107017631122163941566426102978576384,
  516. 49565958604199796163020368,
  517. 148907253453589022290209221717003441680286754164662723445001054939097582646,
  518. 12012828459144055253,
  519. ];
  520. ByteBufferImpl::new(bytes, 8)
  521. }
  522. // A Pyth governance instruction to upgrade the contract signed by the test guardian #1.
  523. pub fn pyth_upgrade_wrong_magic() -> ByteBuffer {
  524. let bytes = array![
  525. 1766847064779994990936574265957823314838802547799335095459100055033612531,
  526. 337609657713579979105798034723839884757527387288729213036462364653817969892,
  527. 344707358034822539834365850761803570529219340665056667519361118443881365504,
  528. 49565958604199796163020368,
  529. 148907253453589022385922519334474515578648255544414696069419539273709501349,
  530. 9034297375272282805,
  531. ];
  532. ByteBufferImpl::new(bytes, 8)
  533. }
  534. // A Pyth governance instruction to upgrade the contract signed by the test guardian #1.
  535. pub fn pyth_upgrade_invalid_hash() -> ByteBuffer {
  536. let bytes = array![
  537. 1766847064779994789591381079184882258862460741769249190705097785479185254,
  538. 41574146205389297059177705721481778703981276127215462116602633512315608382,
  539. 266498984494471565033413055222808266936531835027750145459398687214975057920,
  540. 49565958604199796163020368,
  541. 148907253453589022218037939353255655322518022029545083499057126097303896064,
  542. 505,
  543. ];
  544. ByteBufferImpl::new(bytes, 8)
  545. }
  546. // An update pulled from Hermes and re-signed by the test guardian #1.
  547. pub fn test_price_update1() -> ByteBuffer {
  548. let bytes = array![
  549. 141887862745809943100421399774809552050876420277163116849842965275903806689,
  550. 210740906737592158039211995620336526131859667363627655742687286503264782608,
  551. 437230063624699337579360546580839669896712252828825008570863758867641146081,
  552. 3498691308882995183871222184377409432186747119716981166996399082193594993,
  553. 1390200166945919815453709407753165121175395927094647129599868236,
  554. 222819573728193325268644030206737371345667885599602384508424089704440116301,
  555. 341318259000017461738706238280879290398059773267212529438772847337449455616,
  556. 1275126645346645395843037504005879519843596923369759718556759844520336145,
  557. 363528783578153760894082184744116718493621815898909809604883433584616420886,
  558. 301537311768214106147206781423041990995720118715322906821301413003463484347,
  559. 83150006264761451992768264969047148434524798781124754530141755679159432208,
  560. 96387772316726941183358990094337324283641753573556594738287498821253761827,
  561. 395908154570808692326126405856049827157095768069251211022053821585519235652,
  562. 87135893730137265929093180553063146337041045646221968026289709394440932141,
  563. 245333243912241114598596888050489286502591033459250287888834,
  564. ];
  565. ByteBufferImpl::new(bytes, 25)
  566. }
  567. // An update pulled from Hermes and re-signed by the test guardian #1.
  568. pub fn test_price_update2() -> ByteBuffer {
  569. let bytes = array![
  570. 141887862745809943100421399774809552050874823427618844548942380383465221086,
  571. 106893583704677921907497845070624642590618427233243792006390965895909696183,
  572. 126617671723931969110123875642449115250793288301361049879364132884271078113,
  573. 3498691308882995183871222184377409432186747119716981166996399082193594993,
  574. 1390200461185063661704370212555794334034815850290352693418762308,
  575. 419598057710749587537080281518289024699150505326900462079484531390510117965,
  576. 341318259000017461738706238280879290398059773267212529438780607147892801536,
  577. 1437437604754599821041091415535991441313586347841485651963630208563420739,
  578. 305222830440467078008666830004555943609735125691441831219591213494068931362,
  579. 358396406696718360717615797531477055540194104082154743994717297650279402646,
  580. 429270385827211102844129651648706540139690432947840438198166022904666187018,
  581. 343946166212648899477337159288779715507980257611242783073384876024451565860,
  582. 67853010773876862913176476530730880916439012004585961528150130218675908823,
  583. 370855179649505412564259994413632062925303311800103998016489412083011059699,
  584. 1182295126766215829784496273374889928477877265080355104888778,
  585. ];
  586. ByteBufferImpl::new(bytes, 25)
  587. }
  588. // An update pulled from Hermes and re-signed by the test guardian #1 with another emitter address.
  589. pub fn test_update2_alt_emitter() -> ByteBuffer {
  590. let bytes = array![
  591. 141887862745809943100421399774809552050876183715022494587482285730295850458,
  592. 359963320496358929787450247990998878269668655936959553372924597144593948268,
  593. 168294065609209340478050191639515428002729901421915929480902120205187023616,
  594. 301,
  595. 1390200461185063661704370212555794334034815850290352693418762308,
  596. 419598057710749587537080281518289024699150505326900462079484531390510117965,
  597. 341318259000017461738706238280879290398059773267212529438780607147892801536,
  598. 1437437604754599821041091415535991441313586347841485651963630208563420739,
  599. 305222830440467078008666830004555943609735125691441831219591213494068931362,
  600. 358396406696718360717615797531477055540194104082154743994717297650279402646,
  601. 429270385827211102844129651648706540139690432947840438198166022904666187018,
  602. 343946166212648899477337159288779715507980257611242783073384876024451565860,
  603. 67853010773876862913176476530730880916439012004585961528150130218675908823,
  604. 370855179649505412564259994413632062925303311800103998016489412083011059699,
  605. 1182295126766215829784496273374889928477877265080355104888778,
  606. ];
  607. ByteBufferImpl::new(bytes, 25)
  608. }
  609. // An update pulled from Hermes and re-signed by the test guardian #2.
  610. pub fn test_update2_set2() -> ByteBuffer {
  611. let bytes = array![
  612. 141887862745809943100421399774809552391157901121219476151849805356757998433,
  613. 22927445661989480418689320204846867835510434886542566099417398893061382455,
  614. 299474373929736638290349370983054029794228129896969116108467835428084390625,
  615. 3498691308882995183871222184377409432186747119716981166996399082193594993,
  616. 1390200461185063661704370212555794334034815850290352693418762308,
  617. 419598057710749587537080281518289024699150505326900462079484531390510117965,
  618. 341318259000017461738706238280879290398059773267212529438780607147892801536,
  619. 1437437604754599821041091415535991441313586347841485651963630208563420739,
  620. 305222830440467078008666830004555943609735125691441831219591213494068931362,
  621. 358396406696718360717615797531477055540194104082154743994717297650279402646,
  622. 429270385827211102844129651648706540139690432947840438198166022904666187018,
  623. 343946166212648899477337159288779715507980257611242783073384876024451565860,
  624. 67853010773876862913176476530730880916439012004585961528150130218675908823,
  625. 370855179649505412564259994413632062925303311800103998016489412083011059699,
  626. 1182295126766215829784496273374889928477877265080355104888778,
  627. ];
  628. ByteBufferImpl::new(bytes, 25)
  629. }