Commit Graph

319 Commits

Author SHA1 Message Date
derpy-duck 33c0adbf82
relayer: Improve IWormholeReceiver docstring (#3488)
* IWormholeReceiver docs good

* note to verify
2023-11-02 13:05:05 -04:00
Csongor Kiss d6a410d7b2 ethereum/relayer: fix comment about storage slot derivation 2023-10-31 19:06:40 -04:00
bruce-riley af8138d4fb
CCQ/EVM: eth_call_by_timestamp and eth_call_with_finality support (#3468)
* CCQ/EVM: ethCallByTimestamp & ethCallWithFinality

* Code rework

* Code review rework
2023-10-31 17:05:19 -04:00
Bruce Riley 5afd9eab2d Code review rework 2023-10-26 12:59:24 -04:00
Jeff Schroeder e613486b92 ethereum: QueryDemo updates
* Use custom errors in place of require() to match the error handling
style overall of QueryResponse.
2023-10-26 12:59:24 -04:00
Jeff Schroeder 1eb481b2c9 ethereum: QueryDemo updates
* Gas bad
* Natspec updates
* Some address(0) checks in the constructor
2023-10-26 12:59:24 -04:00
Jeff Schroeder 50f6ca9fc7 ethereum: more QueryResponse tests 2023-10-26 12:59:24 -04:00
Jeff Schroeder f3b44e322b ethereum: move custom errors out in QueryResponse
If you don't do this, in the tests you have to do:

    vm.expectRevert(bytes4(keccak256("UnsupportedQueryType()")));

Whereas with this change, you can simply import the contract and do:

    vm.expectRevert(UnsupportedQueryType.selector);
2023-10-26 12:59:24 -04:00
Jeff Schroeder e219e2fd8c ethereum: QueryResponse test tyop fix 2023-10-26 12:59:24 -04:00
Jeff Schroeder 841f041c7e ethereum: update QueryResponse tests
Instead of the test contract inheriting directly from the QueryResponse
contract, it instantiates an instance of it and uses that for the
testing. This seems to work much nicer with the forge coverage tools.

With this commit, the coverage for QueryResponse shows 85.1% line
coverage, 100% function coverage, and 50% branch coverage.
2023-10-26 12:59:24 -04:00
Jeff Schroeder 15e1dcd3dd ethereum: update the QueryResponse contract
By moving the structs out of the abstract contract, you can use them
directly in any contract that imports QueryResponse.sol *without*
requiring that contract to inherit from the QueryResponse contract. This
seems to work much better with forge's coverage tooling.
2023-10-26 12:59:24 -04:00
Jeff Schroeder b4a27f4aed ethereum: Query.t.sol --> QueryResponse.t.sol
To follow standard forge testing practice, you use the same filename
for a test contract as for the file it is testing, but make the
extension .t.sol.
2023-10-26 12:59:24 -04:00
Jeff Schroeder c40323828b ethereum: limit deps in the QueryDemo contract
- Context is generally a worthless import
- Ownable is totally unused and a worthless import
2023-10-26 12:59:24 -04:00
Bruce Riley faea3bab8d CCQ: EVM Library and Demo Contract 2023-10-26 12:59:24 -04:00
derpy-duck bebcf281e6
relayer: allow override target chain refund (#3430)
* refund address handling improvement

* fix compilation error

* Remove unnecessary line

* restrict to view

* fix comment

* Improve handling of gas limits

* get test to pass - check that the return data is appropriately long before decoding

* modification to checking inequality

* modification to checking inequality - use unchecked

* clean functions around - add untrustedBaseDeliveryPrice

* make quote_length_bytes a constant

* seperate pay into two overloads

* change inequality to equality for checking return data length

* renaming functions

* allow override of refund per gas unused

* test modification

* note
2023-10-13 17:19:56 -04:00
derpy-duck 6c3ff43d6a
Auto relayer refund address handling improvement (#3428) 2023-10-13 00:10:50 -04:00
Jeff Schroeder c19e6b972e ethereum: add default slither config
* Add solc remappings so it can find the dependencies
* Ignore external stuff and mocks
2023-10-06 17:13:43 -04:00
Csongor Kiss 3425c821f7 ethereum: remove mention of batched vaas in README 2023-09-28 17:44:10 -04:00
derpy-duck faa397ca4f
AutoRelayer: v1.1 Release (#3313)
* AutoRelayer: remove forwards

* AutoRelayer: reentrancy guard

* AutoRelayer: remove forwards from sdk

* AutoRelayer: VaaKey -> MessageKey internals

* AutoRelayer: check delivery provider supports keyType

* AutoRelayer: VaaKey backcompat wire format

* AutoRelayer: sdk fix

* AutoRelayer: Add supported keys to delivery provider

* AutoRelayer: reintroduce reentrancy guard, revert when replay protection triggered

* AutoRelayer: fix manual delivery test

* AutoRelayer: review flups

* AutoRelayer: move libraries within relayer folder

* AutoRelayer: fix delivery provider config script

Also fix delivery provider revert bug

* AutoRelayer: Andreas code review flups

* AutoRelayer: js sdk includes MessageKey serde

* AutoRelayer: update sdk to use message key

* AutoRelayer: Simplify executeInstruction to internal call (#3352)

* refund instead of revert for replay protection (#3371)

* refund instead of revert for replay protection

* Remove mention of forward from IWormholeReceiver

* AutoRelayer: 1.1 reintroduce forwards (#3385)

* forward fallback WIP

* forward fallback no tmp storage

* Re-introduce testing of 'forward'

* Reintroduce forwards with original or default behavior for refund info + delivery provider info

* Reintroduce reentrant, only store refund information

---------

Co-authored-by: Joe Howarth <josephehowarth@gmail.com>
Co-authored-by: Joe Howarth <jhowarth@jumptrading.com>
2023-09-22 15:07:59 -04:00
Csongor Kiss 4d51f8e57e ethereum/relayer: fix storage constant comments
The hash preimages for storage calculations were wrong for two storage
slots. The updated preimages can be verified to be correct with e.g. the
`chisel` command line tool from the foundry suite.
2023-09-18 10:02:52 -04:00
Jeff Schroeder a9437e8dc2 ethereum: add arrayElementLocation() test helper
Review feedback from @kcsongor in #3363
2023-09-11 14:03:51 -04:00
Jeff Schroeder d9aacf1485 ethereum: fix some intermittently failing tests
Fix the assumptions to match the storage layout correctly.
2023-09-11 14:03:51 -04:00
Jeff Schroeder 049ca971df ethereum: tighten up some test funcs to pure/view
Fallout from #2956
2023-09-11 14:03:51 -04:00
lucasmt 406a43d03e
ethereum: Add property tests and instructions for running them with KEVM (#2956)
* ethereum: Add Foundry tests written by RV

* ethereum: Add scripts and instructions to run proofs using KEVM

* ethereum: Fix typo on testSetup_after_setup_revert_KEVM

* ethereum: Edit Makefile to skip KEVM tests when running forge test

* ethereum: Fix commented-out lines in Foundry tests

* ethereum: Refactor GovernanceStructs invalid-size tests

* ethereum: Replace assume with bound in Foundry tests

Co-authored-by: Jeff Schroeder <jeffschroeder@computer.org>

* ethereum: Apply review suggestions to run-kevm script

Co-authored-by: Jeff Schroeder <jeffschroeder@computer.org>

* ethereum: explicit cast to uint8 for some vars

The bound() calls need to be explicitly cast to uint8 from the uint256
that forge-std's bound() returns.

* ethereum: updating some of the RV tests

The definitions don't compile with newer forge/solc.

* ethereum: Add assumption to test that guardian count > 0

Prevents an arithmetic over/underflow error in testCannotVerifySignaturesWithOutOfBoundsSignature, in the expression bound(outOfBoundsGuardian, 0, params.guardianCount - 1)

---------

Co-authored-by: Lucas MT <lucas.tabajara@runtimeverification.com>
Co-authored-by: Jeff Schroeder <jeffschroeder@computer.org>
2023-09-06 11:24:00 -04:00
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
Evan Gray 6c6661f621 js: make packages comply with ci rule 2022-10-20 17:11:13 -05:00
Csongor Kiss 3877f6f3c3 tilt: register aptos on other chains 2022-10-15 15:17:36 +01:00
Chirantan Ekbote 7f4b0d1a09 Wormhole chain integration
This is a squashed commit of all the changes needed to integrate
wormhole chain into the main repo.
2022-10-03 17:34:42 +09:00
Paul Noel 0f7ddda602
Optimism testnet deploy (#1661)
* ethereum: add optimism testnet

* sdk/js: add optimism testnet

* ethereum: put back network id

* Revert "ethereum: put back network id"

This reverts commit 71f68c50d2.

* ethereum: put back network id

* ethereum: file cleanup
2022-09-30 17:38:08 -04:00
Csongor Kiss b5a8ba2361 ethereum: Add scripts to verify/upgrade all contracts 2022-09-30 09:11:52 -04:00
Bruce Riley 87d146a261 Deploy contracts to testnet 2022-09-29 22:38:27 -04:00
kev1n-peters c5d2f9d54d
sdk/js: Near refactor, added integration tests (#1648)
* near-sdk-refactor: Fix attest
                 : Fix missing function calls
                 : make near on near
                 : renamed tryHexToNativeStringNear

* near-sdk-refactor: bumped near-sdk-js version

Co-authored-by: Josh Siegel <jsiegel@jumptrading.com>
2022-09-28 08:53:15 -05:00
Evan Gray cb161db5e0 ethereum: migration for ERC20Permit 2022-09-19 15:31:44 -04:00
Karl Kempe 9df96ac666 Fix domain separator and add more tests 2022-09-19 13:42:38 -04:00
Karl Kempe d8adb6a700 Add ERC20 permit 2022-09-19 13:42:38 -04:00
Drew 6c6b25ab2a add check for the zero address in storeGuardianSet
Change-Id: Ic3c5fce71f687d98380d39dc62923d9c6423e194
2022-09-15 10:39:39 -04:00
kev1n-peters cda45a85ab
Moonbeam mainnet deploy (#1579)
* Moonbeam mainnet deploy

* Add eth migrate command to just deploy bridges

* node: Added moonbeam emitter addresses and governor limits

Co-authored-by: Bruce Riley <briley@jumptrading.com>
2022-09-12 18:41:39 -05:00
Kevin Peters cec5bc7528 ethereum: Added fork protection tests 2022-09-09 13:16:27 -05:00
Kevin Peters 099756fe68 ethereum: Use chainId() getter in initialize 2022-09-09 13:16:27 -05:00
Kevin Peters e21d701443 ethereum: Changed invalid fork error message 2022-09-09 13:16:27 -05:00
Kevin Peters b7535a8e5b ethereum: Added isFork() method 2022-09-09 13:16:27 -05:00
Kevin Peters b1081d7d93 ethereum: Simplified forked chain check
No longer need to return uint16 max in chainId() for forked chains
2022-09-09 13:16:27 -05:00
Kevin Peters 3f9c80a554 ethereum: Fixed comment typo 2022-09-09 13:16:27 -05:00
Kevin Peters ae04a305f3 ethereum: fixed tests 2022-09-09 13:16:27 -05:00
Kevin Peters cacf054f0b ethereum: Added RecoverChainId Governance Message
Used to set the `chainId` and `evmChainId` for "bad-fork" chains
2022-09-09 13:16:27 -05:00
Kevin Peters 9d477e0585 ethereum: EVM fork protection
Added a `uint256 evmChainId` state variable to the Core, Token and NFT Bridge
contracts. `evmChainId` is compared to `block.chainid` in the `chainId`
function. When they don't match, a "bad fork" Chain ID is returned,
otherwise the Wormhole Chain ID is returned.
2022-09-09 13:16:27 -05:00
tbjump 09548300a0
comment danger of potential future VM.version increases (#1401)
comment danger of potential future VM.version increases
2022-09-07 12:33:35 -07:00
Evan Gray a58c5ae950 ethereum: remove wormhole from token name 2022-08-31 17:21:52 -04:00
Csongor Kiss fd540c91b4
ethereum: Check that bytes32 fits into 20 bytes before truncating (#1457) 2022-08-23 14:41:03 -04:00
Csongor Kiss 9510bb47d9 ethereum: Add property test on quorum
It should always be possible to reach quorum
2022-08-23 15:06:04 +02:00
Csongor Kiss 7889eb08ee ethereum: Fix test name so forge runs it 2022-08-23 15:06:04 +02:00