Commit Graph

188 Commits

Author SHA1 Message Date
Tom Pointon 8f8eee7c92
Make Pyth contract abstract (#234) 2022-07-13 11:02:37 +01:00
Tom Pointon b062cd51fa
Remove unnecessary payable marker from wormhole address (#235) 2022-07-13 11:02:22 +01:00
Ali Behjati c69d372ea5
Update Deploying.md (#231) 2022-07-07 18:37:31 +02:00
Stanisław Drozd da1f19bf0b
ethereum: Add support for multiple emitter/chain ID pairs (#228)
* ethereum: Add support for multiple emitter/chain ID pairs

* ethereum: Simplify data source methods, add tests, fix flag bug

* ethereum: Fix incorrect removeDataSource condition, harden its test

* ethereum: Add the multi-source migration to prod-receiver

* PythState.sol: rephrase comment about new data source API

* ethereum/test/pyth.js: run prettier formatting

* ethereum: replace multi-source migration with addDataSource call

* ethereum: mark older chain/emitter ID state as deprecated
2022-06-29 15:10:53 +02:00
Ali Behjati 21dfc32e43
Abehjati/pyth-evm-contract-fire-event (#229)
* Use new solidity sdk

* Emit events in contract

* Fix max gas issue that caused error

* Add tests for PriceUpdate event

* Delete a test network file
2022-06-27 17:41:55 +02:00
Ali Behjati a0d47178bf
Add aurora_testnet deploy data (#223)
* Add aurora_testnet deploy data

* Add wasm as dependency to tilt

As Stan figured out in another PR
2022-06-20 10:22:25 +02:00
Ali Behjati b5555b80f7
Deploy Pyth to testnet networks (#218)
* Deploy Pyth to testnet networks

Deploys to:
- Goerli and Ropsten (eth testnet)
- Fuji (Avalanche testnet)
- Fantom Testnet
- Mumbai (Polygon testnet)
- BNB Testnet

* Update deploying doc for testing

* Improve docs

* Add manual verification process
2022-05-24 13:28:02 +02:00
Ali Behjati 2c1e987b31
Add networks configs (#217)
* Add networks configs

Wormhole addresses are available here:
https://github.com/certusone/wormhole/blob/dev.v2/sdk/js/src/utils/consts.ts

* Fix typo

* Fix a bug in ropsten env
2022-05-20 15:16:24 +02:00
Ali Behjati 09fcb158dd
Add wormhole receiver + docs on how to use it (#216)
* Add wormhole receiver + docs on how to use it

* Fix a mistake in comment

* Update docs + add wormhole receiver address to the registry
2022-05-20 13:12:50 +02:00
Ali Behjati b2becab951
Abehjati/cleanup again (#215)
* Remove unneeded and unused stuff

* removes guardian + use fixed version release of it

* Remove more stuff
2022-05-20 12:43:31 +02:00
Ali Behjati a1507952f6
Cleanup Ethereum from unused stuff (#214)
Also moves wormhole stuff to a separate directory
2022-05-18 15:12:26 +02:00
Ali Behjati 4dc863abc9
Update contract (#213) 2022-05-18 12:53:20 +02:00
Ali Behjati 75e354f0f6
Update deployment doc (#212) 2022-05-18 10:40:48 +02:00
Ali Behjati ce56351c3e
Abehjati/pyth-evm-update-method (#209)
* Add updatePriceFeeds to eth contract

* update gitignore

* Update typos

* Use calldata instead of memory for gas efficiency
2022-05-16 13:44:43 +02:00
Tom Pointon 4f4bec508e
EVM deployment scripts and documentation (#141)
* Make Migrations contract Ownable

* Add prod deployment migrations

* Add BSC Testnet deployment configuration

* Add documentation for deploying contracts to production

* Fix test environment script for deployment to development network

* Fix tilt issues + refactor

Co-authored-by: Ali Behjati <bahjatia@gmail.com>
2022-05-13 10:25:35 +02:00
Stanisław Drozd 7b9d5b1c22
ethereum/: use publishTime instead of attestationTime for queries (#196)
commit-id:b3c87e4e
2022-05-04 21:29:35 +02:00
Stanisław Drozd a4c749b99c
pyth2wormhole: implement wire format v3rev0 (#189)
* pyth2wormhole: implement wire format v3rev0

commit-id:c106d3b3

* pyth.js: Run prettier formatting

commit-id:fc9fb160

* ethereum: Fix tab indentation in Pyth contracts

commit-id:3d2ab7d8

* p2w-terra contract: fix formatting

commit-id:685dd14f

* p2w-sdk: Use wasm in the JS package, detect bundler/node via `window`

This commit makes sure that our wasm usage is more robust. We ensure
that the JSON representation renders all important numbers in their
string decimal form. b

commit-id:75f9c224

* p2w-sdk: review suggestions: field ranems, limit serde attributes

commit-id:9f596b80

* p2w-sdk/rust: Remove utils.rs and the helper type

commit-id:e72c6345
2022-04-25 18:32:25 +02:00
Stanisław Drozd b41708e863
pyth2wormhole: Add compatible metadata, handle EVM fwd-compat (#165)
* pyth2wormhole: Add compatible metadata, handle EVM fwd-compat

commit-id:d92b42b5

* EVM unit tests: test the non-breaking format change fields

commit-id:3a26e554
2022-04-15 21:09:20 +02:00
Stanisław Drozd ded0fb37bd
evm unit tests in tilt (#186)
* Enable and fix Rust unit tests in Tilt for p2w-sdk and p2w-attest

commit-id:cae6ee05

* p2w-sdk/rust/src/lib.rs: comment about hex payload generation

commit-id:f9f3a249

* p2w-sdk/rust/src/lib.rs: Comment about hex payload generation

commit-id:352e74f9

* Fix and enable EVM unit tests in Tilt

commit-id:11bcb841

* EVM p2w tests: ensure true negatives in "should cache price updates"

commit-id:3aaa0527

* pyth.js: typo

commit-id:f76c5465

* EVM: Remove unrelated setup scripts, build contracts in Dockerfile

commit-id:b09c1d83

* ethereum/dockerfile: Remove node_modules caching

commit-id:c66c79c1

* EVM: revert dockerfile

commit-id:2b9e0b7a

* trigger build

commit-id:c7689ec4

* EVM: change stale timestamp test to the exact edge case

commit-id:d2709f47
2022-04-15 13:39:02 +02:00
Tom Pointon 3dbc0f3304
Use pyth-sdk-solidity in EVM contracts (#182)
* Add pyth-sdk-solidity as dependency

* Remove obselete PythSDK contract

* Use PythStructs from pyth-sdk-solidity package

* Make Pyth contract inherit from AbstractPyth

* Update tests to reflect changes
2022-04-12 11:59:43 +01:00
Ali Behjati 352fa64653
Merge Dev.v2 into main (#181)
* Move js sdk on p2w-sdk to js folder

Also modifies other dependencies to correct path

* Reversed removal of wasm build for nodejs

* Add newline to a file

* pyth2wormhole: Fix attestation validation bug

commit-id:567942d7

* Add p2w sdk

It uses Pyth clients structs and cleans some of definitions for Pyth2Wormhole structures.

* Add emitter type and add wasm function for it

- It requires solitaire and it requires nightly rust
- No logic is applied, code is from p2w solana contract. (Eventually will be removed from there)

* Add new line

* Move WASM gen docker to root

It is because wasm is going to be used for p2w-sdk too.

* Fix unchanged cache mount paths

* Move terra relayer into the repo

* Update readme

* p2w-client: Add lib target, make helpers into lib functions there

commit-id:3aeb9ee6

* pyth2wormhole-client: Implement retries

commit-id:462677a2

* Make p2w-sdk js use p2w-sdk rust wasm bindings (#65)

* Make p2w-sdk js use p2w-sdk rust wasm bindings (instead of solana contract bindings)
- Removes `wasm.rs` in solana contract too.

* p2w attester contract use p2w-sdk (#68)

* Make solana pyth2wormhole contract to use the sdk

* Use threadpool to set up price symbols (#69)

* Add solana feature flag for p2w sdk (#71)

* Pyth bridge terra contract support batch attestation + use p2w sdk (#72)

* Make terra contract to use pyth2wormhole-sdk and support batch attestation

* Update packages + code format

* Move terra dockerfile out to support third-party dependency

* pyth2wormhole-client: Add polling-based concurrent tx confirmation

commit-id:5d16d035

* chore: p2w spy guarding improve Dockerfile

* fix: p2w_autoattest don't die after initialization

also minimal formatting

* add P2W_EXIT_ON_ERROR

* set P2W_EXIT_ON_ERROR default to True

* Remove bool test

* hopefully this time.

* add tilt p2w-attest P2W_EXIT_ON_ERROR

* convert P2W_EXIT_ON_ERROR to "true"

* Fix pyth test publisher (#76)

* Fix test pyth publisher to actually publish price

- Uses newer pyth images and removes existing hacks for old versions. It essentially makes dockers cleaner.
- Also improve some adds in dockers to cache more efficiently

* Support Batch Price attestation for terra relay (#75)

* Support Batch Price attestation for terra relay

* Abehjati/update p2w sdk to pyth sdk (#83)

* Make p2w-sdk use pyth-sdk

* Correct test values to reflect .env.test

* update p2w sdk to use ema instead of twa (#84)

* Rename twa to ema in terra relay (#85)

* Bring PythStructs.PriceAttestation struct in line with new API

* Add ability to parse batch price attestations

* Pyth terra remove wormhole governance (#87)

* Pyth in terra: remove wormhole governance

* [WIP] p2w-relay-iface: Add NPM package with relayer interface PoC

commit-id:efcb9b34

* Define Pyth SDK Price struct

* Define internal PythStructs.PriceInfo struct

* Cache price updates in standardised PriceInfo format

* Cache price updates from batch attestations

* p2w-relay-iface -> p2w-relay-terra/src/relay/iface.ts

commit-id:ed9846e3

* p2w relay interface: remove config from Relay iface

commit-id:0359d886

* Remove now unnused parsePriceAttestation function

* Pyth terra bridge: add contract deployment script (#88)

* Add pyth deployment script

- Also updates build.sh to build pyth completely
- Add a readme for deployment guide

* Add test for partial update behaviour

* update p2w sdk to new pyth (#91)

* p2w-sdk/rust use pyth sdk solana v2

* Dockerfile.client: solana 1.8.1 -> 1.9.4

commit-id:643299d3

* p2w-terra-relay: ignore lib and node, own project dir in docker

commit-id:b084bc40

* p2w-terra-relay: iface.ts review nits, naive impl for Terra

commit-id:0ecbfdd6

* Terra contract public api (#79)

* Use pyth-sdk in terra contract
* Update terra contract according to agreed API
- Also adds v2 suffix to price_info key because this migration is breaking.

* p2w-terra-relay: apply review nits

commit-id:aec39c85

* p2w-terra-relay: make worker.ts generic w.r.t. Relay interface

commit-id:5937a08c

* terra.ts: add missing return statement

commit-id:ba0365e6

* Update worket to handle timeout in callback correctly (#97)

* Remove wormhole-based governance

* Remove now unused legacy governance state and variables

* Remove Pyth Implementation implementation

* p2w-terra-relay: run formatter

commit-id:df311e23

* p2w-terra-relay: apply review nits

commit-id:5034b061

* Run formatter to trigger CI

commit-id:7c643d79

* p2w-terra-relay: EVM boilerplate

commit-id:8ad73ded

* Remove old PythProxy inheritance hierarchy

* Remove now unnused initialized implementations map

* Remove old mock bridge implementation

* Remove dependency to wormhole sdk as path and cleanup wrong eth copies (#104)

* Dockerfile.pyth_relay: Fix lockfile issue in ethereum

This commit fixes a lockfile issue resulting from newer NPM in our
container.

Specifically, our Dockerfile is pinned, relaxes Ethereum's
lockfile (npm ci -> npm install) and hardens our lockfile (npm install
-> npm ci)

commit-id:3381c8ec

* p2w-terra-relay: Admit loss against mkdir -p

commit-id:3abdb58d

* Remove unused components from wormhole (#108)

* Remove unused components from wormhole

Removes the following:
- explorer
- e2e
- bridge_ui
- algorand stuff (teal dockerfile and third_party/algorand)
- ci_tests (testing directory)  which are for JS/Bridge UI

* Remove unused terra contracts (#109)

- Note: Terra contract addresses are changed by this PR due to deterministic ordering.
- Removed unused nft and token bridge, and migration contracts in Terra
- Modified documentation to remove info regarding removed contracts.(docs/devnet.md)

* Remove unused solana contracts and their wasm creations (#110)

Removes token bridge, nft bridge, migration. Also removes them from deployments and docs.

* Add fee estimate for terra relay (#112)

* Removes directores which are not related to p2w (#111)

Removes
- audits
- dashboards (dashboard is removed from Tilt)
- event_database (all of it's dependencies are removed from Tilt and it's not for p2w)
- lp_ui: a project (pressumably liquidity pool) not related to p2w
- sdk: wormhole sdk, p2w depends on it's npm package and there is no dependency to rust one
- spydk: it's not anywhere in p2w
- staging/algorand: these are for alrogrand which is not used in p2w
- whitepapers: these are for wormhole

* Add and update openzeppelin packages

* Add initializer to Pyth contract

* Add upgradable PythProxy contract

* Update tests to work with new proxy setup

* Update migrate script to work with new proxy setup

* Add tests for new proxy setup

* Inline PythStorage.Provider struct

* Make Pyth.verifyPythVM function internal

* Fix struct field names

* Rename Price to PriceFeed to be consistent with SDK

* Replace PythGetters.latestPriceInfo with Pyth.queryPriceFeed in public API

* p2w-terra-relay: Add a query() EVM call and Tilt boilerplate

commit-id:f97d0c16

* Clarify test comments

* Add health probe (#107)

* Rename PythProxy to PythUpgradable

* p2w-evm-relay: Backport the proxy address change from debug session

commit-id:55b63ed5

* p2w-terra-relay -> p2w-relay, split EVM relay into new service

commit-id:36d0db6e

* Tiltfile: typo

commit-id:3bbba986

* p2w-evm-relay.yaml: typo

commit-id:35c87c79

* p2w-evm-relay.yaml: typo 2: electric boogaloo

commit-id:40892265

* Add build folder to dockerignore

* Rename attestPriceBatch to updatePriceBatchFromVm

* Update comment on time check

* Trigger Build

* Tiltfile: Fix port forwards for p2w-evm-relay

commit-id:6e5e9c14

* p2w-relay: PythImplementation -> PythUpgradable

commit-id:bfea7eb5

* Remove unused Pyth Chain ID metadata

* Add the query() call

commit-id:02966ce5

* p2w-terra-relay: Fix evm.ts after contract rename

commit-id:87381bec

* Make truffle migrations directory configurable

* p2w-evm-relay: Fix wrong EVM contract ID, add a check for it

This commit takes care of an outdated pyth2wormhole EVM contract
address and implements a contract/non-contract check using
web3.eth.getCode() (empty for non-contracts).

This problem cost us several hours of debugging and resulted from an
EVM gotcha - a contract call to a non-contract address will simply
ignore the call payload and make a plain transfer. Additionally, ETH
accounts don't have a notion of initialization - used and unused
addresses are equally valid tx recipients. Resulting from both
properties, any unused address could potentially yield wrongly
successful calls, wasting funds and debug time over p2w-relay. Thus
the heuristic to protect us from this is to see if the address' code
storage is populated.

commit-id:b655a720

* p2w-relay: Also implement the contract check in EVM relay()

commit-id:e28709e5

* evm.ts: Fix wording in changed/unchanged logs

commit-id:13c81625

* Make terra relayer more resillient (#120)

- Increase retry attempts (4 to 6) and retry_delay (250ms to 1s) to be more resillient
  - This is because when account sequence mismatch happens it might take some time be fixed
- Removed estimate fee because it's being done in wallet.createAndSignTx (less requests)
- Improved logging on when error happens

* Update dockerfile to chown less files (#121)

* Update dockerfile to chown sooner

* p2w-relay: review nits

* p2w-evm-relay: make feed verification queries configurable

* p2w-relay: cache wormhole import

* p2w-relay: formatter, remove getcode() from relay(), add comments

commit-id:1a65c52c

* p2w-relay: typos and leftovers

commit-id:9b523b25

* Change websocket to json socket to support bsc testnet + improves env vars (#139)

* Change websocket to json socket to support bsc testnet + imporving env vars

* Add unit test to Pyth Terra Contract (#123)

* Add unit test to the terra contract

- Refactors the code into multiple functions to make unit testing easier
- Adds build and test of terra contract to CI according to #73

* p2w-relay: harden exception handling, yell about uncaught stuff

commit-id:24e14835

* p2w-relay: Correct outdated comment

commit-id:d0b57d33

* p2w-evm-relay: s/async (e)/(e)/

commit-id:11b3a474

* Modify proto docker and tiltfile to stop creating unnecessary files (#144)

* Remove sdk/spydk from wasm and remove buf gen web yaml (#145)

* Remove wormhole contract from wasm generation (#160)

* pyth2wormhole: Add num_publishers to libraries and contracts

commit-id:f7263eed

* pyth2wormhole: add max_num_publishers to cross-chain metadata

commit-id:7550fa50

* Move p2w relayer parsing to p2w sdk js (#162)

* Move Price Attestation parsing logic to the sdk

* pyth2wormhole: Add contract testing boilerplate for attest()

commit-id:51949fbe

* Create p2w-api base (from p2w-relay) (#142)

* Create p2w-api base (from p2w-relay)

* Refactor project structure

* Rename p2w to pyth price service (#166)

* Abehjati/price-service-add-rest-layer (#167)

* Add rest api for latest vaa

Co-authored-by: Stan Drozd <stan@nexantic.com>
Co-authored-by: Eran Davidovich <edavidovich@jumptrading.com>
Co-authored-by: Eran Davidovich <erancx@users.noreply.github.com>
Co-authored-by: Tom Pointon <tom@teepeestudios.net>
Co-authored-by: Stan Drozd <drozdziak1@gmail.com>
2022-04-11 18:15:20 +02:00
bruce-riley 60363dd3d1
Fantom deploy (#920)
* Truffle changes

* Always require fantomRPC
2022-02-28 16:32:22 -05:00
Evan Gray 02848a6560
eth: add nft bridge to 1conf (#906)
* eth: add nft bridge to 1conf
2022-02-24 14:57:06 -06: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
Csongor Kiss 3a24a26a7d eth deploy updates 2022-02-10 15:37:19 -05:00
Csongor Kiss 3484921b70 ethereum: Add fantom testnet & aurora testnet to truffle-config 2022-02-09 16:07:57 -05:00
Csongor Kiss 60d313b23c
ethereum: Add contract verification instructions (#792) 2022-01-28 14:52:54 +01:00
Evan Gray 608c724a76 evm/token_bridge: reentrancy protection 2022-01-28 10:44:10 +00:00
Evan Gray 7a9a5e6487 testing: weth-switch 2022-01-24 12:40:43 -05: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
Leo b0ed42681d Use stable Buildkit syntax
We no longer need to be on an experimental branch - all the
Dockerfile features we need were released on 1.3.

commit-id:b083856a
2021-12-13 15:38:17 +01:00
valentin 1226f85461 support tokens with transfer fees
Change-Id: Ib6ef2f1680ac845ef0f05c51047846c2633b0d4b
2021-10-29 16:55:05 +00:00
Hendrik Hofstadt 18f3262b89 Add second eth devnet to emulate bsc
Change-Id: Ia28078cdd843540bc6d5d2a3db4787637c752245
2021-09-30 15:00:27 +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
Chase Moran b39d72e32f bridge_ui: weth functionality
Change-Id: I1c6dc5f502232c32f4219a9a3be61f203c7be22a
2021-09-19 22:43:52 -04: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
Evan Gray 9ea0369ab0 nft_bridge fixes
Change-Id: I9420863384e752725cfc75c8b5a21f64be2792b1
2021-09-10 20:32:46 -04:00
Evan Gray 7711abf29a bridge_ui: initial NFT bridge support
Change-Id: Iafb0d4f53541cc11c9d42bd432541383274cd2fc
2021-09-11 00:13:29 +00:00
Hendrik Hofstadt 6ff21f8d01 add ethereum NFT bridge
Change-Id: I5cc8cfe431f5f9b043adc7baf662760ffe9e7a35
2021-09-10 23:43:14 +00:00
Hendrik Hofstadt b0c95b85a6 update ethereum tests
This accounts for the token name suffix and tests updating of wrapped asset meta

Change-Id: I752cd43e899df949d31e8f8ef7d706ead41f4502
2021-09-01 14:13:18 +02: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
Reisen a69d76494c devnet: add terra chain registrations
Change-Id: Icc45674147b42d462e6e4b89c8cd43f9d1ddb49e
2021-08-30 11:11:38 +00:00
Hendrik Hofstadt 6e3e43d35b Deploy plain ERC20 as test token
Previously we were using a Wormhole Wrapped asset which could cause confusions

Change-Id: Id3d52c30dad839ab97caed6ea892555f7a9f12a3
2021-08-26 14:19:19 +00:00
Hendrik Hofstadt 50afa0fe9e Prefix wormhole token names
Change-Id: Ieea61ea2833f66c29a2fa0f52ae1a914a3956146
2021-08-26 14:19:19 +00:00
valentin cea46cdfbe add mainnnet deployment config
Change-Id: I70314f8ab49f5d129012b80cecdf19fe6cb9dc1a
2021-08-19 22:31:28 +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
Evan Gray f53d180753 scripts: try catch truffle execs
Change-Id: Id9b27812cd393056ef373d8ec2569ba75f0caea8
2021-08-11 12:49:30 +02:00
Hendrik Hofstadt eb457f9e1e Fix eth chain registration script
Change-Id: Ibda50760847c5f6c31814f2e6dfa22cdf38a6f5e
2021-08-09 17:11:11 +00:00
Hendrik Hofstadt 597aae7cd7 Automatically register eth and solana token bridges
Change-Id: I35efef8d53f999f85ca2e8c4f58cc6cbf8193b2d
2021-08-06 15:21:27 +00:00
Hendrik Hofstadt bedc96d887 Add token bridge client for eth and solana
Change-Id: I0f9af0ffc606aed58579f167fadf80d1964360c8
2021-08-06 15:21:27 +00:00
valentin 24672a7b2f add BSC to truffle config
Change-Id: I0298ef39373dc4a7446345fe2a60de81930cd5eb
2021-07-30 17:54:03 +00:00
Hendrik Hofstadt 047e9deabb Deploy test token to devnet
Change-Id: Id5494802cedcb6eb41c04d366e84f051f42c225e
2021-07-28 08:52:41 +00:00
valentin 62ab6e84a8 test token deployment script
Change-Id: I404855872bd14f523ac9499b1a3a16253210ded0
2021-07-27 16:06:47 +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
Hendrik Hofstadt c0228415f8 Fix devnet
Change-Id: I1d62e6323cc2169cce43581f9aeefb537bc84a76
2021-07-20 23:34:37 +02:00
valentin 58fd2bcbcb clean up deployment & add etherscan verification
Change-Id: Idd37f92c5ca61710bece77a473fad35af44ac8f9
2021-07-20 20:54:27 +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
Hendrik Hofstadt af4e29978d Add commitment level to VAAs
This allows requesting attestations for various commitment/confirmation levels. This is helpful for low-latency applications like Pyth.

Change-Id: Ib49ace163365106b227613d2f66b787b3e5f5461
2021-07-19 07:11:45 +00:00
Hendrik Hofstadt 3c5deee7ee Fix devnet for new contracts
Change-Id: I5b7536884ce3d1bdf39a21a8b71b6a848ad0380f
2021-07-02 13:02:35 +02:00
Hendrik Hofstadt f665fe4c7b Fix signature schema and use a single initial guardian in ETH
Change-Id: Ia1995df4ed8f86443cdd62acee7914ffc745d407
2021-07-02 10:48:54 +00:00
Hendrik Hofstadt e7ebf8dc1d Correctly verify sequence in ETH tests
Change-Id: Ic9a9fa5355362326a47d9d3742107ccaac6794d5
2021-06-30 13:13:31 +02:00
valentin 2be6f90314 remove payload length from vm
Change-Id: I89ae8530de8f43a2d2a1813d1d050413338b45d0
2021-06-28 13:45:45 +02:00
valentin 7032d6fba9 add sequence to vm
Change-Id: I0ec81979153c940a8d557ffdd67dec723c09f22c
2021-06-28 11:25:26 +00:00
valentin c3fa835196 ethereum generalized messaging & governance
Change-Id: I412111a10749050ca095458f2fcfe81ce0fe189c
2021-05-27 16:01:49 +02:00
Hendrik Hofstadt c405ec9f98 Ethereum refactor
This splits the Ethereum contract into a generic Wormhole and a
purpose-specific token transfer module that uses the main contract
for verification.

This acts as a draft for this structure.

Change-Id: I59e133dd7558d5e046045e464e4740241c696d5f
2021-04-20 09:51:07 +00:00
Stanisław Drozd c5d90f779c
Use /usr/bin/env for shell scripts; web/.dockerignore: node_modules (#159)
* Use /usr/bin/env for shell scripts; web/.dockerignore: node_modules
2021-01-23 18:20:17 +01:00
Leo 9f2f609bc1 Bump Go and pin all Docker images to digests 2021-01-19 16:15:54 +01:00
Hendrik Hofstadt f4a7e705c9
Refactor VAA parsing into public view method (#153)
* refactor VAA parsing into public view method
2021-01-18 20:14:00 +01:00
Hendrik Hofstadt 6321ca2a49
Add more metadata to erc20 token name (#152)
* add more metadata to ERC20 name
2021-01-11 14:59:36 +01:00
Leo c31777d1b3 e2e: add bidirectional end-to-end tests 2020-11-29 17:07:15 +01:00
Leo de8d1dee31 devnet: pin Dockerfile syntax to digest
This speeds up the build by ~1.5s by avoiding a remote lookup on
Docker Hub every time this is built (WTF).
2020-11-29 17:07:15 +01:00
Leo 114524a096 ethereum: update packages and use package-lock.json
Ran `npm update`. This resolves a ganache crash.

We can't really use `npm ci` because it's intentionally incompatible
with our incremental development workflow. We'll want to use it for
production builds, though.

ghstack-source-id: c66c5d464796e61c6781b339d6d74ebba9704144
Pull Request resolved: https://github.com/certusone/wormhole/pull/89
2020-11-19 12:57:21 +01:00
Leo da768a09c4 ethereum: mine ganache blocks in the background
Fixes #75.
2020-11-18 13:56:56 +01:00
Leo 53c994b1ac ethereum: a wild node-gyp python dependency appeared
¯\_(ツ)_/¯
2020-11-16 14:09:21 +01:00
Leo 13f79a96b3 devnet: use real account and nonce for send-lockups.js
ghstack-source-id: fb233fa7275fc52d96edc6dfa1f08a7bf26b8736
Pull Request resolved: https://github.com/certusone/wormhole/pull/61
2020-10-28 22:47:12 +01:00
Hendrik Hofstadt dadb287220
bridge: fix quorum calculation (#69) 2020-10-28 21:22:15 +01:00
Hendrik Hofstadt 8d7a35683e
bridge: fix quorum (#56) 2020-10-25 08:57:04 +01:00
Leopold Schabel a0b3b1bf0c Fix send-lockups.js to use new lockAssets ABI 2020-10-08 17:44:33 +02:00
Hendrik Hofstadt b4b0c61dfc bridge: require single step guardian set index changes 2020-08-31 09:25:41 +02:00
Hendrik Hofstadt 3e88ed023e ethereum: properly realign transfer decimals, handle decimals on ETH transfers, don't allow same-chain transfers
Co-authored-by: Valentin von Albrecht <valentinvonalbrecht@yahoo.de>
2020-08-30 19:25:31 +02:00
Hendrik Hofstadt 4871022fee ethereum: prevent invalid guardian sets or same signer signatures
Co-authored-by: valentin <valentinvonalbrecht@yahoo.de>
2020-08-30 17:30:43 +02:00
Hendrik Hofstadt a2bd5fbb11 ethereum: truncate decimals to 9 2020-08-30 11:21:45 +02:00
Hendrik Hofstadt f6750a3762 all: consider decimals on wrapped assets, fix VAA posting, fix solana account parsing 2020-08-28 15:10:42 +02:00
Hendrik Hofstadt 8e6dc495dc bridge: remove VAA timeout
Closes #35
2020-08-28 08:49:46 +02:00
Hendrik Hofstadt a9dee7da99 ethereum: use create2 for wrapped assets 2020-08-28 08:35:00 +02:00
Leo 5a72d9029a VAA guardian devnet submission 2020-08-27 17:46:40 +02:00
Hendrik Hofstadt e0533c70c5 ethereum: make sure quorum calculation is done in the right order 2020-08-22 01:11:03 +02:00
Leo b663e2dc56 Generalize token lockup processor 2020-08-21 13:00:44 +02:00
Hendrik Hofstadt 5b7b80dbe8 ethereum: add nonce to tests 2020-08-21 12:48:14 +02:00