151 lines
11 KiB
Bash
Executable File
151 lines
11 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
set -x
|
|
|
|
export STARKNET_ACCOUNT=katana-0
|
|
export STARKNET_RPC=http://0.0.0.0:5050
|
|
|
|
sleep="sleep 0.3"
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
scarb build
|
|
wormhole_hash=$(starkli declare target/dev/pyth_wormhole.contract_class.json)
|
|
|
|
# prefunded katana account
|
|
owner=0x6162896d1d7ab204c7ccac6dd5f8e9e7c25ecd5ae4fcb4ad32e57786bb46e03
|
|
|
|
# deploying wormhole with mainnet guardians
|
|
|
|
${sleep}
|
|
# guardian set #0 is same as #1
|
|
wormhole_address=$(starkli deploy "${wormhole_hash}" \
|
|
"${owner}" \
|
|
19 `# num_guardians` \
|
|
0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5 \
|
|
0xfF6CB952589BDE862c25Ef4392132fb9D4A42157 \
|
|
0x114De8460193bdf3A2fCf81f86a09765F4762fD1 \
|
|
0x107A0086b32d7A0977926A205131d8731D39cbEB \
|
|
0x8C82B2fd82FaeD2711d59AF0F2499D16e726f6b2 \
|
|
0x11b39756C042441BE6D8650b69b54EbE715E2343 \
|
|
0x54Ce5B4D348fb74B958e8966e2ec3dBd4958a7cd \
|
|
0xeB5F7389Fa26941519f0863349C223b73a6DDEE7 \
|
|
0x74a3bf913953D695260D88BC1aA25A4eeE363ef0 \
|
|
0x000aC0076727b35FBea2dAc28fEE5cCB0fEA768e \
|
|
0xAF45Ced136b9D9e24903464AE889F5C8a723FC14 \
|
|
0xf93124b7c738843CBB89E864c862c38cddCccF95 \
|
|
0xD2CC37A4dc036a8D232b48f62cDD4731412f4890 \
|
|
0xDA798F6896A3331F64b48c12D1D57Fd9cbe70811 \
|
|
0x71AA1BE1D36CaFE3867910F99C09e347899C19C3 \
|
|
0x8192b6E7387CCd768277c17DAb1b7a5027c0b3Cf \
|
|
0x178e21ad2E77AE06711549CFBB1f9c7a9d8096e8 \
|
|
0x5E1487F35515d02A92753504a8D75471b9f49EdB \
|
|
0x6FbEBc898F403E4773E95feB15E80C9A99c8348d \
|
|
)
|
|
|
|
${sleep}
|
|
# guardian set #1: https://raw.githubusercontent.com/wormhole-foundation/wormhole-networks/master/mainnetv2/guardianset/v1.prototxt
|
|
starkli invoke "${wormhole_address}" submit_new_guardian_set \
|
|
1 `# set index` \
|
|
19 `# num_guardians` \
|
|
0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5 \
|
|
0xfF6CB952589BDE862c25Ef4392132fb9D4A42157 \
|
|
0x114De8460193bdf3A2fCf81f86a09765F4762fD1 \
|
|
0x107A0086b32d7A0977926A205131d8731D39cbEB \
|
|
0x8C82B2fd82FaeD2711d59AF0F2499D16e726f6b2 \
|
|
0x11b39756C042441BE6D8650b69b54EbE715E2343 \
|
|
0x54Ce5B4D348fb74B958e8966e2ec3dBd4958a7cd \
|
|
0xeB5F7389Fa26941519f0863349C223b73a6DDEE7 \
|
|
0x74a3bf913953D695260D88BC1aA25A4eeE363ef0 \
|
|
0x000aC0076727b35FBea2dAc28fEE5cCB0fEA768e \
|
|
0xAF45Ced136b9D9e24903464AE889F5C8a723FC14 \
|
|
0xf93124b7c738843CBB89E864c862c38cddCccF95 \
|
|
0xD2CC37A4dc036a8D232b48f62cDD4731412f4890 \
|
|
0xDA798F6896A3331F64b48c12D1D57Fd9cbe70811 \
|
|
0x71AA1BE1D36CaFE3867910F99C09e347899C19C3 \
|
|
0x8192b6E7387CCd768277c17DAb1b7a5027c0b3Cf \
|
|
0x178e21ad2E77AE06711549CFBB1f9c7a9d8096e8 \
|
|
0x5E1487F35515d02A92753504a8D75471b9f49EdB \
|
|
0x6FbEBc898F403E4773E95feB15E80C9A99c8348d \
|
|
|
|
${sleep}
|
|
# guardian set #2: https://raw.githubusercontent.com/wormhole-foundation/wormhole-networks/master/mainnetv2/guardianset/v2.prototxt
|
|
starkli invoke "${wormhole_address}" submit_new_guardian_set \
|
|
2 `# set index` \
|
|
19 `# num_guardians` \
|
|
0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5 \
|
|
0xfF6CB952589BDE862c25Ef4392132fb9D4A42157 \
|
|
0x114De8460193bdf3A2fCf81f86a09765F4762fD1 \
|
|
0x107A0086b32d7A0977926A205131d8731D39cbEB \
|
|
0x8C82B2fd82FaeD2711d59AF0F2499D16e726f6b2 \
|
|
0x11b39756C042441BE6D8650b69b54EbE715E2343 \
|
|
0x54Ce5B4D348fb74B958e8966e2ec3dBd4958a7cd \
|
|
0x66B9590e1c41e0B226937bf9217D1d67Fd4E91F5 \
|
|
0x74a3bf913953D695260D88BC1aA25A4eeE363ef0 \
|
|
0x000aC0076727b35FBea2dAc28fEE5cCB0fEA768e \
|
|
0xAF45Ced136b9D9e24903464AE889F5C8a723FC14 \
|
|
0xf93124b7c738843CBB89E864c862c38cddCccF95 \
|
|
0xD2CC37A4dc036a8D232b48f62cDD4731412f4890 \
|
|
0xDA798F6896A3331F64b48c12D1D57Fd9cbe70811 \
|
|
0x71AA1BE1D36CaFE3867910F99C09e347899C19C3 \
|
|
0x8192b6E7387CCd768277c17DAb1b7a5027c0b3Cf \
|
|
0x178e21ad2E77AE06711549CFBB1f9c7a9d8096e8 \
|
|
0x5E1487F35515d02A92753504a8D75471b9f49EdB \
|
|
0x6FbEBc898F403E4773E95feB15E80C9A99c8348d \
|
|
|
|
${sleep}
|
|
# guardian set #3: https://raw.githubusercontent.com/wormhole-foundation/wormhole-networks/master/mainnetv2/guardianset/v3.prototxt
|
|
starkli invoke "${wormhole_address}" submit_new_guardian_set \
|
|
3 `# set index` \
|
|
19 `# num_guardians` \
|
|
0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5 \
|
|
0xfF6CB952589BDE862c25Ef4392132fb9D4A42157 \
|
|
0x114De8460193bdf3A2fCf81f86a09765F4762fD1 \
|
|
0x107A0086b32d7A0977926A205131d8731D39cbEB \
|
|
0x8C82B2fd82FaeD2711d59AF0F2499D16e726f6b2 \
|
|
0x11b39756C042441BE6D8650b69b54EbE715E2343 \
|
|
0x54Ce5B4D348fb74B958e8966e2ec3dBd4958a7cd \
|
|
0x15e7cAF07C4e3DC8e7C469f92C8Cd88FB8005a20 \
|
|
0x74a3bf913953D695260D88BC1aA25A4eeE363ef0 \
|
|
0x000aC0076727b35FBea2dAc28fEE5cCB0fEA768e \
|
|
0xAF45Ced136b9D9e24903464AE889F5C8a723FC14 \
|
|
0xf93124b7c738843CBB89E864c862c38cddCccF95 \
|
|
0xD2CC37A4dc036a8D232b48f62cDD4731412f4890 \
|
|
0xDA798F6896A3331F64b48c12D1D57Fd9cbe70811 \
|
|
0x71AA1BE1D36CaFE3867910F99C09e347899C19C3 \
|
|
0x8192b6E7387CCd768277c17DAb1b7a5027c0b3Cf \
|
|
0x178e21ad2E77AE06711549CFBB1f9c7a9d8096e8 \
|
|
0x5E1487F35515d02A92753504a8D75471b9f49EdB \
|
|
0x6FbEBc898F403E4773E95feB15E80C9A99c8348d \
|
|
|
|
${sleep}
|
|
starkli call "${wormhole_address}" parse_and_verify_vm \
|
|
22 31 1766847066033410293701000231337210964058791470455465385734308943533652138 250126301534699068413432844632573953364878937343368310395142095034982913232 374780571002258088211231890250917843593951765403462661483498298003400611238 23190137343211334092589308306056431640588154666326612124726174150537328574 238750269065878649216923353030193912502813798896051725498208457553032584635 29844190303057534696518006438077948796328243878877072296680853158289181326 106329507856770018708432343978518079724691760719405501795955774399597471533 50779865592261858016477142415230454208001695486195806892438697217059319645 448669871976126446102256476358498380455807705600424321390063431836375575318 115682669871397824853706713833773246708114483862317474710603223566297521279 301634766618012930739391408723909107532790832406455099966028276947414082504 104473166230846104217366042152018649207811514257244625711402436055500423094 64445621634231668761998815864645440965239569561546522651415024970517905416 192317190225976528694195501079591384434869624408066864018183189813956862386 289982656017597431343118552054719821766658675456661448685110903889153449006 218840601196095059731241556733624112758673153548932709011933806481899680620 430933799927481265070475198137531816946660368757134588278434352703899277070 69322998883710289192076494057541346430050879299268159627180404869988632073 23862615839737051269352321086490452186237833007444069999578906611768140646 444634264607471510688862284107804392707600799506487897206707262445172121289 438038196736233160320436150616293672539386464061037100698335568417587662951 4682255185797880874381673193118803274635247527626050223938224759013169366 337620725992972686809095065321563509600769533202700218393281926304544120094 106657917096532484607371891267699639824731774168349872862335217581425289654 71240348385993236445536577509595968468284689483611375124653855125285401592 347603391821038175842934311068097986460257977131947418186118379296987051086 414263571545410645948841360836383289766662078574048514890988877286444618669 250301638008739107522011802538487063969565433276260914336890309092111026583 43192785595291340058788190601908070333310658291317702311902081 52685537088250779930155363779405986390839624071318818148325576008719597568 14615204155786886573933667335033405822686404253588533
|
|
|
|
|
|
pyth_hash=$(starkli declare target/dev/pyth_pyth.contract_class.json)
|
|
|
|
pyth_address=$(starkli deploy "${pyth_hash}" \
|
|
"${owner}" \
|
|
"${wormhole_address}" \
|
|
1 `# num_data_sources` \
|
|
26 `# emitter_chain_id` \
|
|
58051393581875729396504816158954007153 299086580781278228892874716333010393740 `# emitter_address` \
|
|
)
|
|
|
|
# 101773889622543820379181807264976483921095259207155368968971513593537092692593 `# emitter_address` \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
${sleep}
|
|
starkli call "${pyth_address}" update_price_feeds \
|
|
11 41 141887862745809943100717722154781668316147089807066324001213790862261653767 451230040559159019530944948086670994623010697390864133264612902902585665886 355897384610106978643111834734000274494997301794613218547634257521495150151 140511063638834349363702006999356227863549404051701803148734324248522745879 435849190784772134907557391544163070978531038970298390345939133663347953446 416390591179833928094641114955594939466104495718036761707729297119441316151 360454929416220920336539568461651500076647166763464050800345920693176904002 316054999864337699543932294956493808847640383114707243342262764542081441331 325277902980160684959962429721294603784343718796390808940252812862355246813 43683235854839458868457367619068018785880460427473556950900276498953667 448289429405712011882317781416869052550573589492688760675666957663813001522 118081463902430977133121147164253483958565039026724621562859841189218059803 194064310618695309465615383754562031677972810736048112738513050109934134235 133901765334590923121691219814784557892214901646312752962904032795881821509 404227501001709279944936006741063968912686453006275462577777397594240621266 81649001731335394114026683805238949464016657447685509824621946636993704965 32402065226491532148674904435794801976788068837745943243341272676331333141 431262841416902409381606630149292665102873776020834630861578112749151562174 6164523115980545628843981978797257048781800754033825701059814297149591186 408761574582108996678203805090470134287794603493622537384530614829262728153 185368533577943244707350150853170361880334596276529206938783888784867529821 173578821500714074579643724957224629379984215847383417303110192934676518530 90209855380378362490166376523380463998928070428866100240907090599465187835 97758466908511588082569287391708453107999243934457382895073183209581711489 132725011490528489913736834798247512772139171145730373610858422315799224432 117123868005849140967825260063167768530251411611975150066586827543934313288 408149062252618928234854115279677715692278734600386004492580987016428761675 164529520317122600276020522906605877985809506451193373524142111430138855019 444793051809958482843529748761971363435331354795896511243191618771787268378 247660009137502548346315865368477795392972486141407800140910365553760622080 3281582060272565111592312037403686940429019548922889497694300188 93649805131515836129946966966350066506512123780266587069413066350925286142 394112423559676785086098106350541172262729583743734966358666094809121292390 35403101004688876764673991514113473446030702766599795822870037077688984558 99366103604611980443183454746643823071419076016677225828619807954313149423 10381657217606191031071521950784155484751645280452344547752823767622424055 391045354044274401116419632681482293741435113770205621235865697077178955228 311250087759201408758984550959714865999349469611700431708031036894849650573 59953730895385399344628932835545900304309851622811198425230584225200786697 226866843267230707879834616967256711063296411939069440476882347301771901839 95752383404870925303422787
|