Commit Graph

245 Commits

Author SHA1 Message Date
bruce-riley 1cabbe8a2d
sdk: Rootstock readonly (#3235) 2023-08-14 13:17:47 -04:00
Joe Howarth 88b092e648
AutoRelayer: replay protection (#3272)
* AutoRelayer: replay protection

* AutoRelayer: store block number on failure and success, use for replay protection and indexing

* AutoRelayer: add 'deliveryAttempted' view fn; clear failure mapping on success
2023-08-09 13:51:44 -07:00
derpy-duck 5c399cdb4f
Relayer: base testnet deploy and script improvements (#3230)
* Relayer: base testnet deploy and script improvements

* remove operating chains
2023-07-24 11:39:53 -04:00
chase-45 14a1251c06
ethereum: pin ethereum docker forge evm version to london (#3120) 2023-07-18 12:16:51 -04:00
bruce-riley d1cfbdf46c
Node: Base deployment (#3213)
* Node: Base deployment

Change-Id: I9ccd5cbc6c44d1891acb9d443e9e2b29b25afa3c

* Add governance VAAs

Change-Id: I426107fd7ad2e6bef063b8f178c1683a6590a54e

* Update contract addresses

Change-Id: I1cf92bb08d1c45b22dec195e2d076e7aabf3e369

* Update URL in repair script

* Add baseRPC to devnet/node.yaml
2023-07-18 08:17:27 -04:00
derpy-duck 51f992021e
ethereum readme update (#3180)
* Makefile and readme update

* readme update

* README update

* remove code duplication

* Makefile and readme update

* readme update

* README update

* remove code duplication

* Still use make test

* restore makefile

* remove run-ganache
2023-07-12 11:32:31 -04:00
gator-boi d5f809df8b evm: add TransferRedeemed event to Bridge.sol 2023-07-07 09:29:15 -05:00
derpy-duck 44c8146c3f
relayer/ update delivery provider addresses (#3115) 2023-06-23 18:43:41 -04:00
derpy-duck 12b18d4ccc
Relayer new delivery provider implementation (#3088)
* WIP

* Pricing Wallet test

* Give owner same permissions as price oracle
2023-06-14 17:01:14 -04:00
derpy-duck 0fbfa816ba
relayer: fix messageTest + rm lib/forge-std + rm lib/openzeppelin (#3044) (#3089)
* relayer: fix messageTest + rm lib/forge-std + rm lib/openzeppelin

* save

* useLastRun -> false

Co-authored-by: Joe Howarth <jhowarth@jumptrading.com>
2023-06-14 11:09:42 -04:00
Csongor Kiss b07278c331 ethereum/Makefile: split test-identifiers from test-forge target
This way, running `test-forge` is quicker. `make test` still runs all
the tests.
2023-06-13 17:33:14 -04:00
Csongor Kiss 7f7330ddab Revert "ethereum: fix view error with newer version of forge"
This reverts commit 05cec3d729 (#3059)

The commit was erroneously included in anticipation of a forge version
update, but it actually only generates an error with an outdated
forge-stdlib version.

The old version's `vm.addr` function
(see
ddb69063e4/src/Vm.sol (L15))
has no `pure` modifier, thus any function using it can not be `pure` (or `view`).
The new version (see
66bf4e2c92/src/Vm.sol (L55))
on the other hand does. In fact, with the new version, removing the
modifier produces a warning.
2023-06-13 17:29:04 -04:00
derpy-duck 7885acb9bd
Relayer: Ethereum folder Changes for Merging into Main (#3038)
* gRelayer: surrounding files

* modification to get compilation

* restore devnet

* remove generic relayer docker

* remove wait for relayer engine

* keep build time 20

* sh -> bash

* sh -> bash

* Remove comment

* bash -> sh

* Revert "bash -> sh"

This reverts commit 5c37e92fa1.

* bash->sh

* gRelayer: ethereum folder changes for generic-relayer-merge

* add eth-devnet

* Adds .github because workflow needs to install forge

* sdk-ci-tests need to install forge

* don't wait for nonexistent relayer engine

* update package.json and package-lock.json

* Remove unnecessary types from package.json

* ts-node

* gRelayer: ethereum folder changes for generic-relayer-merge

* sdk-ci-tests need to install forge

* don't wait for nonexistent relayer engine

* update package.json and package-lock.json

* remove these changes

* Relayer: Natspec documentation in IWormholeRelayer (#3032)

* WIP

* Fixes

* Updated interfaces

* remove bash

* Forward uses same refund chain id and refund address (#3034)

* WIP

* Fixes

* Forward uses same refund chain id and refund address

* Updated interfaces

* Remove forge build warnings

* Add note to interface for resend

* via-ir on unless in Tilt

* Correct IWormholeReceiver interface

* Wormhole message fee now part of quoteDeliveryPrice (#3043)

* Fix to PR 3043

* Remove compiler warning

* Relayer/address drew review (#3060)

* Fix typo in Create2Factory

* Add event for contract upgrades

* Prevent registering contract if it is already registered

* Prevent allowing unset chainId for default delivery provider governance VAA

* memory to calldata for external functions in WormholeRelayerSend

* continue memory to calldata for external functions

* Fix pricing in delivery provider

* Sanity check new default delivery provider isn't 0 address

* Don't save vaaKey as local variable

* cache the length of array rather than iterate every time for vaaKeys

* Replacing memory with calldata in few locations

* Remove stale file DeliveryProviderMessages

* Remove batch VAA sender script

* Remove batch VAA from WormholeSimulator

* Wait for a confirmation in deploy scripts

* remove unnecessary comments

* Fix Delivery Provider Pricing and add a test

* remove console logs

* Revert "continue memory to calldata for external functions"

This reverts commit f322afb6c0.

* Revert "memory to calldata for external functions in WormholeRelayerSend"

This reverts commit 42fcaad884.

* Revert "Don't save vaaKey as local variable"

This reverts commit a9172379c5.

* Revert "cache the length of array rather than iterate every time for vaaKeys"

This reverts commit d61380a9b0.

* Revert "Replacing memory with calldata in few locations"

This reverts commit 94e47b6e72.

* Revert "Fix typo in Create2Factory"

This reverts commit a9f7bdf461.

* Update contract addresses for via-ir

* Slight improvements to delivery provider implementation

* typed errors for delivery provider

* enable VIA-IR in CI and not in Tilt

* correct contract address for via ir

* WormholeRelayerSend and WormholeRelayerDelivery (#3082)
2023-06-13 17:01:43 -04:00
Jonathan Claudius 05cec3d729 ethereum: fix view error with newer version of forge 2023-06-13 14:43:12 -04:00
heyitaki 0ecc427d6f docker: build CLI in shared image
Co-authored-by: Evan Gray <battledingo@gmail.com>
2023-06-01 15:33:07 +01:00
heyitaki 4f13263089 clients/js: refactor worm info 2023-06-01 15:33:07 +01:00
bruce-riley 1514d7cd79
Scripts: For upgrading testnet (#2984) 2023-05-26 08:29:14 -05:00
Jeff Schroeder 2402e2fbcf ethereum: update foundry config
From running:

    forge config --fix
2023-05-17 12:51:26 -05:00
Jeff Schroeder f25075d256 ethereum: update foundry wrapper script
So we get a newer forge with improved warnings.
2023-05-17 12:51:26 -05:00
Jeff Schroeder 8605ef0e5f ethereum: kill warning in TokenImplementation.t
Newer versions of forge show this warning:

    [⠊] Compiling...
    [⠢] Compiling 93 files with 0.8.4
    [⠘] Solc 0.8.4 finished in 20.09s
    Compiler run successful (with warnings)
    warning[2018]: Warning: Function state mutability can be restricted to view
    --> forge-test/TokenImplementation.t.sol:76:5:
    |
    |     function simulatePermitSignature(
    |     ^ (Relevant source part starts here and spans across multiple lines).

This change cleans it up.
2023-05-17 12:51:26 -05:00
Jeff Schroeder 925e6474d7 ethereum: update forge-std in the Makefile
Ensure you remove the old version via:

    rm -rf ethereum/lib/forge-std
    make forge_dependencies
2023-05-17 12:51:26 -05:00
Jeff Schroeder 128352a91d ethereum: change inheritance for TestMessages
Do not inherit from Getters and Messages directly.
2023-05-17 12:51:26 -05:00
Jeff Schroeder ca2f8ce283 ethereum: change inheritance for BridgeTest
The BridgeTest contract inherited from both Bridge and forge-std's
Test contracts. This was fine with the ancient version of
forge-std it was using, but newer forge-std has an isFork() from
foundry-rs/forge-std#236. This makes upgrading forge-std to take
advantage of new features like improved invariant testing or smart
fuzzing impossibru.

This makes it a bit cleaner and also fixes some of the logic in the
testTruncate to not be undefined.

Thanks @scnale for the assist on this one!
2023-05-17 12:51:26 -05:00
heyitaki ed733f8e73 sdk/js: add Sui support
Co-authored-by: Evan Gray <battledingo@gmail.com>
Co-authored-by: Kevin Peters <kpeters@jumptrading.com>
2023-05-02 15:14:23 -04:00
bruce-riley f9758b38e7
SDK/Node: Sepolia deployment (#2567) 2023-04-03 09:24:17 -05:00
bruce-riley d6a28b3b91
Eth: Update testnet karura/acala in truffle cfg (#2473)
Change-Id: I2be913a62fcd405b4b30aa0c61da50e926592741
2023-03-07 08:46:54 -06:00
bruce-riley caa71f18a6
Deploy base to testnet (#2422)
* Deploy base to testnet

* Shouldn't add testnet evmChainId to impl

* Add base to rpc dump command

* Oops, wrong branch!
2023-02-23 15:42:30 -05:00
Evan Gray 7f9a03254a test: accountant e2e 2023-01-31 11:09:43 -05:00
Paul Noel 6ebd57be58 ethereum/scripts: reduce register script 2023-01-28 07:10:35 -05:00
njkumr 6825d5ca3a
ethereum: adding hash check in verifyVM (#1851)
* adding a check to verify the vm.hash against the hash of the body and tests for the same
2023-01-24 16:10:52 +00:00
Paul Noel cf5187b90c
tilt: eth speedup (#2214)
* ethereum/scripts: add register all script

* devnet: update eth startup script

* ethereum/scripts - remove unused scripts

* ethereum/scripts: add register all script

* devnet: update eth startup script

* ethereum/scripts - remove unused scripts

* devnet: update eth-devnet2 script
2023-01-11 12:59:43 -05:00
Hendrik Hofstadt 9b50158a3f
add: safety check against signatory being address(0) (#2021)
* add: safety check against signatory being address(0)

Change-Id: I0e0b32c9d9b8501cfe57b8c672441314774c009f

* evm: add revert message and fix tests

Co-authored-by: Rasul <rasul.yunusov282750@gmail.com>
Co-authored-by: A5 Pickle <a5-pickle@users.noreply.github.com>
2023-01-11 18:32:48 +01:00
kev1n-peters fd1ed1564e
evm: Added Core and NFT Bridge EVM chain ID migrations (#2067) 2022-12-12 20:37:30 -06:00
Csongor Kiss 523a30140f ethereum: token verification instructions
commit-id:7c346ae8
2022-12-07 12:32:04 -05:00
Csongor Kiss 41868dec51 ethereum: Add make target to flatten contracts
Running `make flattened` will produce flattened contracts into the
`flattened` directory
2022-12-07 12:32:04 -05:00
Csongor Kiss af2385c9c6 ethereum: npm install truffle-flattener --save-dev
This flattener produces flattened solidity files that can be verified on
etherscan (and other evm block explorers)
2022-12-07 12:32:04 -05:00
Csongor Kiss 1b862eaff7 ethereum: npm uninstall @poanet/solidity-flattener
This flattener does not seem to work, and is not being used for anything
2022-12-07 12:32:04 -05:00
bruce-riley b2fdebb9cb
SDK: Redeploy Neon Testnet (#2035)
* sdk: redeploy neon testnet

* sdk/js: 0.9.4 version bump

Co-authored-by: Kevin Peters <kpeters@jumptrading.com>
2022-11-30 18:54:43 -06:00
Csongor Kiss effde7f756 ethereum: Implement shutdown for all 3 contracts (fixes #1937)
These are stripped down versions of the original contracts that can be
dropped in place via an upgrade to disable core functionality.
Governance features are still enabled, which means it's possible to
upgrade back to a working implementation.
2022-11-23 15:22:52 +00:00
Csongor Kiss 648b361623 ethereum: Set impl initialised during setup (fixes #1930) 2022-11-23 14:51:29 +00:00
Csongor Kiss 2f0cb19a0a ethereum: Remove initialisation code
These migrations have been performed, so the migration code can
now safely be removed.
2022-11-17 11:46:21 +00:00
Csongor Kiss f96f8083b3 ethereum: set optimism and arbitrum token contracts 2022-11-16 17:09:51 +00:00
Csongor Kiss dc67b40be5 ethereum: ensure that token implementation is non-0 2022-11-16 17:09:51 +00:00
bruce-riley fd832ca0fc
Client/js: Remove references to Ropsten (#1928) 2022-11-15 12:59:07 -06:00
bruce-riley 074c98a952
Optimism mainnet deploy (#1869)
* Optimism mainnet deploy

* node: added OP token to manual_tokens

* Add to readiness

* File should not have been committed

* Remove readiness since it goes with watcher

* Allow optimism watcher in mainnet

* Add to devnet config

Co-authored-by: Christine Eun <ceun@jumptrading.com>
2022-11-10 13:56:38 -06:00
Reptile bac99e912f
evm: add token and nft bridge interface (#1710)
* Add token and nft bridge interface

* Add wormhole method to nft and bridge interface

* ethereum: add test to ensure interface match

* Add all public methods to interfaces

Co-authored-by: gator-boi <gator-boi@users.noreply.github.com>
Co-authored-by: Evan Gray <battledingo@gmail.com>
2022-10-28 12:28:40 -04:00
Kevin Peters 25d2f24b03 ethereum: deploy test token nonce race condition fix
Noticed this error happening in tilt sometimes:

[tests] Error: Returned error: VM Exception while processing transaction: the tx
doesn't have the correct nonce. account has nonce of: 17 tx has nonce of: 16

It's not safe to submit txs in parallel, because the nonce can get out of sync.
Instead we should submit them serially.
2022-10-28 11:58:42 -04:00
bruce-riley a99c4a1a7c
node: arbitrum mainnet deploy changes (#1786)
* arbitrum mainnet deploy changes

* Change test for no governed tokens on Arbitrum

* Add arbitrum to to devnet guardian config
2022-10-27 14:50:01 -04:00
Evan Gray f184b308a8 ci: quieter eth 2022-10-27 07:52:24 -04:00
bruce-riley 19149e653e
Script changes for acala upgrade (#1726)
* Script changes for acala upgrade

* Update package-lock
2022-10-21 13:52:21 -05:00