Commit Graph

207 Commits

Author SHA1 Message Date
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: c66c5d4647
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: fb233fa727
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
Leo d9ede323f2 Add nonce to send-lockups.js 2020-08-20 21:05:14 +02:00
Hendrik Hofstadt 9b3f7999ba ethereum: add nonce to transfer input 2020-08-20 20:11:45 +02:00
Hendrik Hofstadt 085af1d6b7 Add reentrancy protection 2020-08-20 16:58:03 +02:00
Leo d1c86a0eaa bridge: use new eth devnet addresses and keygen 2020-08-19 17:38:55 +02:00
Hendrik Hofstadt 59449a30b3 Update VAA structure 2020-08-19 16:41:25 +02:00
Leo d6ef9c932c bridge: listen to eth lockups and aggregate signatures from all nodes
Improved devnet setup to generate deterministic node and guardian keys.

Devnet setup routine that configures a dynamic guardian set on Ethereum.

Configurable number of nodes in Tiltfile.
2020-08-19 14:24:38 +02:00
Leo 69d8125c67 ethereum: emit guardian set IDs in LogGuardianSetChanged
go-ethereum is having trouble parsing a log with structs.
2020-08-19 11:47:29 +02:00
Leo 8b34a3c534 ethereum: add getGuardianSet accessor 2020-08-18 16:19:28 +02:00
Leo 12873e5819 Add tooling to regenerate the Go ABI 2020-08-17 23:02:06 +02:00
Leo 7903402fa6 Deterministic hashes for ETH lockups
We're missing a nonce for truly unique hashes - for now, two
identical transfers will only be executed once.
2020-08-17 19:29:25 +02:00
Leo e548bbbee3 devnet: add send-lockups.js truffle script to generate test lockups 2020-08-17 16:31:48 +02:00
Leo dc7a2147b7 devnet: fix generation of deterministic contract addresses
We previously had an extra contract that was deleted, which
changed the contract addresses.

As a workaround, deploy Wormhole twice to fix the tests.
2020-08-17 12:03:16 +02:00
Leo b7512c9203 ethereum: only invalidate npm install if package.json changed
Thanks Lorenz :D
2020-08-17 11:19:14 +02:00
Hendrik Hofstadt 49d2872d9c Update devnet and Solana program 2020-08-16 13:21:39 +02:00
Leo e39469f817 ethereum: install git
Required for properly installing truffle.
2020-08-16 11:25:37 +02:00
Leo f8b313cab8 ethereum: remove unused Schnorr references from tests 2020-08-16 01:54:49 +02:00
Leo 1094c2cadb ethereum: partially fix npm run test 2020-08-16 01:47:10 +02:00
Leo 4d1610d9f0 eth-devnet deployment 2020-08-16 01:38:10 +02:00
Hendrik Hofstadt 6e5a3fa118 Update ETH smart contract for new signature schema 2020-08-15 00:09:48 +02:00
Hendrik Hofstadt 0e69aa4ddc remove requirement for half_q on pub key x
Schnorr signatures don't have the ecdsa malleability vulnerability, also we protect against malleable signatures by tracking consumed VAAs using their body hash.
The check was implemented because the author assumed that ecrecover in the EVM does not accept s < HALF_Q values for malleability protection. There were 2 misconceptions:
1. pubkey_x is passed in as r and not s, 2. the check is not enforced in the precompiled evm instruction.
2020-08-10 21:08:57 +02:00
Hendrik Hofstadt 9749044c25 make wrapped asset check public on eth 2020-08-09 21:16:18 +02:00
Hendrik Hofstadt c2673c109a prevent old guardians from updating the set 2020-08-07 11:12:46 +02:00
Hendrik Hofstadt 6aa9c874cf extend tests on contract 2020-08-06 23:41:26 +02:00
Hendrik Hofstadt 7add58bef5 clean up contract 2020-08-06 23:36:49 +02:00
Hendrik Hofstadt f52ba57eff Add source reference 2020-08-06 23:34:15 +02:00
Hendrik Hofstadt 6e0fe64937 Add smart contract tests 2020-08-06 23:32:31 +02:00
Hendrik Hofstadt 90b9d403e6 Optimize contract 2020-08-06 18:59:58 +02:00
Hendrik Hofstadt 5368c26332 Remove outdated comment 2020-08-06 16:28:28 +02:00
Hendrik Hofstadt 8f7b4917fa Support fee-charging ERC20 tokens 2020-08-06 16:26:25 +02:00
Hendrik Hofstadt c23f8103de Fix wrapped asset proxy 2020-08-06 16:17:41 +02:00
Hendrik Hofstadt b6c85217b6 Add ETH tracking 2020-08-06 15:43:45 +02:00
Hendrik Hofstadt be2a51b447 Optimize ETH contract 2020-08-06 13:38:25 +02:00
Hendrik Hofstadt bb2e3be463 Update Wormhole solidity contract 2020-08-05 22:44:28 +02:00
Leo 71c0e29dcf solana: note lack of clock reliability 2020-08-04 19:52:41 +02:00
Leo f06c4fc50d eth: fix typo 2020-08-04 19:52:41 +02:00
Hendrik Hofstadt 20a67604fd
Implement full bridge in Solidity (#5) 2020-08-03 15:09:40 +02:00
Hendrik Hofstadt ec7f7565da ethereum: remove admin key change feature
Allowing a guardian to change the admin key will enable them to cast multiple votes
2020-07-28 15:17:36 +02:00
Hendrik Hofstadt d4fab1190c chore: restructure for monorepo 2020-07-28 12:39:38 +02:00