Commit Graph

307 Commits

Author SHA1 Message Date
guibescos 3458dd5b7d
[solana] Post update atomic (#1210)
* Post update atomic

* Checkpoint cli

* Fix bug

* Atomic

* Cleanup

* Cleanup

* Cleanup

* Cleanup

* Comment

* Add wormhole errors

* refactor trim signatures
2024-01-08 14:27:03 +00:00
Dev Kalra 2d5e030149
[executor] call contract with value (#1206)
* call contract with value

* address feedback
2024-01-08 17:29:32 +05:30
Dev Kalra 220e06a62d
test owner upgradable (#1207) 2024-01-07 17:31:34 +05:30
guibescos 1778871b8b
[solana] Post price with 13 signature verifications in 2 transactions (#1209)
* Rebalance transactions so you can post an update in two transactions

* Remove magic number

* Cleanup

* Cleanup

* Add comment
2024-01-05 17:41:35 +00:00
Dev Kalra 1816838c8a
[executor] implement upgradability (#1198)
* get all test to work

* executor upgradable

* update comments

* address feedback

* fix tests
2024-01-04 15:59:29 +05:30
Amin Moghaddam e1606a42b5
Add Base sepolia + some minor improvements (#1202)
* Add base sepolia

* Fix broken rpc urls

* Small fix
2024-01-03 11:30:17 +01:00
Dev Kalra 6463f1a98f
fix check an active request (#1200) 2023-12-21 15:50:47 +05:30
Dev Kalra 3565ee627e
point entropy sdk docs to pyth docs for current deployments (#1199) 2023-12-21 15:26:26 +05:30
Ali Behjati 4f7c5e9dcd chore(target_chains/ethereum): update testnet contract addresses 2023-12-19 10:47:49 +01:00
guibescos 6f3dd5cd10
[solana-reciever] update docs (#1192)
* Docs

* Fix

* Do it

* Address feedback
2023-12-18 21:56:02 +07:00
Amin Moghaddam 51d23a2f52
chore(eth) Add zksync-sepolia (#1190) 2023-12-18 10:29:59 +01:00
guibescos a60279a2cc
[solana-receiver] Post price update (#1189)
* Do it

* Remove keypairs

* add check comment

* Works

* Cleanup deps

* Next

* Add better docs
2023-12-18 11:46:45 +07:00
guibescos 4aa60453bd
[solana-receiver] Initialize receiver from CLI (#1191)
* Initialize

* Update address

* cleanup
2023-12-18 11:08:08 +07:00
guibescos 0a86414523
[pythnet-sdk] Fix CI. Make dependency path. (#1188)
* Update status

* Lfg
2023-12-16 02:21:11 +07:00
Dev Kalra 3ecbca7daa
[fortuna] update config and abi (#1187)
* update config and abi

* introduce sepolia later

* update sdk readme

* fix lightlink issue

* update link
2023-12-15 17:30:38 +05:30
guibescos 7bf41c40e6
[solana-receiver-cli] Add logic to receive VAAs with the new Wormhole receiver (#1184)
* Checkpoint

* Checkpoint

* Cleanup

* More cleanup

* Cleanup

* Should work

* Rename

* New receiver post-vaa

* Rename legacy

* Checkpoint

* ADd compute units

* Revert htis file

* Rename

* Comments
2023-12-15 10:33:17 +07:00
guibescos f78301d019
[pyth-solana-receiver-cli] Initialize solana wormhole receiver (#1180)
* Checkpoint

* Checkpoint

* Checkpoint

* Cleanup

* More cleanup

* Cleanup

* Cleanup

* Should work

* reorder

* Send it

* Rename

* Add comment
2023-12-15 02:21:02 +07:00
Dev Kalra 5d951ee755
[entropy] audit 4. users can influence the Entropy revealed result (#1179)
* add a check for blockhash

* add comment

* update test name

* comment update

* change block number

* change order for assertions

* pre commit run

* names and comments
2023-12-14 17:57:45 +05:30
Dev Kalra 654c1eae89
add zero value check (#1181) 2023-12-14 17:54:43 +05:30
guibescos 9875bc2ba4
feat(target-chains/solana): Implement governance for the solana pull oracle (#1175)
* Do it

* Go

* Address some feedback

* Update size of config
2023-12-14 19:11:34 +07:00
Dev Kalra f0c67c5996
[entropy] audit: 3. two step transfer (#1178)
* two step owner transfer

* admin two step transfer

* remove redundant test
2023-12-13 16:45:07 +05:30
Dev Kalra 941ee777f0
[entropy] audit - 2. lack of contract existence check (#1177)
* contract existence check

* better comment
2023-12-13 16:42:21 +05:30
Amin Moghaddam 8adac4344f
chore(eth) Add bttc (#1172)
* chore(eth) Add bttc
2023-12-08 22:56:16 +08:00
Reisen 214bafa420 near: internal feedback 2023-12-07 17:40:18 +00:00
Reisen 415ca4f9b1 near: add vaa verify to claim, also fixes private 2023-12-07 17:40:18 +00:00
Reisen bd24d4d42c near: address both refund logic issues 2023-12-07 17:40:18 +00:00
Reisen f3dce0e316 near: make codehash safe for repeat upgrades, document 2023-12-07 17:40:18 +00:00
Reisen 177b5af94b near: use Seconds alias to document units, fix calc 2023-12-07 17:40:18 +00:00
Reisen 5b7ada59bd fix(near): sdk compat 2.0 2023-12-07 17:40:18 +00:00
Ali Behjati bbd3d1add3 chore(target_chains/eth): revert solidity version
This change reverts the solidity version to 0.8.4 as the current version
troubles the Pyth price feeds contract deployment. Some tests are
changed to use the methods available in the older version.

Also, the Pyth contract version is updated. This is because we made a
change to the Governance structs (to add Stacks) that results in a new
bytecode.
2023-12-06 17:42:42 +03:30
Reisen 7b3055460e fix(near): match Price interface from pyth-sdk 2023-12-05 10:12:39 +00:00
Jayant Krishnamurthy c592fd36ca
[fortuna] Add confirmation delay before responding (#1161)
* Update abi

* fix tests

* update contract

* fix fortuna

* test confirmation delay

* cleanup

* fix

* split the fields

* saturating sub

* rename
2023-12-04 10:25:00 +01:00
Jayant Krishnamurthy 21a4ec8277
[entropy] Update readmes and docs (#1163)
* add some docs

* more doc edits
2023-12-03 09:14:46 -08:00
Jayant Krishnamurthy 0a2378e94c
[entropy] more executor tests (#1162) 2023-12-03 09:14:35 -08:00
Amin Moghaddam 8a98279fb2
chore(eth) deploy to mode (#1159) 2023-12-03 13:20:38 +03:30
Jayant Krishnamurthy 97bbc8cef9
add authorization for reveal method (#1156) 2023-11-30 13:28:00 -08:00
swimricky 8202181a1b
Solana receiver decode vaa accumulator (#1145)
* feat: impl postAccumulatorUpdateVaa and postUpdates and CLI test changes

* feat: clean up

* refactor: reorganize and fix tests

* refactor: clean up

* chore: add rust-toolchain for solana target contract dir

* refactor: clean up and address feedback

* refactor: make emitter chain & post vaa program configurable

* feat: remove postAccUpdateVaa and use wh post_vaa in cli

* fix: add check for emitter address, hardcode expected emitter chain/addr for now

* chore: cleanup

* chore: clean up

* feat: address feedback, move checks from context into account, use signatureset for postupdates

* feat: use pubkey and require_keys_eq! for emitter addr check

* refactor: address feedback

add documentation and todos, revert programsimulator to use upgradable bpf loader

* feat: remove signature_set account from post_updates, update docs & readme

* test: add lazy static for setting up pyth binary but still has same invalidaccountdata issue

* chore: clean up

* refactor: remove unused errors

* feat: use UncheckedAccount for posted_vaa so owner can be checked dynamically against config
2023-11-30 16:04:41 -05:00
Jayant Krishnamurthy 99be611684
[stacks] Add constants for Stacks (#1158)
* add constants for stacks

* di
2023-11-30 11:57:15 -08:00
Dev Kalra ae7610b0ab
[entropy] governance (#1154)
* governance

* correct comment

* add upgradability

* remove unused lib

* update governance and update logic

* change specifiers

* fix tests

* add tests

* rebase bug fixes

* change error name

* fix tests

* no need of UUPSProxy

* minimise the amount of code

* separate file for authorized tests

* add comment

* correct comment
2023-11-30 16:29:35 +05:30
Jayant Krishnamurthy b2e4d56d36
[entropy] Entropy gas benchmarks and optimizations (#1153)
* add gas benchmark

* fix benchmark

* fix benchmark

* fix benchmark

* optimization 1: remove provider

* move to u128 for fees

* update benchmark

* comment

* reduce commitment storage

* optimize storage more

* fix fee fields in state

* hmm

* ok

* fix

* cleanup

* this got out of hand

* test overflow conditions

* fix bad merge

* doc
2023-11-29 14:37:42 -08:00
Jayant Krishnamurthy a5646bf840
[entropy] Add a default provider (#1150)
* making a mess here

* add default provider

* cleanup

* test new abi

* add uri to fortuna

* pr comments
2023-11-27 18:40:36 -08:00
Reisen 7641f7eacf docs(near): improve example 2023-11-27 17:18:19 +00:00
Jayant Krishnamurthy b7a089b51e
[entropy] Change provider interface to simplify supporting many chains (#1149)
* grr

* cleanup

* fix semver
2023-11-27 07:39:54 -08:00
Jayant Krishnamurthy da72b6e250
[entropy] First cut at EVM executor (#1148)
* executor

* executor tests

* basic test works

* cleanup

* cleanup

* fix ci
2023-11-27 06:45:43 -08:00
Ali Behjati ff0d9fe65c
chore(eth): update mentions to evm-testnet and hermes-beta (#1151)
We have deployed new Pyth contracts on testnets using the stable
feeds and users no longer need to use hermes-beta in many networks.
This change updates the mentions to them.
2023-11-27 10:12:52 +01:00
Reisen 2b118c1f9c feat(near): parse string identifiers 2023-11-24 16:14:48 +00:00
Ali Behjati 2c93737366
chore(eth): deploy stable contracts on testnets (#1146)
* chore(eth): deploy stable contracts on testnets

* chore(eth): address feedbacks

* Add op sepolia

---------

Co-authored-by: Amin Moghaddam <amin@pyth.network>
2023-11-24 11:59:04 +01:00
Ali Behjati 9335898ece feat(contract-manager): add script to fetch account balances 2023-11-21 17:53:43 +01:00
Reisen ef02cfefe4 docs(near): add near guides 2023-11-10 17:03:20 +00:00
Jayant Krishnamurthy c0b383e277
[entropy] add arbitrum goerli (#1139) 2023-11-09 13:58:09 -08:00
Reisen 9d8c271607 feat(near): accumulators 2023-11-08 12:32:06 +00:00
Amin Moghaddam 16832aba51
chore(eth): Add tomochain (#1134) 2023-11-07 10:28:52 +01:00
Jayant Krishnamurthy 8e11d4f442
minor stuff (#1132) 2023-11-03 10:04:54 -07:00
Jayant Krishnamurthy 8c35091831
[entropy] Minor updates to parameters / docs (#1131)
* update parameters

* install instructions

* format stuff
2023-11-01 13:34:47 -07:00
Jayant Krishnamurthy 44ebfbaf55
[entropy] make the SDK public
I think I need this field to get NPM to publish this new package.
2023-11-01 12:41:39 -07:00
Jayant Krishnamurthy f36e868ef6
[entropy] Typescript code for coin flip example + docs (#1128)
* adding stuff

* add coin flip example

* it works

* docs

* hm

* pr comments
2023-11-01 10:30:04 -07:00
Jayant Krishnamurthy fe7984d132
[entropy] Rename files (#1127)
* rename stuff

* fix

* fix
2023-10-31 08:50:15 -07:00
Jayant Krishnamurthy ddbbe2af14
Entropy Solidity SDK & usage example (#1124)
* grr

* revert

* ok

* ok

* ok

* deploy script

* implement interface

* doc comments

* fix comment
2023-10-31 06:32:21 -07:00
Amin Moghaddam 8d99ac402c
chore(evm) Add more networks (#1121) 2023-10-23 11:41:07 +02:00
Jayant Krishnamurthy 4776bdcdf9
Fortuna CI workflows (#1120)
* CI and docker

* cleanup

* erc

* whoops
2023-10-20 10:49:41 -07:00
Ali Behjati efcfae3ed7 chore(eth): deploy to chiliz mainnet 2023-10-20 17:42:47 +02:00
Amin Moghaddam 8b721c38dc
Update sui packages addresses (#1115) 2023-10-20 10:57:24 +02:00
Ali Behjati 65e21997e4 chore: remove price service mentions in the repo 2023-10-19 09:25:03 +02:00
Ali Behjati 49d1a579c3 chore: cleanup repo 2023-10-18 18:32:42 +02:00
Amin Moghaddam c0057809f5
chore(evm): deploy to new networks (#1107) 2023-10-18 17:20:44 +02:00
Jayant Krishnamurthy 727f9ec33d
Initial version of random numbers contract (#1093)
* initial merkle tree cut

* initial working test

* grrr

* add this deploy script

* contract stuff

* doc

* cleanup

* cleanup

* delete janky deploy script

* first commit of random2

* randomness

* format

* wtf

* wtf

* stuff

* cleanup

* minor

* add extra field

* pr comments
2023-10-17 13:07:47 -07:00
Amin Moghaddam 4bc11b863c
chore(evm): deploy to new networks (#1104)
zetachain testnet
2023-10-17 18:15:17 +02:00
Ali Behjati ad277ec7f2 chore(evm): deploy to new networks
chiliz_spicy and scroll
2023-10-17 10:04:34 +02:00
Ali Behjati 2b51cffdc7 fix(price-service/client): remove axios version lock 2023-10-16 16:46:57 +02:00
Amin Moghaddam 6cebfef1df
[evm] Evm runs (#1099)
* Show chain id when checking proposals

* Reduce number of optimizations to 200 in order to defeat the Spurious Dragon
2023-10-13 15:45:35 +02:00
Amin Moghaddam eb9526675c
[evm] parsePriceFeed with uniqueness validation (#1089)
* Implement uniqueness
* Add tests and update abi
* Fix MockPyth for the unique version
* Bump version
* Add gas benchmark functions
2023-10-13 14:15:42 +02:00
Amin Moghaddam f5698bf509 Add optimism sepolia 2023-10-11 21:12:11 +02:00
Amin Moghaddam 0e67978aea
Add manta (#1085) 2023-10-11 11:05:05 +02:00
Amin Moghaddam f224486ae2
Aptos improvements (#1079)
* More documentation on the upgrade procedure and mainnet init

* Add profiling utility for aptos

* Reuse contract manager logic to sync guardian sets

* Add documentation for sui gas profiling
2023-10-10 12:03:01 +02:00
Amin Moghaddam 17f489e629 Add boba deployment files 2023-10-09 11:04:42 +02:00
Amin Moghaddam c01a9cf056
Optimize aptos contract to verify messages only once (#1074) 2023-10-03 11:05:54 +02:00
Amin Moghaddam 061f6a028d
Fix sui js sdk and bump contract (#1071)
* Bump sui version

* Add sui cli package to lerna

* Fix bug in fetching price feed object ids after upgrade
2023-09-29 10:52:41 +02:00
Amin Moghaddam 345a6081c9
Optimize merkle tree computations gas usage by minimizing vector movements (#1069) 2023-09-28 16:47:05 +02:00
Jayant Krishnamurthy 2858d56f47
Update docs
these instructions are old
2023-09-27 06:08:00 -07:00
Amin Moghaddam a093a8f9c8
Switch from arbitrum goerli to arbitrum sepolia (#1066)
* Change canto rpc address because last one was unreachable

* Deploy on arbitrum sepolia and remove arbitrum goerli
2023-09-27 12:28:09 +02:00
Amin Moghaddam 940c2035f3
[sui-sdk] Sui sdk improvements (#1065)
* Split all coins in 1 transaction

* Use buffer library instead of built-in Buffer
2023-09-25 10:39:14 +02:00
Ali Behjati 24f582cd5a Update README.md 2023-09-22 18:28:24 +02:00
Ali Behjati 65ecd890ae feat(price-service/sdk): add prev_publish_time metadata 2023-09-22 13:30:30 +02:00
Ali Behjati d5c3090442 feat(price-service/client): add out-of-order flag support 2023-09-19 15:54:33 +02:00
Amin Moghaddam f2ca88176a
Add shimmer mainnet (#1053) 2023-09-15 18:23:12 +02:00
Amin Moghaddam 79ea43553f
Add sepolia testnet (#1051) 2023-09-13 15:53:18 +02:00
Ali Behjati a34f759061 chore(eth): deploy to horizen eon/gobi 2023-09-12 15:10:09 +02:00
Sahilgat 7cbdcb562d fix: underflow issue 2023-09-04 18:44:41 +02:00
Ali Behjati e1ae1ad1c4 fix(eth): update legacy updateFee method pricing 2023-08-31 11:51:27 +02:00
Amin Moghaddam 47c6f45128 Add addresses to evm js sdk 2023-08-28 14:40:09 +02:00
Amin Moghaddam a7d133d063
[cosmwasm] CosmWasm integration with contract manager (#1025)
* Integrate with contract manager for wormhole script

* Remove deprecated scripts and more integration with contract manager

* Remove cosmwasm tools store

These configs are now held in the contract manager

* Update docs on cosmwasm

* Split cosmwasm package into 2 for fixing dependency issues

* Fix cosmwasm README.md

Co-authored-by: Ali Behjati <bahjatia@gmail.com>
2023-08-25 16:38:42 +02:00
Amin Moghaddam cf78791560
[sui] [contract-manager] Sui cm updates (#1030)
* Minor documentation and improvements on contract manager

* Add published addresses for sui contracts
2023-08-25 14:42:31 +02:00
Mohammad Amin Khashkhashi Moghaddam 78ca49dcc3
[evm] [cosmwasm] Minor cleanup (#1027)
* Remove old cosmwasm address documentation

* Remove old evm migration folder and keep prod-receiver
2023-08-24 11:41:59 +02:00
Mohammad Amin Khashkhashi Moghaddam b9dbd54d5a
[contract-manager] General improvements (#1024)
* Better return types for transaction execution functions

* Use new type for passing PrivateKey

* Small typing improvements

* Stricter liniting

* Rename edge to beta for DeploymentType

* Reduce any usage across the contract manager

* Fix explicit any linting warnings
2023-08-23 16:29:43 +02:00
Mohammad Amin Khashkhashi Moghaddam 20d8eec064
Update sui docs and refer to docs page to avoid duplication (#1023) 2023-08-23 11:32:45 +02:00
Mohammad Amin Khashkhashi Moghaddam 5a714662b0
[sui] Use manual serialization for vaas (#1016)
* Use manual serialization in most of the places

* Update sui js lib and change cli package config
2023-08-22 12:44:43 +02:00
Dmitry Shvetsov b779975b2c
Update aptos examples pyth dependency subdir (#1020) 2023-08-22 10:34:30 +02:00
Mohammad Amin Khashkhashi Moghaddam b189937365
[sui] Sui dx improvement (#1011)
* Use the actual wormhole deployment on testnet for sui testnet config

* Simpler deployment script

* Bugfix in upgrade payload deserialization

* Bugfix in fetching upgrade digest

* Small contract manager refactoring and more integration for upgrade script in sui

* Remove old scripts

* Add script for just generating the sui contract digest

* Restrict HotPotatoVector borrow access

The return value of `create_price_infos_hot_potato` should not be inspectable
outside of the package.

* Reorganize the cli lib for sui

* Add minimal README for sui cli

* Update the general README for sui

* Reuse sui sdk logic in contract manager


* Manual serialization of accumulator updates for increasing payload size

Default payload size seems to be 1024 bytes which is not enough for messages
with multiple feeds

* Bump sdk version
2023-08-15 17:56:43 +02:00
optke3 55129e5b89
[Sui 21/x] - pyth-sui-js SDK (#1004)
* Add sui js sdk

* Update dependencies and package lock

---------

Co-authored-by: Amin Moghaddam <amin@pyth.network>
2023-08-15 10:52:16 +02:00
optke3 f79cfd8669
[Sui 20/x]- refactor Pyth governance code path (#991)
* - refactor Pyth governance code path to not use wormhole::governance_message module
- use our own custom WormholeVAAVerificationReceipt struct instead of DecreeReceipt

* delete print

* delete print

* contract edits

* add test vaa / test for set_update_fee

* bring back set data sources test

* use correct VAA for test set data sources

* delete commented out code

* write test for set stale price threshold

* update pyth verify_vaa

* simplify pyth::governance::verify_vaa

* use sequence number for replay protection in both governance and contract upgrade code paths

* only use sequence number for replay protection
2023-08-10 10:58:44 +02:00