Commit Graph

65 Commits

Author SHA1 Message Date
Jayant Krishnamurthy 5ba6ee819f clean up workflows 2023-09-13 11:13:14 +02:00
Ali Behjati 4e2e04ad44 chore: improve precommit ci 2023-09-13 11:05:52 +02:00
guibescos f7699bb6b0
Update dockerfile (#1041)
* Update dockerfile

* Drive by v4

* Reduce scope

* Revert dockerfile

* Revert dockerfile changes

* Cleanup the other dockerfile

* Remove contracts dir

* Remove old cli
2023-09-04 16:19:39 +01:00
Ali Behjati 9e4242a20e doc(hermes): update readme instructions 2023-07-27 18:31:42 +03:30
Mohammad Amin Khashkhashi Moghaddam c732fcf586
Abolish xc governance sdk (#957)
* Replace xc-governance-sdk with xc_admin_common package

xc_admin_package was not using the CHAIN overrides declared in the governance-sdk so it was moved
to that package as well

* Replace xc-governance-sdk with xc_admin_common in other packages

* Remove the package and all of its references

* Fix tests

* Fix bug in GovernanceDataSourceTransfer encoding

* Rename all references to the old package

* Redeploy neutron_testnet contract with new chain id

* Move SetWormholeAddress to separate file
2023-07-17 15:24:54 +02:00
Jayant Krishnamurthy 78917f6d65
Implement PythGovernanceAction (#906)
* blah

* rename workflow

* grrr

* ok progress

* ok progress

* ok progress

* grrr

* ok

* fix

* fix layout
2023-07-05 08:35:47 -07:00
optke3 a7383a3648
[sui 11/x] - pyth merkle accumulator (#910)
* merkle tree impl

* - take leftmost 20 bytes in hash
- don't assign output of cursor::take_rest to _, instead just drop it

* push PREFIXes (MERKLE_LEAF_PREFIX, MERKLE_NODE_PREFIX) to front instead of back

* delete testXOR

* test construct merkle tree depth exceeded error

* invalid merkle proof test cases

* comments

* rename failure tests

* simplification for initializing a vector

* fix leafHash bug, add tests for hashLeaf and hashNode

* pyth accumulator start, extract_price_info_from_merkle_proof, parse_price_feed_message

* parse_price_feed_message, parse_and_verify_accumulator_updates

* implementation + debugging for merkle pyth accumulator

* edit merkle tree

* testNodehash

* test hash

* delete prints

* test case for parse and verify TEST_ACCUMULATOR_3_MSGS

* hot potato vector -> authenticated price infos

* refactor - move tests from pyth_accumulator to pyth to avoid dependency cycle

* remove _ from deserializing unused vaa

* add sui-contract.yml for github actions

* AuthenticatedPriceInfos -> AuthenticatedVector

* charge base update fee per call to update_single_price_feed

* add back multiple tests, including test_create_and_update_price_feeds_insufficient_fee, update cache, update cache old update

* test multiple price feed creation and update accumulator

* authenticated_price_infos.move -> authenticated_vector.move

* 5 * single_update_fee

* delete some comments, add accumulator test info

* don't make TEST_VAAS test_only in pyth.move

* remove #[test_only]s

* assert price info object contains correct price feed info

* factor out some constants from accumulator test cases to reduce duplicate code

* add sui-contract.yml file for github actions CI

* more refactor and clean-up

* assert price_info_object_1 is correct in test_create_and_update_price_feeds_with_batch_attestation_success

* removed the parse_and_verify_accumulator_message_with_worm_state entirely, and instead added the helper parse_vaa_bytes_from_accumulator_message

* edit comment

* update comment

* edit sui github ci

* fix for sui-contract.yml

* MINIMUM_SUPPORTED_MINOR_VERSION and MAJOR_VERSION

* remove test_get_price_feed_updates_from_accumulator and  parse_vaa_bytes_from_accumulator_message from pyth_accumulator.move

* test_parse_and_verify_accumulator_updates_with_extra_bytes_at_end_of_message

* sui contract yml update

* use rev to cargo install sui in github actions ci

* cargo install --locked for github CI
2023-06-28 10:09:50 -05:00
Mohammad Amin Khashkhashi Moghaddam fb6672fbfb
Aptos accumulators (#904)
* Pin dependency versions

* Implement accumulator support on aptos

* Fix formatting on error.move in aptos

* Add CI workflow for aptos

* Upgrade to aptos cli 1.0.4
2023-06-23 11:27:25 +01:00
Jayant Krishnamurthy 92aa157e85
fix docker build (#898) 2023-06-16 10:39:26 -07:00
Ali Behjati fbd0354b43
Update hermes-image-push.yml (#877) 2023-06-12 15:49:26 +02:00
Ali Behjati 183081cc20
Expose pythnet message buffer idls (#865) 2023-06-09 14:10:28 +02:00
Ali Behjati 404bc6cb81
[ci] Fix pre-commit (#857)
* Update pre-commit

* Update CI rust
2023-06-06 13:15:32 +02:00
Ali Behjati 417fa50f14 Add Dockerfile + CI release action 2023-06-05 15:19:48 +01:00
guibescos 73c2af21a7
[remote-executor] Isolate wormhole-solana crate (#843)
* Point to another wormhole sdk

* Works

* Reset this dir

* Refresh cargo lock

* Bump solana

* Pin git packages

* Allow large errors

* Update to the right wormhole-solana

* Fix cli

* Add cargo lock

* Remove print statement
2023-05-26 14:02:24 -05:00
guibescos 2df32a6108
[remote-executor] Move overflow check (#837)
* Move overflow check

* Modify workflow
2023-05-23 21:06:24 -05:00
Jayant Krishnamurthy f82c87e37d
Fix path to CW sdk (#823)
Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
2023-05-18 11:27:01 -07:00
guibescos 61a66eecaa
Build packages before publishing (#790) 2023-05-01 13:00:41 -05:00
Dev Kalra ec65d3ca81
[cosmwasm] osmosis release (#767)
* update contract version

* update script to build for osmosis

* update pyth sdk cw version

* update release pipeline

* fix pipeline
2023-04-17 18:25:09 +05:30
Dev Kalra 614d35e3a5
[cosmwasm] contracts release (#734)
* test release

* mv instead of rm

* remove todos

* add comment
2023-03-31 19:13:30 +05:30
Dev Kalra 8da5965d5c
[cosmwasm] Release Contract (#726)
* build contract

* uploading artifacts

* test

* test

* different version for upload artifact

* update artifacts path

* add release code

* test

* update artifact path

* test

* update release names

* remove ls

* rename tag

* rename
2023-03-29 19:38:18 +05:30
Jayant Krishnamurthy 02638fd865
Fix JS publish workflow again (#713) 2023-03-23 14:45:07 -05:00
Jayant Krishnamurthy 75a795dbf8
fix (#709) 2023-03-21 12:59:21 -07:00
Jayant Krishnamurthy e995a2b89e
Add CI workflow to publish javascript packages (#707)
* workflows

* try private

* private

* more private

* update files

* fix workflow

* hm

* hm

* bump version

* bump version

* another bump

* text

* update readme

* update package lock
2023-03-21 12:25:30 -07:00
Jayant Krishnamurthy 9fef120b1f
[sdk] Move Solidity sdk into this repo (#674)
* fix dependencies

* wtf

* remove redundant pre-commit

* some sort of lerna issue

* fix dockerfile
2023-03-20 12:25:28 -07:00
Dev Kalra 22c1fedd3d
[price-pusher] add workflow to push docker image (#667)
* add workflow

* update readme

* correct docker build
2023-03-08 01:26:52 +05:30
guibescos 4524bd4984
[xc-admin-frontend] fix github action (#657)
* Missing dollar sign

* Test push:

* Fix truncate

* Long hash

* Add checkout step

* Shortened hash

* Add spaces

* Get date from command

* Remove push on pull request
2023-03-03 14:22:07 -06:00
Daniel Chew 40bc1e67d0
[xc-admin] add Dockerfile for xc-admin-frontend (#656)
* add Dockerfile for xc-admin-frontend

* add newline

* add gh workflow to push xc-admin-frontend image

* Push on every commit to main

---------

Co-authored-by: Guillermo Bescos <gbescos@stanford.edu>
2023-03-03 13:23:45 -06:00
Thomaz Leite 7c728a5718
Update Tiltfile for CI (#623)
* Update Tiltfile for CI

* Remove build GHA workflow

* Update README
2023-02-24 22:03:22 +00:00
Jayant Krishnamurthy bbe10ba553
[sdk] Move JS sdks into this repo (#611)
* move files to subdir and js sdk here

* update pointer

* fix move

* delete lib

* fix this

* gitignore

* aptos sdk

* gitignore

* terra js

* gitignore

* move price pusher

* add lib to gitignore

* move examples

* fix workflow

* gr

* contracts

* hm

* fix

* gr

* grrr

* fix dockerfile

* wtf

* fix
2023-02-22 13:44:42 -08:00
Dev Kalra d95c9247a2
[cosmwasm] Release setup (#594)
* update comment

* add a workflow

* update contracts readme

* add readme to pyth-sdk-cw
2023-02-14 15:28:31 +05:30
guibescos 8d73d07bbd
Second try (#565) 2023-02-02 21:34:54 -06:00
guibescos ec070f37d6
Add workflow for xc-admin releases (#564) 2023-02-02 20:13:22 -06:00
Ali Behjati 481c61bc2c
[refactor] Improve typescript codebase (#553)
* Use base tsconfig

* Add lint check

* Fix tilt
2023-02-01 11:26:23 -06:00
guibescos 34347c8629
[price-service] Remove wasm from readme and workflow (#548)
* Remove wasm from readme and workflow

* Update CI and Readme with lerna

---------

Co-authored-by: Ali Behjati <bahjatia@gmail.com>
2023-02-01 10:18:27 -06:00
Ali Behjati 4c5d0d5e1b
[refactor] Add global lerna (#546)
* Move lerna to the top

* Set version to independent

Packages are versioned independently

* Update packages and the lock

* Add build cache and better reference

* Add lerna docker base

* Add wormhole_attester sdk and some minor impr

* Update tsconfig to fix outDir impact by composite

* Update eth package

* Update p2w to use solidity-sdk

* Change xc-admin CI to lerna CI action

* Add more packages to the list + bugfixes

* Update dockerfiles to have tilt working

* Format the code

* Fix some issues

* Fix the change of usePyth.ts

* lerna build fix

* Fix foundry
2023-01-31 17:09:31 +01:00
Ali Behjati 70fd0a6c15
[wormhole-attester] Move p2w-sdk inside wormhole_attester directory (#534)
* Move p2w-sdk to wormhole_attester

* Update references to the sdk
2023-01-25 18:14:02 +01:00
Ali Behjati b4cf527f00
[price-service] Add price service client and sdk to this repo (#525)
* Move price service to server directory

* Update references to price service

* Add pyth-common-js as the service client

* Update package names

* Add pyth-sdk-js

* Rename the sdk

* Change readme a bit
2023-01-25 17:17:32 +01:00
Ali Behjati 084acdb57e
[refactor] Convert hyphen to underscore in the directory tree (#524)
* Move price-service to price_service

* Update references to price-service

* Rename target-chains to target_chains

* Update references to target-chains

* Rename tilt-devnet to tilt_devnet

* Update references to tilt-devnet

* Rename wormhole-attester to wormhole_attester

* Update references to wormhole-attester

* Rename multisig-wh-message-builder

* Update references to wh-msg-bldr

* Fix dockerfile issue

* Rename remove-executor to remote_executor

* Update references to remote-executor

* Rename xc-governance-sdk-js

* Update references to the governance sdk

* Move docker-images to docker_images

* Update references to docker-images
2023-01-24 19:06:22 +01:00
Ali Behjati daad5c6dc5
[governance] move governance related components under this directory (#489)
* [governance] bring related stuff in governance dir

* [governance] fix changes
2023-01-13 18:58:44 +01:00
Ali Behjati 0e55d0808d
[price-service] Move to top (#474)
* Move price service to top

* Update the paths and docs

* A little cleanup
2023-01-13 16:26:43 +01:00
guibescos 097943f657
[xc-admin] Add encoder for governance messages (#462)
* Add encoder

* Cleanup

* Update test

* Ci

* CI

* Cleanup

* More cleanup
2023-01-09 15:54:54 -06:00
Stanisław Drozd 2a0350bb5f
attester-image-push: Fix container tag naming (#456) 2023-01-05 16:59:01 +01:00
Stanisław Drozd 01c4661985
Repo structure refactor (#449)
* Repo structure refactor

This change introduces major codebase layout changes in three areas:
* Tilt devnet lives in tilt-devnet/ - all k8s and docker files,
scripts, local testing private keys are moved to this directory.
* pyth2wormhole becomes pyth-wormhole-attester and is relocated to
wormhole-attester/ - This long-needed rename will hopefully eradicate
most of the confusing naming around the attester. The Rust client binary
becomes pyth-wormhole-attester-client.
* Target-chain code lives in target-chain/ - This leaves just the
attester, third_party and pythnet-specific things at top-level.

Other opportunistic changes:
* Fixed rebuild trigger for Dockerfile.wasm

These items are a fraction of the necessary structure changes in the repo.

* cosmwasm: fix contract after faulty merge

* .github: remove unused dependabot config

* Fix path references in .github and .pre-commit-config.yml

* .github: Rename attester references to pyth-wormhole-attester

* .pre-commit-config.yaml: fix paths and run all commit hooks

* p2w-relay: Fix faulty merge resolution in favor of origin/main

* Dockerfile.pyth_relay: Fix Ethereum path reference

* Dockerfile.solana: Trip early cache with arbitrary change

* Dockerfile.pyth_relay: typo

* p2w-relay: fix evm build in npm script

* Dockerfile.solana: Retry invalidating cache again

* near -> target-chains/near

* wormhole-attester: bump on/off-chain major versions due to rename

Attester packages were renamed. This possibly breaks most dependees.

* Dockerfile.solana: Improve decoy-crate to have a real lib target

* .github/[...]/pyth-cosmwasm-contract.yml: typo

* rust-toolchain: Bump rust to stable 1.63

* rust-toolchain: use christmas nightly

* empty commit to trigger build

* attester-image-push.yaml: keep xc-attest image name intact

* multisig-wh-message-builder: remove accidental revert
2023-01-04 14:46:42 +01:00
Ali Behjati 895f053e00
Update remove executor job name to test (#399)
It was named "precommit" before.
2022-11-25 18:02:24 +01:00
Ali Behjati becc216853
Abehjati/repo-improvement (#395)
* Use a new rustfmt file

* Run cosmwasm action only when needed

* Remove pre-commit from remote-executor action

* Fix formatting

* Run precommit for all files

As previous PR was merged without pre-commit
2022-11-25 11:16:58 +01:00
Ali Behjati c3fefc78fa
[eth] Add CI for Foundry tests (#394)
* [eth]: Add eth contract ci (foundry)

* Update the ci

* Fix ci

* Add paths
2022-11-24 17:32:40 +01:00
Ali Behjati d6e25d9209
Add pre-commit globally (#393)
* Add pre-commit globally

* Fix CI errors
2022-11-24 14:14:29 +01:00
Ali Behjati e4160b2f08
Run remote exec CI only if it's changed (#352)
* Run remote exec CI only if it's changed

To save more GH actions time + have faster CI checks (sometimes it takes longer than tilt!)

* Update remote-executor.yml
2022-10-18 11:33:34 -05:00
guibescos 40b031a223
Add executor tests to CI (#302)
* Add tests to CI

* Fix yaml format
2022-09-22 13:50:48 -05:00
guibescos c367812fe4
Format and lint executor (#287)
* Start anchor program

* pythnet folder

* Renames

* Implement processor

* Comments

* More comments

* Bump anchor

* Use new version of the wormhole package

* Get Solana chain id from wormhole core

* Pythnet bridge address

* Remove comment

* Fix borsh headers

* Format

* Fix precommit

* Fix precommit

* Precommit

* Add to CI

* Fix CI
2022-09-20 13:55:01 -05:00