Commit Graph

181 Commits

Author SHA1 Message Date
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
Ali Behjati ec63330cf0 chore: add coverage/ to gitignore 2023-08-09 20:58:54 +03:30
Ali Behjati 439a0f0337 fix: make coverage work on newer versions 2023-08-09 20:58:54 +03:30
Jeff Schroeder 4e8c30b072 chore(ethereum): add html coverage bits
Add an npm helper to output the html coverage files via:

    npm run coverage

This requires lcov and genhtml to be installed.
2023-08-09 20:58:54 +03:30
Mohammad Amin Khashkhashi Moghaddam e422fb9321
[evm] Wormhole receiver deploy all (#1009)
* Add verification logic for evm set wormhole address instruction

* Minor improvements and cleanup on contract manager evm

* Batch deploy script

* Better docs on verification

* Fix zkSync deployment script and update documentation
2023-08-09 18:22:47 +02:00
Ali Behjati f1eeb94210 chore(eth): add scroll sepolia 2023-08-08 10:21:05 +03:30
Mohammad Amin Khashkhashi Moghaddam 272f3c1984
[contract-manager] Contract manager improvements (#1000)
* Use arrays instead of separate files per config

* Remove redundant endpoint on cosmwasm

* Add functions for upgrading the wormhole guardian sets

* Add wormhole contract management on evm and cosmwasm

* Add getter functions to check what sort of wormhole-deployment is used

* Reorganize contract manager package to be used via other packages

* Remove .env files per network and create a script that outputs the same file

* Use env variables in truffle config and output config in deployments

* Add executeUpdatePriceFeed to contract interface

* Add update pricefeed script

* Add saving functionality to store

* Save new contract configs automatically on Evm

* Make deploy script use the create-env.js internally

* Add utility function to get implementation address for Evm Proxy contracts

* Add shimmer testnet and replace evmos nunfunctional rpc

* New procedure for contract verification

* Update docs and remove duplicate configurations

* Remove shimmer configs

* Read default data source configs via contract manager

* Remove flattened contract before compiling/deploying
2023-08-07 14:13:29 +02:00
optke3 a9a21ae977
[Sui 17/x] - accumulator price update from client-side (#946)
* get accumulator message from hermes price service

* ts parse_vaa_bytes_from_accumulator_message utility

* update registry to point to latest pyth package ID (assert_only passes)

* - set data sources governance test in set_data_sources.move
- make some helper functions in pyth.move public
- test file for update price feed using accumulator messages

* tests for governance actions

* - on-chain test for parsing acc message
- fix utility for parsing accumulator message VAA off-chain (on client-side)
- almost get client-side acummulator price update working

* clean up pyth_update_price_feed_using_accumulator_message.ts script

* more clean-up and pre-commit run --all-files

* revert changes to instructions.ts and package-lock.json

* - updated newly created price info object addresses
- fix bug in hot potato vector destroy function (specify type arg)
- price update using accumulator on client side works!

* edit

* format

* - update testnet accumulator message update test
- clean up ts files

* more clean up

* clean up

* optke3 -> mysten

* premitoio
precommit run all files

* edit

* rename update_price_feeds to the more specific update_price_feed_using_accumulator_message

* revert contract changes

* edit sign_governance_msg script

* run precommit on all files

* edit

* remove sdk folder
2023-08-04 16:36:20 -04:00
Mohammad Amin Khashkhashi Moghaddam 175dfef5bd
Deploy to the latest shimmer testnet (#1001) 2023-08-02 16:59:39 +01:00
Mohammad Amin Khashkhashi Moghaddam ce86586744
Make aptos abi backward compatible (#999)
In our previous release this function was an entry function by mistake.
Now in order to keep our abi backward compatible, we need to keep it as entry function.
In order to allow the newer aptos cli to ignore this issue, we decorate it with `legacy_entry_fun`
2023-08-02 10:48:15 +01:00
Mohammad Amin Khashkhashi Moghaddam ce66a36415
Revert aptos address change (#998) 2023-08-01 16:47:36 +01:00
Mohammad Amin Khashkhashi Moghaddam 1d5a96c35a
[aptos] New address for aptos deployments and some small improvements (#996)
* Add abi diff command and small documentation fix

* Redeploy aptos package and update the address
2023-08-01 07:36:52 +01:00
Mohammad Amin Khashkhashi Moghaddam 2782c6bf64
[aptos] Aptos cleanup (#994)
* Better errors

* Better variable typing

* Upgrade cli with more straightforward flow

* Remove unnecessary configs and distinguish between deployer contract and signer

* Convert the named-addresses argument to 3 separate options with default values

* Add README
2023-07-31 11:43:58 +01:00
Mohammad Amin Khashkhashi Moghaddam 7674a3a07c
[docs] More documentation on different packages (#992)
* More documentation on different packages
2023-07-28 17:11:29 +01:00
Ali Behjati 928027a270
chore(ethereum): deploy to base and syndr_testnet (#988) 2023-07-27 16:16:45 +03:30
Mohammad Amin Khashkhashi Moghaddam 92b295bd7a
[contract-manager] Cosmwasm contracts (#986)
* Add stable testnet contracts

* Fix bug in creating InjectiveExecutor from mnemonic

* Import only from root library

* Code verification on proposals for cosmwasm

* Minimal script to upload wasm codes

* Use the netwrok parameter for InjectiveChain executor instead of endpoints
2023-07-27 14:36:16 +02:00
Mohammad Amin Khashkhashi Moghaddam ea37f6aab5
Add injective executor logic and contracts and getVersion utility function (#983) 2023-07-25 17:37:47 +02:00
Dev Kalra 7cd9ec7e03
[cosmwasm] bump version (#977)
* bump version

* pre commit fix
2023-07-25 18:49:31 +05:30
Mohammad Amin Khashkhashi Moghaddam 741f763375
Fix mainnet values on fuji and chiado and remove oasis network (#979) 2023-07-25 11:31:45 +03:30
Mohammad Amin Khashkhashi Moghaddam 31ad2b66a3
[contract-manager] Evm upgrades (#971)
* Add evm contract infos + minor improvements

* Throw error if chainId is invalid instead of using 0 silently

* Add wormholeChainName property for chains to use in governance actions

* Return all signatures upon proposal execution

* Unify privateKey schema for contract manager

* Implement getLastExecutedGovernanceSequence for all contract types

* Unify getPriceFeed interface between contracts

* Add update price feed for evm

* Adjust gasPrice on evm

* Add setter for datasources + add global chain for universal governance instructions

* Add utility function to execute arbitrary governance Vaa

* Remove redundant contract

* Better error message when gas is not enough on deployment

* Add aptos mainnet config

* Restore sui override of setFee governance message generation

* Export executeVaa function

* Address PR feedbacks

* More documentation and cleanup

* Remove INFURA_KEY logic and replace RPC endpoints with public ones

* EVMContract -> EvmContract, EVMChain -> EvmChain

* Make executeUpdatePriceFeed interface on cosmos similar to evm

* Better error message and more comment regarding gas
2023-07-25 08:14:31 +02:00
Mohammad Amin Khashkhashi Moghaddam 4660026009
Remove osmosis testnet 4 as it is deprecated and we already have testnet 5 (#974) 2023-07-24 19:37:55 +09:00
Mohammad Amin Khashkhashi Moghaddam 49fbd2f121
Pin wormhole dependency in aptos to a revision which has pinned the AptosStdLib dependency (#962) 2023-07-19 08:38:37 +02:00
Ali Behjati e63490be48
[eth] Add EOS network (#963) 2023-07-18 23:00:47 +03:30
Ali Behjati dcec1e9328
[eth] Finalize accumulator contract (#960) 2023-07-18 12:57:29 +03:30
Mohammad Amin Khashkhashi Moghaddam 9bdc493ce6
Update evm chain and contract configs (#961)
Remove ropsten and shimmer_testnet network as they are deprecated
Provide neon rpc url as it is not private anymore
2023-07-18 10:36:26 +02:00
Mohammad Amin Khashkhashi Moghaddam 6f8fa11b20
Fix README.md for prettier (#959) 2023-07-17 16:42:03 +02:00
Ali Behjati c86e4f2610
[eth] Add linea (#956)
* [eth] Add linea

* Fix pre-commit
2023-07-17 17:51:22 +03:30