Skip to content

Commit cae194e

Browse files
authored
Starknet: update_price_feeds and latest_price_info (#1482)
* feat(target_chains/starknet): update_price_feeds and latest_price_info * test(target_chains/starknet): basic test for pyth contract * chore(target_chains/starknet): update deploy script * feat(target_chains/starknet): added get_price_unsafe and get_ema_price_unsafe * refactor(target_chains/starknet): match on UpdateType and MessageType
1 parent 8d32b4c commit cae194e

File tree

3 files changed

+588
-25
lines changed

3 files changed

+588
-25
lines changed

target_chains/starknet/contracts/deploy/local_deploy

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -113,20 +113,17 @@ starkli call "${wormhole_address}" parse_and_verify_vm \
113113

114114
pyth_hash=$(starkli declare target/dev/pyth_pyth.contract_class.json)
115115

116-
pyth_address=$(starkli deploy "${pyth_hash}" 42)
117-
118-
# TODO: update after Pyth contract is merged
119-
120-
# pyth_address=$(starkli deploy "${pyth_hash}" \
121-
# "${owner}" \
122-
# "${wormhole_address}" \
123-
# 1 `# num_data_sources` \
124-
# 26 `# emitter_chain_id` \
125-
# 58051393581875729396504816158954007153 299086580781278228892874716333010393740 `# emitter_address` \
126-
# )
116+
${sleep}
117+
pyth_address=$(starkli deploy "${pyth_hash}" \
118+
"${owner}" \
119+
"${wormhole_address}" \
120+
1 `# num_data_sources` \
121+
26 `# emitter_chain_id` \
122+
58051393581875729396504816158954007153 299086580781278228892874716333010393740 `# emitter_address` \
123+
)
127124

128-
# ${sleep}
129-
# starkli call "${pyth_address}" update_price_feeds \
130-
# 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
125+
${sleep}
126+
starkli invoke "${pyth_address}" update_price_feeds \
127+
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
131128

132129
echo Pyth contract has been successfully deployed at "${pyth_address}"

0 commit comments

Comments
 (0)