Commit Graph

2514 Commits

Author SHA1 Message Date
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
Mohammad Amin Khashkhashi Moghaddam caca2da9e2
[price-pusher] Fix fee calculation on injective price pusher (#1007)
* Fix fee calculation on injective price pusher

We used an optimization to calculate the update fee based on the number of VAAs. This used to be true before the accumulator messages but now since both formats can be used, it is not obvious what the final fee would be. We can again try to optimize this code and reduce rpc calls by replicating the fee calculation logic from the smart contract, but for now we have rolled back to the unoptimized version.
2023-08-09 14:43:06 +02:00
Ali Behjati 1ed8b673f9 fix(hermes): use compatible ws format as xc-server 2023-08-09 12:57:18 +03:30
Ali Behjati 04b31f17c5 fix(hermes): send close message on WS closure
Some WS clients were receiving "Abnormal Connection Closure" errors.
This commit fixes the issue by sending specific close message upon
receiving close message from client. This commit also refactors the
ws.rs code by making it simpler and using tokio::time::Interval
instead of a manually implemented interval. Lastly, it updates the
axum package to include newer patches.
2023-08-08 18:57:06 +03:30
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
Ali Behjati 3df34478bf Update README.md 2023-08-04 11:58:30 +03:30
Ali Behjati 6bf10d30bf Update README.md 2023-08-04 11:58:30 +03:30
KemarTiti 4beb5bb66e Update README.md
update link
2023-08-04 11:58:30 +03:30
KemarTiti 8dc8679f5e Update README.md
fix broken link to
https://github.com/pyth-network/pyth-crosschain
2023-08-04 11:58:30 +03:30
Jayant Krishnamurthy 99f1b6e950
[hermes] Finish up docs (#1002)
* docs

* stuff

* comment
2023-08-03 09:24:31 -07:00
Jayant Krishnamurthy cb49236a58
[hermes] Document most of the endpoints (#997)
* add rough docs for most stuff

* cleanup

* bunch of docs

* bunch of docs

* gr
2023-08-02 19:25:30 -07: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
optke3 c890d350ae
[Sui 19/x] - sui contract manager additions (#953)
* getSetDataSourcesPayload, getSetStalePriceThresholdPayload

* use parent functions for SuiChain
2023-08-01 13:24:00 -04: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
Jayant Krishnamurthy 07b01118d2
[hermes] Add docs for 1 method (#995)
* doc this one method

* revert
2023-07-29 21:11:03 -07: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
Mohammad Amin Khashkhashi Moghaddam ff77561960
Add sample script that syncs governance vaas for a contract (#989) 2023-07-28 15:41:41 +01:00
Mohammad Amin Khashkhashi Moghaddam 49fe0c96e6
[xc-admin] Governance continue proposal (#993)
* Add ability to continue constructing a proposal

* Bugfix on cosmwasm proposal checking
2023-07-28 15:41:19 +01:00
Jayant Krishnamurthy 61e29ac166
[hermes] add utoipa for API docs (#990)
* [hermes] add utoipa for docs

* fix build

* format
2023-07-27 11:29:56 -07:00
Ali Behjati 9e4242a20e doc(hermes): update readme instructions 2023-07-27 18:31:42 +03:30
Ali Behjati 5f11c3d042 fix(hermes): fix rust version 2023-07-27 18:31:42 +03:30
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
Ali Behjati c1517349f8
test(hermes): add tests for store (#985) 2023-07-27 12:28:12 +03:30
Ali Behjati ec6378676c chore(hermes): version bump 2023-07-26 12:23:12 +03:30
Ali Behjati 4fba5d4f1b chore(hermes): update crates 2023-07-26 12:23:12 +03:30
Ali Behjati 6a4b812ea3 refactor(hermes): remove Storage trait indirection
- Remove Storage trait and LocalStorage and implement everything on Storage struct
- Remove update_accumulator_state and break it down to accumulator_messages and
wormhole_merkle_state
2023-07-26 12:23:12 +03:30
Jayant Krishnamurthy de8aeb0851
Add price service client readme (#984) 2023-07-25 23:31:10 +03:30
Mohammad Amin Khashkhashi Moghaddam ea37f6aab5
Add injective executor logic and contracts and getVersion utility function (#983) 2023-07-25 17:37:47 +02:00
Mohammad Amin Khashkhashi Moghaddam fafb786015
Add script for verification of evm contract upgrades (#982) 2023-07-25 16:21:07 +02:00
Mohammad Amin Khashkhashi Moghaddam 69182f29c2
[contract-manager] Evm contract manager verification (#981)
* Add eos network to contract manager

* Wormhole contract inspection tooling

* Helper function to hash contract code
2023-07-25 17:08:11 +03:30
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 0727aa3c22
Implement setter functions on aptos (#978) 2023-07-25 11:15:03 +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 db6bba9526
Show multisig network on proposal page (#975) 2023-07-24 20:40:07 +03:30
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 4c69764b5a
[xc-admin-frontend] Rename title for clarification (#973)
We only check for pyth oracle programs addresses not all pyth programs,
the name was misleading
2023-07-24 10:51:05 +02:00
Daniel Chew 59d8742da3
break when key is too long (#972) 2023-07-24 15:27:51 +09:00
Reisen 8c342c2ae0 fix: bump cargo and go versions to fix memory/compile issue 2023-07-21 16:56:46 +01:00
Mohammad Amin Khashkhashi Moghaddam 813ad34b68
[xc-admin-frontend] XC admin frontend fix part2 (#970)
* Add some missing hook dependencies

* Smarter target cluster detection

* Show approved/rejected count for active proposals
2023-07-21 16:06:28 +02:00
Mohammad Amin Khashkhashi Moghaddam fbd004f359
[xc-admin-frontend] Xc admin minor fixes (#968)
* Simplify refresh logic

* Bump wormhole-sdk version to include new chain names
2023-07-21 07:31:55 +02:00
Mohammad Amin Khashkhashi Moghaddam 0e018b44c1
Reset currentProposalPubkey when it is removed from the url (#967) 2023-07-20 13:06:49 +02:00