Commit Graph

95 Commits

Author SHA1 Message Date
Stan Drozd 3bde2eed9a pyth2wormhole: add max_num_publishers to cross-chain metadata
commit-id:7550fa50
2022-04-05 15:55:51 +02:00
Stan Drozd 830b001a78 pyth2wormhole: Add num_publishers to libraries and contracts
commit-id:f7263eed
2022-04-05 15:27:18 +02:00
Tom Pointon d8b927d6ce Remove unused Pyth Chain ID metadata 2022-03-24 17:33:43 +00:00
Tom Pointon bd88ce308d Update comment on time check 2022-03-24 15:52:44 +00:00
Tom Pointon 7bbbf56fdd Rename attestPriceBatch to updatePriceBatchFromVm 2022-03-24 15:43:16 +00:00
Tom Pointon 9abeaa875b Rename PythProxy to PythUpgradable 2022-03-24 12:03:03 +00:00
Tom Pointon 562cf73efe Replace PythGetters.latestPriceInfo with Pyth.queryPriceFeed in public API 2022-03-23 16:19:25 +00:00
Tom Pointon e3f1a85dbb Rename Price to PriceFeed to be consistent with SDK 2022-03-23 16:19:25 +00:00
Tom Pointon 04c43dedd5 Fix struct field names 2022-03-23 16:19:25 +00:00
Tom Pointon 02fcec996a Make Pyth.verifyPythVM function internal 2022-03-23 16:19:25 +00:00
Tom Pointon 4a6ff5d2f3 Inline PythStorage.Provider struct 2022-03-23 16:19:25 +00:00
Tom Pointon 7623e73d6a Add tests for new proxy setup 2022-03-23 16:19:25 +00:00
Tom Pointon 829727c4b4 Add upgradable PythProxy contract 2022-03-23 16:19:25 +00:00
Tom Pointon d92208a33d Add initializer to Pyth contract 2022-03-23 16:19:25 +00:00
Tom Pointon df907fd10f Remove old mock bridge implementation 2022-03-22 17:55:35 +00:00
Tom Pointon 3f329435ef Remove now unnused initialized implementations map 2022-03-22 17:42:39 +00:00
Tom Pointon 908674ab42 Remove old PythProxy inheritance hierarchy 2022-03-22 17:42:39 +00:00
Tom Pointon d5d4778a17 Remove Pyth Implementation implementation 2022-03-21 21:49:25 +00:00
Tom Pointon d3a173a3c6 Remove now unused legacy governance state and variables 2022-03-21 21:49:25 +00:00
Tom Pointon 25af2a90a8 Remove wormhole-based governance 2022-03-21 21:49:25 +00:00
Tom Pointon 4861c1822b Remove now unnused parsePriceAttestation function 2022-03-16 17:12:11 +00:00
Tom Pointon bb0455655a Cache price updates from batch attestations 2022-03-16 10:52:06 +00:00
Tom Pointon 5a73356bb0 Cache price updates in standardised PriceInfo format 2022-03-16 10:52:06 +00:00
Tom Pointon 9e3b944bc1 Define internal PythStructs.PriceInfo struct 2022-03-16 10:52:06 +00:00
Tom Pointon d9a9a85292 Define Pyth SDK Price struct 2022-03-16 10:52:06 +00:00
Tom Pointon 48279a2bc8 Add ability to parse batch price attestations 2022-03-15 10:41:50 +00:00
Tom Pointon 261c2d796c Bring PythStructs.PriceAttestation struct in line with new API 2022-03-15 10:28:22 +00:00
Stanisław Drozd 2ea41b8176
[WIP] Pr/drozdziak1/p2w batching/5e704f8b (#877)
* ethereum: p2w contract -> p2w emitter, fill in essential envs

Change-Id: I6fa9364a96738d2cc02ec829a31fedba0586d8e8

commit-id:0a56f1f8

* Add p2w-relay, a p2w-sdk integration test

commit-id:6bfab639

* p2w-sdk: Expand README

Change-Id: I17cb547d6aaddc240588923561c26d11a787df2e

commit-id:6ebd6a22

* p2w-sdk: don't build ETH contracts, only the types

Change-Id: I7cbd18328227700635d7688aa24a9671e8919fcd

commit-id:adf079f7

* p2w: configurability and sane envs

commit-id:f10fd90e

* Solitaire: Implement Option<T> support in structs

commit-id:31aa12d6

* bridge/governance.rs: Stop pestering about EMITTER_ADDRESS

commit-id:d5bd7234

* p2w-attest: price batching

This commit introduces support for multiple Pyth product/price pairs
per call. The initial maximum batch size is 5 and is enforced using a
`P2W_MAX_BATCH_SIZE` constant.

solana/pyth2wormhole/program:
* On-chain batching logic
* Batch message parsing logic

solana/pyth2wormhole/client:
* Off-chain batching logic - divides any number of symbols into
largest possible batches
* Use a multi-symbol config file instead of CLI arguments

third_party/pyth/p2w-sdk:
* Expose batch parsing logic

third_party/pyth/p2w-relay:
* Comment out target chain calls until ETH contract supports batching
* Test the batch parsing function

third_party/pyth/p2w_autoattest.py:
* Generate and use the symbol config file  with pyth2wormhole-client

third_party/pyth/pyth_publisher.py:
* Add a configurable number of mock Pyth symbols
* Adjust HTTP endpoint for multiple symbols

commit-id:73787a61

* p2w-attest: mention attestation size in batch

This commit ensures that no matter the attestation format, a batch
will never contain attestations of different sizes. This guarantee
enables forward compatibility by adding new constant-size fields at
the end of a batch at all times. An older implementation will simply
not consume the remaining newer values while respecting the stated
batch member alignment.

commit-id:210da230

* pyth2wormhole-client: use fresh blockhashes, harden batch errors

This commit makes sure we don't have to deal with expired transactions
due to stale blockhashes. The problem existed with larger symbol
configs as well as on Solana mainnet. Additionally, the attestation logic
now treats transaction errors as non-critical - a failure for a batch
does not prevent attestation attempts for batches farther in the queue

commit-id:5e704f8b
2022-02-23 19:12:16 +01:00
Evan Gray 608c724a76 evm/token_bridge: reentrancy protection 2022-01-28 10:44:10 +00:00
Evan Gray 7ecce0d302 eth: nft bridge impl initialize 2022-01-07 13:28:11 -05:00
Csongor Kiss 7e212fa739
terra/nft_bridge: Implement nft-bridge for terra (#698)
commit-id:0b547fa5
2022-01-07 16:47:33 +01:00
Hendrik Hofstadt e50541912b
Fix NFT URI length and parsing (#628)
* Fix NFT bridge parsing and limit URI length

Change-Id: I71e728bbe35cfb8f10b86d53475f7e1c68b2866a

* Update NFTBridge.sol

* Update NFTBridge.sol
2021-12-21 08:36:00 -05:00
valentin 1226f85461 support tokens with transfer fees
Change-Id: Ib6ef2f1680ac845ef0f05c51047846c2633b0d4b
2021-10-29 16:55:05 +00:00
valentin ffcdc3f3f2 add token migration contract
Change-Id: I2bc3fb4d99f5a08452bc2defd3597ec7ad300523
2021-09-28 10:35:34 +00:00
valentin 46440b3bf9 nft: add special case for spl naming, update tests
Change-Id: Ifbe9eeaad5d5604d52d75fdac6b018e94afa9d75
2021-09-20 15:16:57 +00:00
valentin 7e2cf1f981 pyth data bridge target chain module for EVM
Change-Id: Ieaeed6374e72a5348e05c40bd25598b74061a9a0
2021-09-16 13:46:51 +00:00
valentin 75ac0c9153 nft nits
Change-Id: Ie6265e1fcc8d91294dc416ad6bac18327f582c1e
2021-09-13 12:10:36 +02:00
Hendrik Hofstadt 6ff21f8d01 add ethereum NFT bridge
Change-Id: I5cc8cfe431f5f9b043adc7baf662760ffe9e7a35
2021-09-10 23:43:14 +00:00
Hendrik Hofstadt e6a51d0180 don't allow the chain to be registered multiple times
Change-Id: Ic757b4ea1316718ad492ca5bc446eaf60ebdf200
2021-09-01 13:54:21 +02:00
Hendrik Hofstadt 745ff0ba9b Allow to update meta on ETH, new token naming
This allows us to update the token name and symbol once solana adds the appropriate metadata.

Change-Id: Ibcabf2a644bcc2b2962ff779fa7fb3cb1f2cc626
2021-09-01 13:15:28 +02:00
Hendrik Hofstadt 50afa0fe9e Prefix wormhole token names
Change-Id: Ieea61ea2833f66c29a2fa0f52ae1a914a3956146
2021-08-26 14:19:19 +00:00
valentin 245409852f bridge: mint directly to recipient
Change-Id: Idfa06609c5b9982c885eaa14b402965514b2e143
2021-08-19 10:19:48 +00:00
valentin 45d22ce84f bridge: move evm state setup into a separate contract
Change-Id: Ibc790ba971be5144c0af65870d424c9c62b52039
2021-08-19 10:19:40 +00:00
valentin a055af1416 move EVM state setup into a seperate contract
Change-Id: Ie000dd042c4ebbd7084511d38d87a7555c5d8048
2021-08-19 10:19:26 +00:00
valentin 51e00dc1bf tokenbridge: decimal shifting & max outstanding
Change-Id: Ia9f27f317fe08c1d8dbb9eaa60e53633acfdd381
2021-07-27 11:43:44 +00:00
valentin 14e892300c tokenbridge: implement new governance packet spec
Change-Id: Iee4b596b6a8ca9dfc9c6ee8c6188a4083a05edeb
2021-07-27 08:59:32 +00:00
valentin 2e6a93b643 ethereum token bridge on wormhole
Change-Id: Iab8d6f6aae6163d1c65f7d5a7395a943c62cdb0c
2021-07-21 14:11:58 +00:00
valentin 05d6c41722 update wormhole interface
Change-Id: I821234d1d010d9efd15cefb412a35b8717c36fa7
2021-07-20 16:25:38 +02:00
valentin 30a50938d7 remove persistency, return sequence, update tests
Change-Id: Ibdaa3f6443dcabe3a838bc25888bb9676b7e1d2d
2021-07-20 16:07:11 +02:00
Hendrik Hofstadt 227445cd76 Fix tests and add double hashing
Change-Id: I9676e8dd8d25f44c43ef10462493f20d1caff724
2021-07-20 13:43:21 +00:00