pyth-crosschain/.github/workflows/ci-sui-contract.yml

31 lines
644 B
YAML
Raw Normal View History

[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 08:09:50 -07:00
on:
pull_request:
paths:
- target_chains/sui/contracts/**
push:
branches:
- main
paths:
- target_chains/sui/contracts/**
name: Sui Contracts
jobs:
sui-tests:
name: Sui tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: target_chains/sui/contracts/
steps:
- uses: actions/checkout@v3
- name: Update rust
run: rustup update stable
- name: Install Sui CLI
run: cargo install --locked --git https://github.com/MystenLabs/sui.git --rev 09b2081498366df936abae26eea4b2d5cafb2788 sui
- name: Run tests
run: sui move test